Anna Shaleva
9a8a19d2f2
network: optimise NotaryPayload decoding
...
We have scripts length check during transaction decoding, so don't need
to check it twice.
2021-02-17 13:19:26 +03:00
Anna Shaleva
5569f7ad6c
services: optimize notary transaction verification
2021-02-17 13:19:26 +03:00
Anna Shaleva
a6d4a266b9
core: check transaction's scripts length during decoding
2021-02-17 13:19:23 +03:00
Anna Shaleva
3fed06989a
network: allow larger extensible payload
2021-02-15 15:19:05 +03:00
Anna Shaleva
664a2a88eb
core: allow call in verification
2021-02-15 15:03:32 +03:00
Roman Khimov
754c985424
Merge pull request #1736 from nspcc-dev/preview5-compatibility-fixes
...
core: preview-5 states difference fixes
2021-02-12 23:58:22 +03:00
Anna Shaleva
4893faa374
core: remove NEP17BalanceState if balance is null [addTokens]
...
Affects states.
2021-02-12 23:48:30 +03:00
Anna Shaleva
0f1473897b
core: temp manifest.Extra marshalling fix
...
Manifest.Extra still serialized as JSON message with undefined order
of items, so it affects contract states dumps.
2021-02-12 23:48:30 +03:00
Anna Shaleva
e1384cb795
core: fix native NameService methods return types
...
Affects dumps.
2021-02-12 18:58:31 +03:00
Anna Shaleva
49b1b4bb27
core: fix native Neo parameter name
...
Affects dumps.
2021-02-12 18:58:31 +03:00
Anna Shaleva
99f58d9cd5
core: fix native Ladger parameter type
...
Affects dumps.
2021-02-12 18:58:31 +03:00
Anna Shaleva
7021c76042
core: fix native Management's parameters names
...
Affects dumps.
2021-02-12 18:58:31 +03:00
Roman Khimov
ca08a559fa
interop: allow transfer calls to read states
...
Follow-up to #1734 .
2021-02-12 12:56:15 +03:00
Roman Khimov
8cd37c781c
client: allow transfer method to read states
...
Makes no sense disabling it with writes enabled. Fixes #1725 .
2021-02-11 18:56:05 +03:00
Roman Khimov
2a1e33b8c9
Merge pull request #1733 from nspcc-dev/consensus/binary
...
consensus/test: update binary payload data
2021-02-11 18:43:16 +03:00
Evgeniy Stratonikov
91db164519
consensus/test: update binary payload data
2021-02-11 18:26:01 +03:00
Anna Shaleva
a237e34c1f
rpc: add test for submitNotaryRequest
2021-02-11 17:15:59 +03:00
Anna Shaleva
af510b4e25
rpc: add submitnotaryrequest
method to RPC client
2021-02-11 17:11:36 +03:00
Anna Shaleva
9d73802244
rpc: add getMaxNotValidBeforeDelta
method to RPC client
2021-02-11 17:11:36 +03:00
Anna Shaleva
2bb8537151
core: use declared constant for Notary's verification price
...
This constant is used from the outside, it should be synced with the
real verification price.
2021-02-11 17:11:36 +03:00
Anna Shaleva
7896ef0640
rpc: allow client to send nep17 transfer with data
2021-02-11 17:11:36 +03:00
Anna Shaleva
59ad0e5e04
wallet: export GetVerificationScript method
...
We need it to construct witness for P2PNotaryRequest.
2021-02-11 17:11:36 +03:00
Anna Shaleva
afdfa9ce62
rpc: add submitnotaryrequest
RPC call
2021-02-11 17:11:36 +03:00
Anna Shaleva
9bd2cae08e
core: refactor (*Notary).verify
...
There could be only one Notary signer.
2021-02-11 17:11:36 +03:00
Anna Shaleva
8444f3d816
network: refactor notary service's PostBlock
...
There was a deadlock while trying to finalize transaction during
PostBlock:
1) (*Notary).PostBlock is called under the blockchain lock
2) (*Notary).onTransaction is called inside the PostBlock
3) (*Notary).onTransaction needs to RLock the blockchain to add
completed transaction to the memory pool (and the blockchain is Lock'ed
by this moment)
The problem is fixed by using notifications subsistem, because it's not
required to call (*Notary).PostBlock under the blockchain lock.
2021-02-11 17:11:36 +03:00
Anna Shaleva
5d6fdda664
network: fix P2PNotaryRequest payload broadcaster
2021-02-11 17:11:36 +03:00
Anna Shaleva
5c2ea2d5bb
network: refactor P2PNotaryRequest decoding
...
We need to provide magic for both main and fallback transactions during
decoding, because transactions hashes depend on it.
2021-02-11 17:11:33 +03:00
Anna Shaleva
c14e34cdb5
network: add RelayP2PNotaryRequest method
2021-02-11 16:56:24 +03:00
Evgeniy Stratonikov
560aff6155
compiler: adjust init/_deploy method offsets during optimization
...
Because `_initialize` and `_deploy` methods encompass multiple
Go functions, their offsets are stored differently and need
special treatment.
2021-02-11 15:59:02 +03:00
Evgeniy Stratonikov
4f1bea0bcb
rpc/client: implement GetNativeContracts
2021-02-11 12:37:03 +03:00
Evgeniy Stratonikov
02ca3d3dfd
interop: reuse state.Native
in ContractMD
2021-02-11 12:32:10 +03:00
Evgeniy Stratonikov
6ca7b4b966
interop: rename ContractID
to ID
...
Helps further refactoring, see next commit.
2021-02-11 12:27:43 +03:00
Evgeniy Stratonikov
f0d8652bcd
rpc: implement getnativecontracts
RPC
2021-02-11 12:27:43 +03:00
Evgeniy Stratonikov
e1d2a5b5b7
state: split ContractBase and UpdateCounter
...
Latter doesn't make sense for native contracts.
2021-02-11 12:24:09 +03:00
Roman Khimov
29b1581ea8
Merge pull request #1723 from nspcc-dev/fix/rpcnumber
...
Marshal fees and GAS as integers.
2021-02-11 00:35:46 +03:00
Roman Khimov
7c419cebdc
Merge pull request #1729 from nspcc-dev/manifest-and-script-checks
...
Manifest and script checks
2021-02-10 20:58:52 +03:00
Roman Khimov
dd05cae506
core: check all transaction scripts
...
Refs. #1699 .
2021-02-09 22:31:26 +03:00
Roman Khimov
158f0d9d9c
native/vm: add script check for deployed contracts
...
Refs. #1699 .
2021-02-09 22:31:26 +03:00
Roman Khimov
a6e25cffde
bitfield: add basic bit field package
...
Strange as it is but I wasn't able to find any good bit field
implementation. Most of them are limited to 64 bits, some allow for wider
values (like https://github.com/emef/bitfield ) but even they're not that
efficient (using bytes instead of wider types). This this minimalistic thing.
2021-02-09 22:31:26 +03:00
Roman Khimov
b892db9976
vm: add instruction correctness check
...
See neo-project/neo-vm#392 .
2021-02-09 22:31:26 +03:00
Roman Khimov
a3abdbd7f0
manifest: add duplicate events/methods checks to ABI
...
Refs. #1699 .
2021-02-09 22:31:26 +03:00
Roman Khimov
62ef5a8dc7
native: enforce contract manifest UTF-8 validity
...
Refs. #1699 .
2021-02-09 22:31:26 +03:00
Roman Khimov
dc3967ae7b
manifest: add manifest validity checks
...
Refs. #1699 .
2021-02-09 22:31:26 +03:00
Roman Khimov
284476c070
manifest: add Permission and Permissions validity checks
...
Refs. #1699 .
2021-02-09 22:31:26 +03:00
Roman Khimov
15ed905757
manifest: add validity checks for Parameter
...
Refs. #1699 .
2021-02-09 22:31:26 +03:00
Roman Khimov
f0c3066ef6
manifest: add method validity check
...
Refs. #1699 .
2021-02-09 22:31:26 +03:00
Roman Khimov
f3c761e4c2
manifest: move Parameter into a file of its own
2021-02-09 22:31:26 +03:00
Roman Khimov
0b2e9312af
manifest: add event validity check
...
Refs. #1699 .
2021-02-09 22:31:26 +03:00
Roman Khimov
f78e3fb290
manifest: move Event into a file of its own
2021-02-09 22:31:26 +03:00
Roman Khimov
e9ea89b4e3
manifest: add group signature length check
...
Refs. #1699 .
2021-02-09 22:31:24 +03:00