Evgeniy Stratonikov
fc3b840335
compiler: append bytes >0x80 properly
...
NeoVM encoding for int(0x80) is []byte{0x80, 0x00} and
byte constant can be used both as integer and as an element
of byte-slice. Thus special case needs to be taken in
`append`.
2021-02-17 16:34:34 +03:00
Roman Khimov
608df7fb21
Merge pull request #1747 from nspcc-dev/default-notary-config
...
notary: usability improvements
2021-02-17 14:21:47 +03:00
Roman Khimov
69458a9945
Merge pull request #1751 from nspcc-dev/microfixes
...
core: microfixes
2021-02-17 14:20:01 +03:00
Anna Shaleva
0cd02e2de8
core: update protocols regexps
2021-02-17 13:51:08 +03:00
Anna Shaleva
15d90925b8
core: refactor (*NameService).checkName method
...
It does not require native contract.
2021-02-17 13:29:18 +03:00
Anna Shaleva
a4d84ee3b0
core: enable test, disabled in ac52765
2021-02-17 13:19:26 +03:00
Anna Shaleva
1e108f20a7
core: remove description from NFT state
2021-02-17 13:19:26 +03:00
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
Evgeniy Stratonikov
0cb6ec7345
mpt: allow to remove non-existent keys in batch
...
This bug was here before batch were intoduced.
`Delete` is allowed to be called on missing keys with
HALT result, MPT needs to take this into account.
2021-02-17 12:37:44 +03:00
Anna Shaleva
d9c85a432b
rpc: add new rule to SignAndPushP2PNotaryRequest
2021-02-16 14:12:02 +03:00
Anna Shaleva
9f6fba5926
network: specify error message
...
For better user experience.
2021-02-16 14:11:42 +03:00
Anna Shaleva
bcb82b457d
config: move notary module config to ApplicationConfiguration
2021-02-16 13:58:25 +03:00
Roman Khimov
4d0681d898
Merge pull request #1711 from nspcc-dev/compiler/inline
...
Allow to inline internal wrappers in compiler
2021-02-15 19:05:30 +03:00
Evgeniy Stratonikov
cf459002f7
compiler: allow to inline global variables
2021-02-15 18:48:33 +03:00
Evgeniy Stratonikov
6e560c6c9f
compiler: allow to inline var arg functions
2021-02-15 18:48:33 +03:00
Evgeniy Stratonikov
339187a56d
compiler: count locals number properly
2021-02-15 18:48:33 +03:00
Evgeniy Stratonikov
57a0377c81
compiler: load nil
directly on inline
2021-02-15 18:48:33 +03:00
Evgeniy Stratonikov
3484025065
compiler: load constants directly on inline
2021-02-15 18:48:33 +03:00
Evgeniy Stratonikov
27e60455c7
compiler: do not introduce excessive locals on inline
...
When function call-site parameter is an identifier,
we may load it directly. Currently it can be also modified,
this will be fixed in a separate commit.
2021-02-15 18:48:33 +03:00
Evgeniy Stratonikov
1ae0d022dd
compiler: support basic inlining
2021-02-15 18:48:33 +03:00
Evgeniy Stratonikov
1f238ce6fd
compiler: do not emit RET twice for nested BlockStmt
...
When function finishes with `*ast.BlockStmt`, last return
in that block should be looked for.
2021-02-15 18:48:33 +03:00
Anna Shaleva
46dfd36a1f
core: fix native designateAsRole method
...
It shouldn't return anything.
2021-02-15 18:13:00 +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