Commit graph

4722 commits

Author SHA1 Message Date
Roman Khimov
7366d45985 rpc: add GetStateHeight to client 2021-07-22 21:13:44 +03:00
Roman Khimov
a188d20fd1 rpc: fix getstateheight result compatibility
C#:
   "result" : {
      "localrootindex" : 11623,
      "validatedrootindex" : 11623
   }

Go:
   "result" : {
      "blockHeight" : 11627,
      "stateHeight" : 11627
   }
2021-07-22 21:13:44 +03:00
Roman Khimov
a8a6c8c13d query: display zeroes for unknown addresses
This:
        Voted: null
        Amount : 0
        Block: 0

is better than this:
failed to convert account state from stackitem: invalid stackitem length
2021-07-22 21:13:44 +03:00
Roman Khimov
fde3cce93d cli/query: output key in voter data
People vote for keys, not addresses.
2021-07-22 21:13:44 +03:00
Roman Khimov
24ee8fab5c cli: move wallet candidate getstate into query voter
This command has nothing to do with wallets.
2021-07-22 21:13:44 +03:00
Roman Khimov
753e61bcff cli/query: add 'candidates' and 'committee', fix #2067 2021-07-22 21:13:44 +03:00
Roman Khimov
14a52c9e1b
Merge pull request #2087 from nspcc-dev/update-dependencies
Update dependencies
2021-07-22 14:30:33 +03:00
Roman Khimov
ede410a4a7 go.mod: update ishell package
It only adds go.mod and changes import path, that's it.
2021-07-21 23:28:26 +03:00
Roman Khimov
b3880ab5d8 go.mod: update x/text package
New unicode and things, nothing really interesting for us.
2021-07-21 23:28:26 +03:00
Roman Khimov
f7b8fd522d go.mod: update x/term package
It supposedly fixes some Windows and Solaris problem, but this commit is
deliberately taken before the package switches to Go 1.17 (as we still need
older versions).
2021-07-21 23:28:26 +03:00
Roman Khimov
19495ae631 go.mod: update x/crypto package
We're only using RIPEMD160 and Scrypt from it, Scrypt was updated slightly.
2021-07-21 23:28:26 +03:00
Roman Khimov
4ddea2ce74 go.mod: update zap library
There was a number of fixes, let's have them as well.
2021-07-21 23:28:26 +03:00
Roman Khimov
fcbf30e5e9 go.mod: update Uber's atomic library
They've managed to fix some bug there. And added new types which we don't
currently need, but anyway.
2021-07-21 23:28:26 +03:00
Roman Khimov
ae651df312 go.mod: update bbolt
Some minor fixes/optimizations.
2021-07-21 23:28:26 +03:00
Roman Khimov
c4603443e0 go.mod: update cli library
Something was fixed there, OK.
2021-07-21 23:28:26 +03:00
Roman Khimov
4aff5e673e go.mod: update goleveldb
We were using some version from 2018 and there was a big number of fixes
and optimizations since then. It's not managed well though, current 1.0.0 tag
is 2019, so we're using latest and greatest here.
2021-07-21 23:28:26 +03:00
Roman Khimov
099e7cee02 go.mod: update Prometheus client and YAML package
Prometheus is somehow better (isn't noticeably probably), but it also
wants at least 2.3.0 YAML package, so update it to 2.4.0 which fixes some
important bug wrt v2 line (maybe we need to migrate to v3 though)/
2021-07-21 23:28:26 +03:00
Roman Khimov
c4df3ec5b9 go.mod: update lz4 library
Nothing special there.
2021-07-21 23:28:26 +03:00
Roman Khimov
f9d8573eda go.mod: update base58 library
Some trivial optimizations and document updates, nothing substantial.
2021-07-21 23:28:26 +03:00
Roman Khimov
08be9e5955 go.mod: update redis slightly
redis library itself is at v8 already, but I'm not sure we can reliably test
it quickly, so just apply some minor fixes.
2021-07-21 23:28:26 +03:00
Roman Khimov
350c5b3a59 go.mod: update btcd to 0.22.0-beta
We're using btcec for Koblitz curve implementation from it and there were some
important fixes.
2021-07-21 23:28:26 +03:00
Roman Khimov
002ad9dfee go.mod: update miniredis to 2.15.1
It's only used for testing purposes and this version doesn't change anything
for us, but still better be current.
2021-07-21 23:28:26 +03:00
Roman Khimov
4d1e952be6 go.mod: update go-datastructures to 1.0.53
We're only using queue library and it didn't change in any way, but 1.0.53 has
proper go.mod, so it's still an improvement.

It at the same time pulls some new packages also like x/tools.
2021-07-21 23:28:00 +03:00
Roman Khimov
520133aee2
Merge pull request #2083 from nspcc-dev/fix-panic-on-nonce-setting
consensus: fix nonce handling
2021-07-21 19:34:21 +03:00
Roman Khimov
e040b51aa8
Merge pull request #2082 from nspcc-dev/fix-query
Fix query command
2021-07-21 19:09:05 +03:00
Roman Khimov
4d2ecab16f consensus: fix nonce handling
It was broken somewhere between 2f490a3403 and
85ce207f40 leading to panic on watch only node:

2021-07-21T16:21:39.201+0200    INFO    received Commit {"validator": 3}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xbcc59e]

goroutine 486 [running]:
github.com/nspcc-dev/neo-go/pkg/consensus.(*service).newBlockFromContext(0xc0001629a0, 0xc000308000, 0xc0010fa000, 0x2cb417800)
        github.com/nspcc-dev/neo-go/pkg/consensus/consensus.go:664 +0xbe
