Commit graph

40 commits

Author SHA1 Message Date
Anna Shaleva
b5a75b1485 scripts: add zkp examples to dependencies updator
And ignore on dependency checks, we update all the examples at once
anyway, so may safely skip the check for zkp folder.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-05 13:46:05 +03:00
Anna Shaleva
68cb07999b scripts: adjust dependency updator
We don't need these `--compat` flags anymore since 1.16 support is dropped.
2023-04-05 15:49:17 +03:00
Roman Khimov
4e7cee4e12 config: replace VerifyBlocks with SkipBlockVerification
It directly affects node security and the default here MUST BE the safe choice
which is to do the verification. Otherwise it's just dangerous, absent any
VerifyBlocks configuration we'll get an insecure node. This option is not
supposed to be frequently used and it doesn't affect the ability to process
blocks, so breaking compatibility (in a safe manner) should be OK here.
2022-12-07 17:35:56 +03:00
Roman Khimov
7589733017 config: add a special Blockchain type to configure Blockchain
And include some node-specific configurations there with backwards
compatibility. Note that in the future we'll remove Ledger's
fields from the ProtocolConfiguration and it'll be possible to access them in
Blockchain directly (not via .Ledger).

The other option tried was using two configuration types separately, but that
incurs more changes to the codebase, single structure that behaves almost like
the old one is better for backwards compatibility.

Fixes #2676.
2022-12-07 17:35:53 +03:00
Roman Khimov
0ad6e295ea core: make GetHeaderHash accept uint32
It should've always been this way because block indexes are uint32.
2022-11-25 14:30:51 +03:00
Anna Shaleva
c7ece79cb4 scripts: ignore go 1.16 compat for dependency updator script
Otherwise the following error occurs while updating dependency:
```
github.com/nspcc-dev/neo-go/examples/nft-nd-nns tested by
	github.com/nspcc-dev/neo-go/examples/nft-nd-nns.test imports
	github.com/nspcc-dev/neo-go/pkg/compiler imports
	gopkg.in/yaml.v3 tested by
	gopkg.in/yaml.v3.test imports
	gopkg.in/check.v1 imports
	github.com/kr/pretty loaded from github.com/kr/pretty@v0.1.0,
	but go 1.16 would select v0.3.0
github.com/nspcc-dev/neo-go/examples/nft-nd-nns tested by
	github.com/nspcc-dev/neo-go/examples/nft-nd-nns.test imports
	github.com/nspcc-dev/neo-go/pkg/compiler imports
	gopkg.in/yaml.v3 tested by
	gopkg.in/yaml.v3.test imports
	gopkg.in/check.v1 imports
	github.com/kr/pretty imports
	github.com/kr/text loaded from github.com/kr/text@v0.1.0,
	but go 1.16 would select v0.2.0

To upgrade to the versions selected by go 1.16:
	go mod tidy -go=1.16 && go mod tidy -go=1.17
If reproducibility with go 1.16 is not needed:
	go mod tidy -compat=1.17
For other options, see:
	https://golang.org/doc/modules/pruning
```
2022-09-23 09:05:08 +03:00
Anna Shaleva
f1fbd6ad4b scripts: update dependency-updator script
Include Oracle contract to the list of contracts to be updated.
2022-09-16 20:33:48 +03:00
Roman Khimov
f749aaff3c *: reuse smartcontract package to create standard entry scripts 2022-07-26 12:19:49 +03:00
Roman Khimov
8c668765d2 rpc/client: move to pkg/rpcclient
Better package name, closer to user.
2022-07-21 22:39:53 +03:00
Roman Khimov
51868d8161 compare-states: add ignore-height flag and some tolerance to diff 2022-05-12 12:18:06 +03:00
Roman Khimov
74877383c3 compare-states: return 1 when the state is different
And don't pring usage.
2022-05-12 12:05:38 +03:00
Roman Khimov
84c231757b compare-states: return 0 in case state matches 2022-05-12 12:03:54 +03:00
Anna Shaleva
2096ad6e81 *: remove io/ioutil uses
Close #1764.
2022-03-17 19:39:18 +03:00
Evgeniy Stratonikov
44de29bcf0 scripts: add script for updating pkg/interop dependencies
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-03-15 17:15:40 +03:00
Evgeniy Stratonikov
6787db8a62 .github: extend interop deps check
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-03-15 17:15:40 +03:00
Roman Khimov
1df447cd68
Merge pull request #2334 from nspcc-dev/extendable-validators
Extendable validators
2022-02-01 12:09:56 +03:00
Roman Khimov
cda1c75db3 core: drop GetStandBy* methods
They're misleading now that we have variable number of committee
members/validators. The standby list can be seen in the configuration and the
appropriate numbers can be received from it also.
2022-01-31 23:14:38 +03:00
Roman Khimov
64fb9218dd
Merge pull request #2339 from nspcc-dev/compare-states
scripts: add compare-states, related to #2337
2022-01-31 11:51:43 +03:00
Roman Khimov
d1a9aa1d0d scripts: add compare-states, related to #2337
Allows to quickly find the bad block and compare application
logs. Theoretically could also walk through the MPT to find the difference
there, but it's not needed now.
2022-01-26 10:11:19 +03:00
Roman Khimov
b011af4723 scripts: move compare-dumps into a package of its own
We can't have multiple *.go scripts in one directory anyway without tests
going wild.
2022-01-26 10:11:19 +03:00
Evgeniy Stratonikov
e7a0ecb349 compiler: provide .go filename to Compile
First argument contains filename, thus we use '.go' suffix to
distinguish between directories and files.
Contract name should be provided in options.

Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-20 13:21:24 +03:00
Roman Khimov
36d486a664 config: add InitialGASSupply, fix #2073
We now have 52M by default.
2021-07-20 16:59:54 +03:00
Roman Khimov
f1f30fd0c5 gendump: fix errcheck warning
scripts/gendump/main.go:95:13: Error return value of `rand.Read` is not checked (errcheck)
                        rand.Read(key)
                                 ^
