Commit graph

23 commits

Author SHA1 Message Date
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