github.com/nspcc-dev/dbft.(*Context).MakeHeader(...)
        github.com/nspcc-dev/dbft@v0.0.0-20210302103605-cc75991b7cfb/context.go:270
github.com/nspcc-dev/dbft.(*DBFT).onCommit(0xc000308000, 0x138c998, 0xc000115110)
        github.com/nspcc-dev/dbft@v0.0.0-20210302103605-cc75991b7cfb/dbft.go:487 +0x575
github.com/nspcc-dev/dbft.(*DBFT).OnReceive(0xc000308000, 0x138c998, 0xc000115110)
        github.com/nspcc-dev/dbft@v0.0.0-20210302103605-cc75991b7cfb/dbft.go:251 +0xef5
github.com/nspcc-dev/neo-go/pkg/consensus.(*service).eventLoop(0xc0001629a0)
        github.com/nspcc-dev/neo-go/pkg/consensus/consensus.go:312 +0x7d6
created by github.com/nspcc-dev/neo-go/pkg/consensus.(*service).Start
        github.com/nspcc-dev/neo-go/pkg/consensus/consensus.go:262 +0xdc

In fact, nonce is correctly provided by dbft library (since Legacy), we just
need to use it here.
2021-07-21 19:06:19 +03:00
Roman Khimov
b7bfaa6d09 cli/query: print addresses instead of script hashes
They're more familiar to users.
2021-07-21 18:49:58 +03:00
Roman Khimov
7fc3689b48 cli/query: provide better help messages 2021-07-21 18:26:58 +03:00
Roman Khimov
0415e6dc10 cli/query: use application log for vm state
C# node doesn't return VMState data, so it leads to "false" being printed for
successful transactions.
2021-07-21 18:25:10 +03:00
Roman Khimov
7d6898677b keys: trivial code simplification 2021-07-21 17:05:49 +03:00
Roman Khimov
5acdcfb8a4 CHANGELOG: release 0.96.0 2021-07-21 16:57:08 +03:00
Roman Khimov
e3f19dd242
Merge pull request #2081 from nspcc-dev/mainnet-config-update
config: update mainnet magic
2021-07-21 15:03:58 +03:00
Roman Khimov
df07ba505a config: update mainnet magic
It's NEO3, see neo-project/neo-node#795.
2021-07-21 14:42:26 +03:00
Roman Khimov
a9db1a2d2e
Merge pull request #2080 from nspcc-dev/improve-candidate-registering
Improve candidate registering
2021-07-21 14:26:54 +03:00
Roman Khimov
5fbb60a9ed cli/wallet: request candidate registration price
Hardcoding 1000 is wrong. Inspired by neo-project/neo-node#788.
2021-07-21 12:26:35 +03:00
Roman Khimov
5bdcd4c241 client: add GetCandidateRegisterPrice method
It's important for clients.
2021-07-21 12:19:55 +03:00
Roman Khimov
5b45a4ca8d
Merge pull request #2079 from nspcc-dev/update-testnet-config
config: update testnet config for RC4
2021-07-21 11:26:57 +03:00
Roman Khimov
e9acc5dd63 config: update testnet config for RC4
See neo-project/neo-node#794.
2021-07-21 11:10:19 +03:00
Roman Khimov
bf176fb637
Merge pull request #2070 from nspcc-dev/cli-query
cli: add `query tx` command, close #2069
2021-07-20 18:14:11 +03:00
Evgeniy Stratonikov
4861569ab6 docs: add query tx info
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-07-20 18:03:51 +03:00
Evgeniy Stratonikov
7d2d9e96ef cli: add query tx command, fix #2069
Implement a way to check if tx has been persisted on blockchain and
to get general info about transaction. Much more convenient than
handwritten curl queries.

Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-07-20 18:03:50 +03:00
Roman Khimov
35c2c3ae8e
Merge pull request #2078 from nspcc-dev/configurable-initial-gas
config: add InitialGASSupply, fix #2073
2021-07-20 17:10:25 +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
caf07c1ee7
Merge pull request #2076 from nspcc-dev/fix-occasional-bolt-test-failures
Improve temp file/dir handling in tests
2021-07-20 16:53:54 +03:00
Roman Khimov
60057756e8
Merge pull request #2077 from nspcc-dev/new-testnet-magic
config: update testnet magic for RC4
2021-07-20 16:53:34 +03:00
Roman Khimov
f9a9d15490 config: update testnet magic for RC4
See neo-project/neo-node#798 and https://github.com/neo-project/neo-node/releases/tag/v3.0.0-rc4
2021-07-20 13:16:38 +03:00
Roman Khimov
0583f252ab *: create real temporary dirs and files in tests
Improve reliability.
2021-07-20 12:51:11 +03:00
Roman Khimov
3b19b34122 storage: fix memcached test with boltdb store
Everything was wrong here, wrong file used, wrong cleanup procedure, the net
result is this (and some failing tests from time to time):

  $ ls -l /tmp/test_bolt_db* | wc -l
  30939
2021-07-20 12:35:24 +03:00
Roman Khimov
c88ebaede9
Merge pull request #2075 from nspcc-dev/small-refactoring
Array util refactoring and naming improvement
2021-07-20 11:29:59 +03:00
Roman Khimov
7477e2cd9f
Merge pull request #2074 from nspcc-dev/fix-oracle-service-behaviour
Fix oracle service behaviour
2021-07-20 11:29:39 +03:00