Evgeniy Stratonikov
9d4ccf0fcc
smartcontract: add test for Optional methods
...
They should be checked only if name + parameter count matches.
This is how methods are identified in NEO.
2021-02-19 17:06:07 +03:00
Evgeniy Stratonikov
ae30e30321
native: add NEP-11 check for name service
2021-02-19 17:06:07 +03:00
Evgeniy Stratonikov
eb26a61078
smartcontract: remove IsNEP17()
2021-02-19 17:06:07 +03:00
Evgeniy Stratonikov
9c0bbd0bfd
smartcontract: add NEP-11 standard check
...
The only method missing is name, because it is
provided in manifest.
2021-02-19 17:06:07 +03:00
Roman Khimov
fe918e28f2
Merge pull request #1757 from nspcc-dev/logs
...
network: add logs for different RelayTx errors
2021-02-18 13:13:25 +03:00
Anna Shaleva
94430ef3ca
network: refactor RelayTx error handling
...
We don't need to wrap different core errors in server. Also it would be
good to provede more error info to the user.
2021-02-18 12:40:40 +03:00
Evgeniy Stratonikov
d16ef53653
compiler: support ellipsis for append of non-byte slices
...
NeoVM lacks opcode for array append, thus some
kind of loop is needed for this.
2021-02-17 17:14:32 +03:00
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