Anna Shaleva
7ca93e76ac
core, rpc: allow to store several AppExecResult for a single hash
...
It is required for we have several executions per block.
2020-11-12 16:24:39 +03:00
Anna Shaleva
01296bda5f
core: remove policy default values initialisation
2020-11-10 18:05:40 +03:00
Roman Khimov
62d6f3ba22
Merge pull request #1530 from nspcc-dev/syscall/atoi
...
core: implement `System.Binary.Atoi/Itoa` syscalls
2020-11-10 16:39:02 +03:00
Evgenii Stratonikov
e4bf531e3e
core: implement System.Binary.Atoi/Itoa
syscalls
...
They follow C# conversion rules, but differ from our `bigint` module
conversions:
1. String must be big-endian.
2. Sign extension is 4-bit in size (single hex character)
and not 8-byte.
2020-11-10 16:15:10 +03:00
Evgenii Stratonikov
54992ad4f3
core: provide account in calculate claimable
...
`getunclaimedgas` RPC should return all GAS available to claim.
2020-11-10 16:08:21 +03:00
Evgenii Stratonikov
860c146260
native: increase committee GAS bounty
...
Follow neo-project/neo#2049 .
2020-11-10 15:30:31 +03:00
Evgenii Stratonikov
af583c14ea
native: add GAS rewards for voters
...
Close #1348 .
2020-11-10 15:30:30 +03:00
Evgenii Stratonikov
a3c7130ab2
native: cache committee together with votes
2020-11-10 15:23:06 +03:00
Roman Khimov
ede2b05f29
Merge pull request #1529 from nspcc-dev/fix/nextconsensus
...
consensus: update NextConsensus only when committee is recalculated
2020-11-10 10:24:35 +03:00
Evgenii Stratonikov
c30d891aa9
consensus: update NextConsensus only when committee is recalculated
2020-11-09 17:35:32 +03:00
Roman Khimov
a1ce3d2db2
transaction: add new oracle response codes
...
Follow neo-project/neo#2037 .
2020-11-09 16:54:09 +03:00
Roman Khimov
bdd073aad7
Merge pull request #1520 from nspcc-dev/tune-some-limits
...
Tune some limits
2020-11-06 15:35:44 +03:00
Roman Khimov
0ee377792e
Merge pull request #1519 from nspcc-dev/designate-role-history
...
native: implement designate contract history retention
2020-11-06 15:35:18 +03:00
Roman Khimov
47421f23f4
native: add events to oracle contract
...
Follow neo-project/neo#2036 .
2020-11-06 13:49:07 +03:00
Roman Khimov
9e781bff47
native: implement designate contract history retention
...
Follow neo-project/neo#2007 . Fix getDesignatedByRole price along the way.
2020-11-06 13:46:40 +03:00
Roman Khimov
b233158c9f
transaction: lower MaxValidUntilBlockIncrement
...
Follow neo-project/neo#2042 .
2020-11-06 13:41:46 +03:00
Roman Khimov
b327308df8
core/config: move MaxTraceableBlocks to configuration file
...
Follow neo-project/neo#2042 , use 2102400 setting for mainnet/testnet and
200000 for private networks.
2020-11-06 13:41:46 +03:00
Roman Khimov
39a38dc5f5
transaction: raise max oracle response size
...
Follow neo-project/neo#1984 .
2020-11-06 13:41:46 +03:00
Roman Khimov
679846c1a1
Merge pull request #1426 from nspcc-dev/rpc/getcontractstate_by_id_or_name
...
rpc: allow to `getcontractstate` by id or name
2020-11-05 13:17:42 +03:00
Roman Khimov
d7502debba
core: adjust storage update fees
...
Follow neo-project/neo#2033 .
2020-11-03 22:50:40 +03:00
Anna Shaleva
15a939b1da
rpc: allow to getcontractstate
by address, id or name
...
close #1423
2020-11-03 17:23:49 +03:00
Roman Khimov
eaa260474f
trigger/core: split System trigger into OnPerist and PostPersist
...
Follow neo-project/neo#2022 .
2020-10-29 19:17:07 +03:00
Roman Khimov
044786b995
core: use Application trigger in CalculateClaimable()
...
It doesn't need a System one.
2020-10-29 19:17:07 +03:00
Roman Khimov
2924ecd453
core: use ic.SpawnVM() in tests, not vm.New()
...
vm.New() sets some arbitrary trigger while interop context always sets
something appropriate according to its state.
2020-10-29 19:17:07 +03:00
Roman Khimov
d4da811d12
Merge pull request #1507 from nspcc-dev/conflicts_attr
...
core: implement Conflicts transaction attribute
2020-10-29 16:54:58 +03:00
Anna Shaleva
ec63d5c456
core: add conflicts attribute
...
Close #1491
2020-10-29 10:57:31 +03:00
Roman Khimov
0eb4ad8564
Merge pull request #1508 from nspcc-dev/core/check_witness_tests
...
core: add CheckWitness tests
2020-10-27 15:56:35 +03:00
Roman Khimov
c4a4a84515
native: lower voting fee
...
Follow neo-project/neo#2010 .
2020-10-26 22:12:56 +03:00
Anna Shaleva
5a15e6b54c
core: add tests for CheckWitness
...
Close #1366
2020-10-26 20:30:45 +03:00
Anna Shaleva
204d7f1c6a
core: refactor runtime.CheckWitness interop
...
Removed unreachable code, see
8fed383523
runtime.CheckHashedWitness can only be used for transaction
verification, the other two options from reference implementation (block
and consensus payload) have separate methods for verification.
2020-10-26 20:26:21 +03:00
Roman Khimov
eca1221d22
Merge pull request #1504 from nspcc-dev/core/native_serialisation
...
core: native serialisation
2020-10-23 18:38:35 +03:00
Anna Shaleva
f259a614de
core: add transaction.HasSigner method
2020-10-23 16:32:26 +03:00
Anna Shaleva
0232bbcb0c
core: refactor GASRecord handling
...
We should store each GAS record as
{
Key: ContractID + RecordsPrefix + RecordID,
Value: RecordValue,
}
So don't use state.GASRecord for storing anymore. However, it's still
useful to cache GasRecord values by using state.GASRecords, because we
have to keep GASIndexPairs sorted by indexes.
2020-10-23 12:49:12 +03:00
Anna Shaleva
0da01fde7f
core: refactor blocked accounts logic
2020-10-23 11:42:30 +03:00
Roman Khimov
1956f2c079
Merge pull request #1496 from nspcc-dev/signatures-collection
...
core: implement NotValidBefore and Reserved tx attributes
2020-10-23 11:26:49 +03:00
Anna Shaleva
7947e99a1e
core: add transaction.GetAttributes
2020-10-23 11:05:03 +03:00
Anna Shaleva
95630b72e8
core: verify transaction attributes before adding it into mempool
...
Attributes check should be done before adding transaction to
the pool, otherwise there might be a case when transaction with invalid
attributes is in the pool.
2020-10-23 11:05:03 +03:00
Anna Shaleva
a6579a05ac
core: refactor transaction.Attribute unmarshalling
2020-10-23 11:05:03 +03:00
Anna Shaleva
09b8b8de73
core: reserve attributes range for experimantal purposes
2020-10-23 11:04:59 +03:00
Anna Shaleva
368ff820b3
core: add NotValidBefore transaction attribute
...
Close #1490
2020-10-23 11:02:46 +03:00
Anna Shaleva
6685f8eba9
core: restrict the maximum number of requests per URL
2020-10-22 11:32:02 +03:00
Anna Shaleva
7c232e2ddc
core: add max nodes count restriction to designate contract
2020-10-22 11:32:02 +03:00
Anna Shaleva
64d1946fbb
rpc: fix Matches and marshalling for notification events
...
Close #1494 . Marshalling went wrong due to the incorrect pointers usage.
Reproduced and fixed.
2020-10-19 13:44:20 +03:00
Roman Khimov
99e0e346c6
Merge pull request #1476 from nspcc-dev/fix/verify
...
core: allow to invoke `verify` of native contracts
2020-10-14 12:49:01 +03:00
Roman Khimov
7808ab2dde
Merge pull request #1479 from nspcc-dev/examples/deploy
...
examples: add _deploy usage examples
2020-10-14 12:32:21 +03:00
Evgenii Stratonikov
aee02ff2e3
core: allow to invoke verify
of native contracts
2020-10-14 11:44:27 +03:00
Anna Shaleva
fe1f0a7245
core: introduce CheckReturnState constants
...
At the moment we should have 3 possible options to check return state
during vm context unloading:
* no check
* ensure the stack is empty
* ensure the stack is not empty
It is necessary to distinguish them because new _deploy method shouldn't
left anything on stack. Example: if we use _deploy method before some
ordinary contract method which returns one value. Without these changes
the contract invocation will fail due to 2 elements on stack left after
invocation (the first `null` element is from _deploy, the second element
is return-value from the ordinary contract method).
2020-10-13 19:14:44 +03:00
Roman Khimov
0f39da19d0
storage: fix Get for BoltDB, fix #1482
2020-10-13 19:05:11 +03:00
Roman Khimov
c72ecd1be4
Merge pull request #1480 from nspcc-dev/fix-reverification-of-stale-txes
...
core: drop stale transactions from the mempool
2020-10-12 15:54:28 +03:00
Roman Khimov
a154481860
core: drop stale transactions from the mempool
...
They're no longer valid if `ValidUntilBlock == curheight`.
2020-10-12 14:58:40 +03:00