Anna Shaleva
ce35e69460
rpc: update testdata
...
Fix failing historic test.
2022-05-06 13:46:17 +03:00
Anna Shaleva
0d0659cadf
examples: update neo-go dependency
2022-05-06 13:45:58 +03:00
Anna Shaleva
8802dcf054
gomod: update interop dependency
2022-05-06 13:44:21 +03:00
Anna Shaleva
5123b88c36
core: extend native Neo interop API
...
Add GetAllCandidates and GetCandidateVote methods.
2022-05-06 13:43:12 +03:00
Anna Shaleva
5e2a81ad03
interop: fix the signature of Neo's GetCandidates interop API
2022-05-06 13:43:12 +03:00
Anna Shaleva
2a8ffd9318
core: refactor (*NEO).GetCandidates and add (*NEO).GetAllCandidates
2022-05-06 13:43:12 +03:00
Roman Khimov
75d06d18c9
Merge pull request #2466 from nspcc-dev/rules-fixes
...
Rules scope fixes
2022-05-06 11:09:39 +03:00
Roman Khimov
acb1151d71
transaction: fix maxSubitems handling in JSON scope unmarshaller
...
Notice that binary deserializer (readArrayOfConditions) does it correctly. Can
be checked with neo-project/neo#2720 case.
2022-05-06 10:20:55 +03:00
Roman Khimov
bd352daab4
transaction: fix Rules stringer, it's WitnessRules in C#
...
See neo-project/neo#2720 .
2022-05-06 10:08:09 +03:00
Roman Khimov
7b1943a6e5
rpc/server: return original error for invoke* param errors
2022-05-06 10:07:34 +03:00
Roman Khimov
740488f7f3
Merge pull request #2442 from EliChin/feature/eng_review
...
English Check
2022-05-05 17:12:37 +03:00
Elizaveta Chichindaeva
28908aa3cf
[ #2442 ] English Check
...
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-05-04 19:48:27 +03:00
Roman Khimov
58bda8be78
Merge pull request #2461 from nspcc-dev/rpc-json-error-in-exception
...
rpc: signal JSON marshalling errors through exception
2022-05-04 17:22:05 +03:00
Roman Khimov
4adb2b95c1
Merge pull request #2462 from nspcc-dev/block-destroyed
...
core: block destroyed contracts and restrict maximum contract updates
2022-05-04 14:43:51 +03:00
Anna Shaleva
ffdcdf4a95
core: restrict the maximum number of contract updates
2022-05-04 13:56:52 +03:00
Anna Shaleva
42e4021898
core: block destroyed contracts
2022-05-04 13:56:45 +03:00
Roman Khimov
930c439900
rpc: signal JSON marshalling errors through exception
...
See neo-project/neo-modules#696 . Unmarshaller is left unchanged to be
compatible.
2022-05-04 13:13:21 +03:00
Roman Khimov
7f8b259994
Merge pull request #2457 from nspcc-dev/t5-testnet
...
T5 testnet
2022-05-04 10:44:55 +03:00
Roman Khimov
3c0ee9c3a3
config: switch to T5 testnet
...
See neo-project/neo-node#852 , neo-project/neo-node#859 .
2022-05-04 10:22:27 +03:00
Roman Khimov
450ca61a4e
config: tune max block sysfee/size and number of tx
...
See neo-project/neo-modules#688 , neo-project/neo-node#850 and
neo-project/neo-modules#703 .
2022-05-04 10:21:55 +03:00
Roman Khimov
bde0a4367f
Merge pull request #2456 from nspcc-dev/oracle-2-redirections
...
oracle: limit the number of redirections to 2
2022-05-04 10:10:56 +03:00
Roman Khimov
f9c7693677
oracle: limit the number of redirections to 2
...
Be compatible with neo-project/neo-modules#698 .
2022-05-03 23:18:53 +03:00
Roman Khimov
19eb976166
Merge pull request #2455 from nspcc-dev/pass
...
cli: unify password-related prompts
2022-04-29 18:46:29 +03:00
Anna Shaleva
79f377d0f0
cli: ensure wallet is non-empty while changing password
...
Close #2429 .
2022-04-29 18:42:42 +03:00
Anna Shaleva
19e4c679d3
cli: unify password-related prompts
...
Close #2419 .
2022-04-29 18:35:26 +03:00
Roman Khimov
83f8ecf2e0
Merge pull request #2431 from nspcc-dev/rpc/historicall
...
rpc: support historic calls
2022-04-29 18:24:51 +03:00
Anna Shaleva
473955c2d6
core: use proper current block height/hash for interop API
2022-04-29 18:00:46 +03:00
Anna Shaleva
9cc41528ef
core: avoid unnecessary NEO cached values copying
2022-04-29 16:10:04 +03:00
Anna Shaleva
335c1ee369
core: optimize access to NEO cache
...
Do not copy RW cache each block. Instead we should get RO cache and
change it only if there's a necessity.
2022-04-29 16:10:04 +03:00
Anna Shaleva
a6a0c1eb12
core: avoid lock copy in private DAO constructor
...
Fix the following linter warning:
```
pkg/core/dao/dao.go:101:7 govet copylocks: assignment copies lock value to *d: github.com/nspcc-dev/neo-go/pkg/core/dao.Simple contains sync.RWMutex
```
2022-04-29 16:10:04 +03:00
Anna Shaleva
8d2d48f360
core: move native cache from MemCachedStore to DAO
2022-04-29 16:10:04 +03:00
Anna Shaleva
b77b412b04
core: refactor signature of (*NEO).dropCandidateIfZero
...
It never returns an error.
2022-04-29 16:10:04 +03:00
Anna Shaleva
c36448f27e
core: don't reset NEO's registerPrice cache
2022-04-29 16:10:04 +03:00
Anna Shaleva
adec635f0e
core: don't reset NEO's gasPerBlock cache
2022-04-29 16:10:04 +03:00
Anna Shaleva
35d160075d
core: keep Policy cache always valid and up-to-date
2022-04-29 16:10:04 +03:00
Anna Shaleva
78b584053d
core: keep Oracle cache always valid and up-to-date
2022-04-29 16:10:04 +03:00
Anna Shaleva
0f6bf33f86
core: keep Notary cache always valid and up-to-date
2022-04-29 16:10:04 +03:00
Anna Shaleva
27b0193da0
core: use native cache to check whether the same contract exists on deploy
2022-04-29 16:10:04 +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
11ab42d91c
core: keep Designation cache always valid and up-to-date
...
Always use cache instead of DAO where possible. Update cache in-place
each time new designated node is chosen.
2022-04-29 16:10:04 +03:00
Anna Shaleva
c8bdd2ad1a
core: remove Persist from NativeCache interface
...
Lower native cache should be assigned to the upper's value during persist.
2022-04-29 16:10:04 +03:00
Anna Shaleva
8ec8511d9d
core: remove mutexes and atomic values from native cache
...
Native cache is always wrapped into independant layers, so concurrent
RW access is no-op.
2022-04-29 16:10:04 +03:00
Anna Shaleva
7b632c8ee8
core: refactor natives cache
...
1. Use layered natives cache. With layered cache the storeblock
process includes the following steps: create a wrapper over
current nativeCache, put changes into upper nativeCache layer,
persist (or discard) changes.
2. Split contract getters to read-only and read-and-change. Read-only
ones doesn't require the copy of an existing nativeCache item.
Read-and-change ones create a copy and after that change the copy.
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
Anna Shaleva
812fa3f76a
core: initialize NEO config cache in constructor
...
It isn't changed within the contract lifetime, thus initialisation can be
safely performed in constructor.
2022-04-29 16:10:04 +03:00
Anna Shaleva
e63d6aeff7
core: move natives cache initialisation to a separate method
2022-04-29 16:10:04 +03:00
Anna Shaleva
93fde3b4e6
core: fix typo in TestCreateBasicChain
2022-04-29 16:10:04 +03:00
Anna Shaleva
63c26ca270
core, rpc: support [invokefunction, invokescript, invokecontractverify]historic
2022-04-29 16:10:04 +03:00
Anna Shaleva
f8b5972f61
core: support Store interface over MPT
2022-04-29 16:10:04 +03:00
Anna Shaleva
0cf525d62e
core: add ability to traverse backwards for Billet
2022-04-29 16:10:04 +03:00