Commit graph

34 commits

Author SHA1 Message Date
Roman Khimov
f96d9d168e native/interop: use oracle request signers for oracle response witness
Oracle responses must use the same set of signers as oracle requests even
though the transaction itself is signed by oracle nodes/contract.

We can probably improve interop.Context by removing Tx field completely and
adding more functionality to Container, but it's not very convenient for
VerifyWitness and will require adding more stub-like methods for Block, so Tx
is used for now (and we do have it in every relevant case).
2021-11-16 11:51:15 +03:00
Evgeniy Stratonikov
fdb54f2dc3 core/test: get rid of empty tx scripts
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-07-15 15:58:49 +03:00
Roman Khimov
0de949b575 stackitem: remove Item/StackItem from function names
They're useless in a package named 'stackitem', make this package a bit more
user-friendly.
2021-07-06 19:56:23 +03:00
Roman Khimov
95c279325a block: drop Network from the Header
It's not network-tied any more, network is only needed to
sign/verify. Unfortunately we still have to keep network in consensus data
structures because of dbft library interface.
2021-03-26 13:45:18 +03:00
Roman Khimov
d314f82db3 transaction: drop Network from Transaction
We only need it when signing/verifying.
2021-03-26 13:45:18 +03:00
Anna Shaleva
681bd89cc7 core: move native node roles to a separate pkg
We need this to avoid `native` dependency in the RPC client.
2021-03-23 13:56:34 +03:00
Evgeniy Stratonikov
256cd09228 native: allow to set oracle request price 2021-03-11 10:12:30 +03:00
Anna Shaleva
14ade42101 core: remove System.Binary.[Serialize, Deserialize] syscalls
And move their tests to native StdLib.
2021-03-10 19:24:19 +03:00
Evgeniy Stratonikov
55698d0426 dao: use raw state.StorageItem instead of pointer
It is now a slice, there is no need for additional indirection.
2021-03-09 12:11:25 +03:00
Anna Shaleva
2c81fc8b8e *: upgrade tests to use T.Cleanup() 2021-03-01 17:08:00 +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
Anna Shaleva
260bcd373c core: store initial native values into DAO 2021-02-05 10:43:17 +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
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
Evgeniy Stratonikov
0b26b46234 state: store NEF instead of script for contract
NEFs for native contracts are set statically, thus
field values are taken from the reference implementation.
2021-01-13 15:34:10 +03:00
Anna Shaleva
31b06907c9 core: restrict allowed Oracle callbacks 2020-12-17 11:41:28 +03:00
Roman Khimov
cb5ecaefe7 native: drop OnPersistEnd
Now that PostPersist is being run for every native contract we can do our
dirty caching tricks right there instead of OnPersistEnd.
2020-12-14 15:24:15 +03:00
Roman Khimov
ab12eee346 native: move contract deployment to management contract
See neo-project/neo#2119.
2020-12-14 15:23:46 +03:00
Roman Khimov
1cf1fe5d74 *: introduce stable contract hashes
Follow neo-project/neo#2044.
2020-11-27 21:47:08 +03:00
Roman Khimov
b92ea2a48a manifest/compiler: drop hashes from ABI and debug info
See neo-project/neo-devpack-dotnet#391 and neo-project/neo#2044.
2020-11-26 18:30:49 +03:00
Anna Shaleva
9faa63453c core: refactore some tests
They have a lot of common code.
2020-11-25 18:37:29 +03:00
Evgenii Stratonikov
67f26859a8 scripts: implement script for creating dumps
This is useful for creating dumps providing various load
to benchmark restore or check compatibility with C# nodes.

Related #1472.
2020-11-24 16:47:33 +03:00
Evgenii Stratonikov
7d91a3a89e pkg: move internal/ package to the root directory
This way we can use it in scripts and cli.
2020-11-24 16:39:56 +03:00
Evgenii Stratonikov
c849176be7 manifest: include contract Name 2020-11-24 11:23:44 +03:00
Evgenii Stratonikov
1869d6d460 core: allow to use state root in header 2020-11-20 17:16:32 +03:00
Roman Khimov
eef921b8e0 native: allow NULL filter in oracle requests
Follow neo-project/neo#2067
2020-11-18 23:59:13 +03:00
Roman Khimov
286d9185f4 smartcontract: remove contract features
We're featureless now, all contracts have access to storage and payable status
is to be determined via new NEP. Follow neo-project/neo#2060.
2020-11-13 21:26:23 +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
Evgenii Stratonikov
b2a3a0851e emit: accept multiple opcodes in Opcode() 2020-10-06 18:03:25 +03:00
Evgenii Stratonikov
c468c02ef5 native: implement Designate contract 2020-10-02 11:03:25 +03:00
Roman Khimov
53c9690bdc interop/runtime: allow calling script hash to pass CheckWitness
See neo-project/neo#1924 and neo-project/neo#1925.
2020-09-29 09:56:19 +03:00
Evgenii Stratonikov
bd1790bddf native: cache oracle nodes 2020-09-25 17:34:11 +03:00
Evgenii Stratonikov
141d6e325f native: implement basis for oracle contract 2020-09-25 17:34:11 +03:00