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
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
9bd2cae08e
core: refactor (*Notary).verify
...
There could be only one Notary signer.
2021-02-11 17:11:36 +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
e1d2a5b5b7
state: split ContractBase and UpdateCounter
...
Latter doesn't make sense for native contracts.
2021-02-11 12:24:09 +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
158f0d9d9c
native/vm: add script check for deployed contracts
...
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
1a4958b1d5
manifest: add ABI validity check
...
Some methods must be defined in a valid ABI. Refs. neo-project/neo#2263 .
2021-02-08 13:27:39 +03:00
Evgeniy Stratonikov
2f6345f2d9
compiler: add Hash compatibility test
2021-02-08 13:09:41 +03:00
Roman Khimov
5ba074b4cf
manifest: return an error from IsValid
...
Be more specific.
2021-02-08 12:04:57 +03:00
Roman Khimov
e4b5b59663
Merge pull request #1704 from nspcc-dev/binary_manifest
...
core: serialise manifest as stackitem
2021-02-05 23:58:07 +03:00
Roman Khimov
aad2b3adad
Merge pull request #1712 from nspcc-dev/nep17-nep11-onpayments
...
NEP17/NEP11 onPayments
2021-02-05 21:04:35 +03:00
Roman Khimov
cd9b34416e
native: call onNEP11Transfer for NEP-11 transfers
...
See neo-project/neo#2287 .
2021-02-05 20:48:45 +03:00
Anna Shaleva
a2715404d0
core: serialise manifest as stackitem
2021-02-05 19:10:15 +03:00
Roman Khimov
a442e1530d
native: rename onPayment into onNEP17Payment
...
Follow neo-project/neo#2287 .
2021-02-05 16:09:51 +03:00
Roman Khimov
cdfc7fc8fa
Merge pull request #1703 from nspcc-dev/initials_for_natives
...
core: store native contracts' initial values in the DB
2021-02-05 15:32:05 +03:00
Evgeniy Stratonikov
d7f68d3650
native: fix getCommittee
name
...
`C` was in russian.
2021-02-05 13:34:05 +03:00
Anna Shaleva
2b06601646
core: change Oracle request ID endianness
2021-02-05 11:37:12 +03:00
Anna Shaleva
12f7111ca8
core: mark blocked accounts with empty byte array
2021-02-05 11:37:12 +03:00
Anna Shaleva
260bcd373c
core: store initial native values into DAO
2021-02-05 10:43:17 +03:00
Roman Khimov
ac527650eb
native: add Ledger contract, fix #1696
...
But don't change the way we process/store transactions and blocks. Effectively
it's just an interface for smart contracts that replaces old syscalls.
Transaction definition is moved temporarily to runtime package and Block
definition is removed (till we solve #1691 properly).
2021-02-04 13:12:11 +03:00
Roman Khimov
641896b2fb
Merge pull request #1658 from nspcc-dev/signature_collection/module
...
core, network: add Notary module
2021-02-02 22:24:14 +03:00
Anna Shaleva
19fa0daaa6
core, network: add Notary module
2021-02-02 22:01:20 +03:00
Roman Khimov
f7cb00b82d
Merge pull request #1678 from nspcc-dev/nameservice
...
Implement NameService
2021-02-01 22:52:59 +03:00
Evgeniy Stratonikov
e4ff8326b5
native: add NameService
2021-02-01 21:40:21 +03:00
Evgeniy Stratonikov
2336415f42
naitve: disallow contract name modification
2021-01-29 12:19:08 +03:00
Evgeniy Stratonikov
c1cc7e6f9d
native: add additional parameters to deploy
...
1. Management contract has 2 overloads of `deploy` method.
2. Normal contracts should have `_deploy` with 2 parameters.
2021-01-29 12:19:08 +03:00
Evgeniy Stratonikov
849385a533
native: allow to overload native methods
2021-01-29 12:19:08 +03:00
Roman Khimov
818d5988f5
Merge pull request #1695 from nspcc-dev/committeechecks
...
native: unify committee checks
2021-01-29 11:58:33 +03:00
Evgeniy Stratonikov
690b787fe3
native: unify committee checks
...
Fail execution if tx is not signed by committee.
2021-01-29 10:50:17 +03:00
Evgeniy Stratonikov
9592f3e052
network: implement pool for Extensible
payloads
2021-01-28 17:09:06 +03:00
Evgeniy Stratonikov
153678160e
native: use majority hash only for oracles
2021-01-28 17:09:06 +03:00
Evgeniy Stratonikov
db4e7558e0
native: cache all roles in Designate
2021-01-28 17:09:05 +03:00
Evgenii Stratonikov
43e4d3af88
oracle: integrate module in core and RPC
...
1. Initialization is performed via `Blockchain` methods.
2. Native Oracle contract updates list of oracle nodes
and in-fly requests in `PostPersist`.
3. RPC uses Oracle module directly.
2021-01-28 13:00:58 +03:00
Evgenii Stratonikov
7e16bea126
network: implement Oracle module
2021-01-28 12:43:20 +03:00
Evgeniy Stratonikov
73f888f02e
core: allow to overload contract methods
...
Multiple methods with different parameter count can co-exist.
2021-01-27 12:51:07 +03:00
Roman Khimov
054ca27e9c
state: use checksums and names to calculate contract hashes
...
It allows to deploy the same NEF using one sender and get different contract
hashes. See neo-project/neo#2240 .
2021-01-22 12:22:48 +03:00
Roman Khimov
6b9b37f170
native: don't call CreateNativeContractHash() in oracle contract
...
Move oracleScript from global context to Oracle itself. We have the hash
already computed by NewContractMD, there is no need to repeat this
calculation.
2021-01-22 11:28:13 +03:00
Roman Khimov
476cbbebdc
native: make registering as a candidate cost more
...
Follow neo-project/neo#2252 .
2021-01-21 23:02:59 +03:00
Evgeniy Stratonikov
c6894f3f55
native: check for committee in setters
2021-01-21 15:20:34 +03:00
Roman Khimov
6ecc6f0422
native: call native contracts by ID instead of name
...
Fix #1666 .
2021-01-18 00:38:23 +03:00
Roman Khimov
f39ede9869
opcode: add CALLT opcode, move ABORT/ASSERT
...
Refs. #1644 . Hash compatibility test temporarily disabled, to be enabled when
it's up to date with current C# master.
2021-01-18 00:14:52 +03:00
Evgenii Stratonikov
1c0c331e25
core: update System.Contract.Call
syscall
...
1. Remove `System.Contract.CallEx`.
2. Extend number of parameters.
3. Add return value count to `VM.Context`.
2021-01-14 18:23:36 +03:00
Evgenii Stratonikov
dbe81f9b80
smartcontract: move flags to a separate package
2021-01-14 17:52:09 +03:00
Roman Khimov
36b5751262
Merge pull request #1665 from nspcc-dev/nefstate
...
Store NEF in contract state
2021-01-14 10:14:38 +03:00