scripts/gendump/main.go:96:13: Error return value of `rand.Read` is not checked (errcheck)
                        rand.Read(value)
                                 ^
2021-05-12 20:18:11 +03:00
Anna Shaleva
ab53d5dfa5 scripts: increase sysfee for tx execution in gendump script 2021-05-11 18:36:30 +03:00
Anna Shaleva
f0324a1230 scripts: add test for compare-dumps script 2021-03-29 15:49:46 +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
0a5072a1da core: allow to compile test contracts with yaml config
And refactored Rubl test contract (it should support NEP-17 and
onNEP17Payment).
2021-03-22 15:32:26 +03:00
Anna Shaleva
cdaca7be3e core: use Neo.Crypto.CheckSig for standard signature verification 2021-03-10 21:45:58 +03:00
Evgeniy Stratonikov
f83b376181 block: replace Base with Header 2021-03-10 13:38:44 +03:00
Evgeniy Stratonikov
2f490a3403 block: remove ConsensusData field 2021-03-10 13:38:44 +03:00
Evgeniy Stratonikov
bf20db09e0 stateroot: move state-root related logic to core/stateroot 2021-03-09 13:48:29 +03:00
Anna Shaleva
5e9d05b9af scripts: ignore ledger items while comparing dumps 2021-02-12 23:48:26 +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
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
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
Roman Khimov
0e2784cd2c always wrap errors when creating new ones with fmt.Errorf()
It doesn't really change anything in most of the cases, but it's a useful
habit anyway.

Fix #350.
2020-08-07 12:21:52 +03:00
Roman Khimov
b0c063aaaf scripts: replace compare-dumps with go version
It's a bit faster and it's also updated to handle block 0. Usage:
   $ go run scripts/compare-dump.go a b
With the same functionality as the old script.
2020-06-24 16:11:34 +03:00
Evgenii Stratonikov
a1fecd2e88 cli: add script for comparing storage dumps
It uses jq to normalize and compare json dumps.
2020-02-12 12:16:31 +03:00