Roman Khimov
c489f975d4
core: fix TestSubscriptions occasional failures
...
panic: Log in goroutine after TestSubscriptions has completed
goroutine 1079 [running]:
testing.(*common).logDepth(0xc00057a100, 0xc00039e210, 0xa4, 0x3)
/usr/local/go/src/testing/testing.go:634 +0x51a
testing.(*common).log(...)
/usr/local/go/src/testing/testing.go:614
testing.(*common).Logf(0xc00057a100, 0xe32eaa, 0x2, 0xc0009560e0, 0x1, 0x1)
/usr/local/go/src/testing/testing.go:649 +0x91
go.uber.org/zap/zaptest.testingWriter.Write(0xf64120, 0xc00057a100, 0x0, 0xc0003fe400, 0xa5, 0x400, 0xc000958e40, 0xc0009560d0, 0xc000958e60)
/go/pkg/mod/go.uber.org/zap@v1.10.0/zaptest/logger.go:130 +0x120
go.uber.org/zap/zapcore.(*ioCore).Write(0xc0005cd050, 0x0, 0xbfb54ffc0626aba2, 0x916de700, 0x1485500, 0x0, 0x0, 0xe43fb0, 0x1c, 0x0, ...)
/go/pkg/mod/go.uber.org/zap@v1.10.0/zapcore/core.go:90 +0x1c5
go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc000102d10, 0xc00039a000, 0x5, 0x5)
/go/pkg/mod/go.uber.org/zap@v1.10.0/zapcore/entry.go:215 +0x1e8
go.uber.org/zap.(*Logger).Info(0xc00035eba0, 0xe43fb0, 0x1c, 0xc00039a000, 0x5, 0x5)
/go/pkg/mod/go.uber.org/zap@v1.10.0/logger.go:187 +0x96
github.com/nspcc-dev/neo-go/pkg/core.(*Blockchain).persist(0xc00000cb40, 0xc00017c2c0, 0xbe8a00)
/go/src/github.com/nspcc-dev/neo-go/pkg/core/blockchain.go:839 +0x6c9
github.com/nspcc-dev/neo-go/pkg/core.(*Blockchain).Run.func2(0xc00000cb40, 0xc0005c6c30)
/go/src/github.com/nspcc-dev/neo-go/pkg/core/blockchain.go:302 +0x54
created by github.com/nspcc-dev/neo-go/pkg/core.(*Blockchain).Run
/go/src/github.com/nspcc-dev/neo-go/pkg/core/blockchain.go:301 +0x25d
FAIL github.com/nspcc-dev/neo-go/pkg/core 2.463s
2020-06-25 19:41:17 +03:00
Roman Khimov
e97c153a26
docs: add neox documentation
2020-06-25 17:05:10 +03:00
Roman Khimov
d8556b80bc
interop: fix key recovery functions documentation
...
Follow 7d786fac79
update.
2020-06-25 14:30:53 +03:00
Roman Khimov
3ccf19fc1e
Merge pull request #1097 from nspcc-dev/fix/mpt
...
core,dao: use MPT only if it is enabled in config
2020-06-24 16:18:59 +03:00
Evgenii Stratonikov
2b21102c14
core,dao: use MPT only if it is enabled in config
2020-06-24 16:13:27 +03:00
Roman Khimov
fbadb317f5
Merge pull request #1096 from nspcc-dev/neox-2.x
...
Neox 2.x
2020-06-24 16:08:19 +03:00
Roman Khimov
25fdc62203
core: add state height to prometheus metrics
2020-06-24 14:47:08 +03:00
Roman Khimov
ea17793aee
core: fix unconditional MPT collapsing
...
It should depend on EnableStateRoot.
2020-06-24 14:41:57 +03:00
Roman Khimov
6d5e70163d
Revert "Makefile: add neox suffix to neox-2.x branch"
...
This reverts commit 806b28aab7
, we're merging to
master-2.x now.
2020-06-24 14:37:16 +03:00
Roman Khimov
03977083c0
Merge pull request #1095 from nspcc-dev/update-dbft-neox-2.x
...
consensus: update dbft library (neox-2.x)
2020-06-24 14:32:06 +03:00
Roman Khimov
cce4380eee
Merge pull request #1090 from nspcc-dev/feature/protocol
...
Enable state root exchange base on config
2020-06-24 13:47:47 +03:00
Roman Khimov
86110445a6
consensus: update dbft library
...
Pick up the following changes:
* recovery message sending fix
* tx re-requests on sendRecoveryRequest
* proposed block checks fix
* timeout calculation fix for InitializeConsensus
* removal of TxPerBlock which is irrelevant for neo-go (policying is done by
the node, not dbft library)
2020-06-24 13:39:12 +03:00
Evgenii Stratonikov
9ee9cb8e39
core: provide key recovery interops only if neox is enabled
2020-06-24 12:37:27 +03:00
Evgenii Stratonikov
b5fb63d091
*: specify first state root index in config
2020-06-24 12:37:27 +03:00
Evgenii Stratonikov
d128b55dbf
*: add config flag for enabling state root feature
2020-06-24 12:37:27 +03:00
Evgenii Stratonikov
c06b3b669d
io: make maxArraySize public
2020-06-24 12:14:33 +03:00
Evgenii Stratonikov
bc81b56708
consensus: fix decodeData doc-comment
2020-06-24 10:47:44 +03:00
Roman Khimov
2cddeadd9a
Merge pull request #1089 from nspcc-dev/fix/docker-startup
...
docker: fix shell condition check in entrypoint script
2020-06-23 16:42:39 +03:00
alexvanin
423495ecc3
docker: fix shell condition check in entrypoint script
2020-06-23 12:08:49 +03:00
Evgenii Stratonikov
2863343f03
consensus: use a method function for NewPayload()
2020-06-22 17:06:28 +03:00
Roman Khimov
3a6186af54
Merge pull request #1083 from nspcc-dev/fix/stateroot
...
Request verified state roots
2020-06-22 16:42:41 +03:00
Roman Khimov
fec8916cb9
Merge pull request #1087 from nspcc-dev/fix/readvarbytes
...
Allow to restrict slice size in `io.ReadVarBytes()`
2020-06-22 15:42:07 +03:00
Evgenii Stratonikov
ad0cf146e8
consensus: restrict invocation script size
2020-06-22 15:36:12 +03:00
Evgenii Stratonikov
511d18d409
io: allow to restrict slice size in ReadVarBytes
2020-06-22 15:35:42 +03:00
Roman Khimov
9767817ee4
Merge pull request #1086 from nspcc-dev/fix/recovery
...
consensus: fix commitCompact payload
2020-06-22 14:52:15 +03:00
Evgenii Stratonikov
aebed3826b
consensus: fix commitCompact payload
...
Add state root signature to `commitCompact` in `recoveryMessage`.
2020-06-22 14:30:21 +03:00
Evgenii Stratonikov
caf53740d3
network: do not process state roots below verified height
...
Implement fast path to skip state root retrieval and decoding.
2020-06-22 12:33:35 +03:00
Evgenii Stratonikov
e2e1bd09ae
network: request state roots if needed
2020-06-22 12:33:35 +03:00
Evgenii Stratonikov
f8051da0bd
core: extend Blockchainer interface with StateHeight()
...
Allow to query current verified state root height.
2020-06-22 10:53:13 +03:00
Evgenii Stratonikov
f665843887
core: update verified state root height
2020-06-22 10:53:12 +03:00
Roman Khimov
9615e83c00
Merge pull request #952 from nspcc-dev/fix/structfield
...
compiler: set default values for complex struct fields (2.x)
2020-06-11 17:50:18 +03:00
Evgenii Stratonikov
cc5b5bff2e
compiler: emit NOTEQUAL only for numbers
...
Dispatch based on types similarly to EQUAL.
2020-06-11 17:41:52 +03:00
Evgenii Stratonikov
9d6b0ee4a8
compiler: disallow comparing slices with nil
...
NEO VM does not distinguish between empty and nil slices. Supporting
this is not easy and requires changing lots of other opcodes.
Pointers are not supported anyway and slices can be checked for
emptiness by inspecting their `len`.
2020-06-11 17:40:02 +03:00
Evgenii Stratonikov
bf6aa02dcf
compiler: set default values for complex struct fields
...
Set default value also for complex (struct, map) types.
Note: because VM does not distinguish empty array and nil array,
comparison 'a == nil' can't be handled properly without substantial
effort. This will be fixed in NEO3.
2020-06-11 17:40:02 +03:00
Roman Khimov
d5ba2e49a2
Merge pull request #1045 from nspcc-dev/fix/stateroot
...
consensus: verify state root in PrepareRequest
2020-06-11 11:25:02 +03:00
Evgenii Stratonikov
8614867439
consensus: verify state root in PrepareRequest
...
Fixes #1042 .
2020-06-11 10:18:12 +03:00
Roman Khimov
4732103294
Merge pull request #1046 from nspcc-dev/fix-key-recovery-interops
...
Fix key recovery interops
2020-06-10 19:51:39 +03:00
Roman Khimov
7d786fac79
core: fix key recovery interops return value
...
It's uncompressed coordinate, both X and Y, not just X. Fix #1043 .
2020-06-10 19:20:57 +03:00
Roman Khimov
a6541c4514
keys: add support for uncompressed serialization in PublicKey
2020-06-10 19:17:08 +03:00
Roman Khimov
c13ca8d597
Merge pull request #1041 from nspcc-dev/consensus-fixes-2.x-neox
...
Consensus fixes 2.x neox
2020-06-10 12:07:22 +03:00
Roman Khimov
37173bcf22
update dbft library
...
Include logging updates and LastSeenMessages fix.
2020-06-10 11:45:51 +03:00
Roman Khimov
788304ec49
Merge pull request #1021 from nspcc-dev/feature/remove
...
compiler: implement Remove builtin (2.x)
2020-06-10 11:09:56 +03:00
Roman Khimov
edd60e656e
consensus: fix processing changeview payloads from recovery message
...
Using view number from the recovery message is just plain wrong, it's gonna be
higher than our current view and these messages will be treated as coming from
the future, even though they have their original view number included.
2020-06-09 18:17:01 +03:00
Roman Khimov
76f71ab1ef
Merge pull request #1012 from nspcc-dev/feature/mptrpc
...
rpc: implement MPT-related RPC (2.x)
2020-06-09 17:25:55 +03:00
Evgenii Stratonikov
1fd7938fd8
network: process state roots properly
2020-06-08 17:31:59 +03:00
Evgenii Stratonikov
519a98039c
rpc: implement verifyproof RPC
...
Test getproof and verifyproof together.
2020-06-08 17:31:59 +03:00
Evgenii Stratonikov
8cbbddddaf
rpc: implement getproof RPC
2020-06-08 17:31:58 +03:00
Evgenii Stratonikov
fe8038e8b7
rpc/server: implement getstateheight RPC
2020-06-08 16:40:37 +03:00
Evgenii Stratonikov
53dc7f27b6
rpc/server: implement getstateroot RPC
2020-06-08 16:40:37 +03:00
Evgenii Stratonikov
dcaa82b32b
rpc: convert null
value to a defaultT
...
Right now we convert it is unmarshaler into a float64(0)
so an error is supressed.
2020-06-08 16:39:02 +03:00