Anna Shaleva
1d189fd90c
Revert "native: ignore decoding errors during cache init"
...
This reverts commit 822722bd2e
.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-22 19:39:03 +03:00
Anna Shaleva
474225d425
core, rpcsrv: apply generic attributes fee logic to NotaryServiceFeePerKey
...
Remove related methods from native Notary and add relevant code to native
Policy.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-21 13:42:56 +03:00
Roman Khimov
fff7e91709
dao: simplify NewSimple()
...
We no longer need P2PSigExtension flag here, conflicts attribute is a part
of the normal protocol.
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-09-04 16:56:59 +03:00
Anna Shaleva
50ee241377
core: move strict script check on deploy under HF condition
...
Follow the https://github.com/neo-project/neo/pull/2881 .
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-08-09 18:32:30 +03:00
Anna Shaleva
33c971b0e4
core: add InitializeCache method to Contract interface
...
Make the contracts cache initialization unified. The order of cache
iniitialization is not important and Nottary contract is added to the
bc.contracts.Contracts wrt P2PSigExtensions setting, thus no functional
changes, just refactoring for future applications.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-04-26 12:57:48 +03:00
Roman Khimov
970862765d
native: implement management.getContractById
...
Follow neo-project/neo#2807 . Notice that this data is not cached, our previous
implementation wasn't too and it shouldn't be a problem (not on the hot path).
2022-12-02 10:21:08 +03:00
Roman Khimov
822722bd2e
native: ignore decoding errors during cache init
...
Bad contract -> no contract. Unfortunately we've got a broken
6f1837723768f27a6f6a14452977e3e0e264f2cc contract on the mainnet which can't
be decoded (even though it had been saved successfully), so this is a
temporary fix for #2801 to be able to start mainnet node after shutdown.
2022-11-16 12:00:28 +03:00
Anna Shaleva
bd6bb9e9e2
core: allow to reset blockchain state
2022-11-10 18:08:17 +03:00
Anna Shaleva
42e4021898
core: block destroyed contracts
2022-05-04 13:56:45 +03:00
Anna Shaleva
c0b490c7bf
core: keep Management cache always valid and up-to-date
2022-04-29 16:10:04 +03:00
Anna Shaleva
aa886f67ce
core: use dao-binded cache for native contracts
...
All native cached values are binded to DAO, so that it's possible
to properly handle historic calls.
2022-04-29 16:10:04 +03:00
Roman Khimov
9d2ef775cf
storage: simplify (*MemCachedStore).Put/Delete interface
...
They never return errors, so their interface should reflect that. This allows
to remove quite a lot of useless and never tested code.
Notice that Get still does return an error. It can be made not to do that, but
usually we need to differentiate between successful/unsuccessful accesses
anyway, so this doesn't help much.
2022-02-16 18:24:20 +03:00
Roman Khimov
ce9d0b22cf
*: use NEP-XX naming consistently in docs/comments
...
Standards are NEP-11 and NEP-17, not NEP11, not NEP17, not anything
else. Variable/function names of course can use whatever fits, but documents
and comments should be consistent wrt this.
2021-11-19 12:58:46 +03:00
Anna Shaleva
4b35a1cf92
core: remove conflicting transactions wrt MaxTraceableBlocks
2021-08-18 13:31:47 +03:00
Roman Khimov
50ee1a1f91
*: don't use dao.Cached in tests
...
There is no need to use it.
2021-08-11 21:02:50 +03:00
Anna Shaleva
c0a2c74e0c
core: maintain a set of NEP17-compliant contracts
2021-07-28 13:22:53 +03:00
Roman Khimov
e9cefc4bfc
*: fix all errcheck warnings in testing code
2021-05-12 21:45:12 +03:00
Roman Khimov
b3f9cd1541
dao: drop network from DAO
...
Not used any more.
2021-03-26 13:45:18 +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
Evgeniy Stratonikov
6ca7b4b966
interop: rename ContractID
to ID
...
Helps further refactoring, see next commit.
2021-02-11 12:27:43 +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
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
Anna Shaleva
a2715404d0
core: serialise manifest as stackitem
2021-02-05 19:10:15 +03:00
Anna Shaleva
260bcd373c
core: store initial native values into DAO
2021-02-05 10:43:17 +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
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
Evgenii Stratonikov
3397f2c9be
native: cache contract in Management contract
2020-12-18 13:11:17 +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