Commit graph

7520 commits

Author SHA1 Message Date
Anna Shaleva
e27a822d4b
Merge pull request #3376 from nspcc-dev/test-nep17-transfer
cli: fix TestNEP17Transfer fail
2024-03-27 20:55:27 +03:00
Ekaterina Pavlova
8d0d5cb7cd cli: fix TestNEP17Transfer fail
To prevent `Expired transaction (-510) - transaction has expired:
ValidUntilBlock = 8, current height = 8` VUB have been increased.

Close #3343

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-03-27 11:16:43 +03:00
Anna Shaleva
627a0abb57
Merge pull request #3371 from nspcc-dev/upd-dbft
consensus: integrate dBFT pre-0.2.0
2024-03-25 19:54:05 +03:00
Anna Shaleva
beee2605a3 consensus: use better dbFT
Fetch fresh dbft version with minor adjustments.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-03-25 19:21:51 +03:00
Anna Shaleva
708b439f4a consensus: remove unused dBFT payload methods
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-03-25 19:21:51 +03:00
Anna Shaleva
3e6dfff503 consensus: fetch dbft pre-0.2.0 version
Try out updated dBFT interface.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-03-25 19:21:50 +03:00
Roman Khimov
f8ca51db93
Merge pull request #3374 from nspcc-dev/improve-err
*: improve error text for System.Crypto.CheckMultisig handling
2024-03-25 19:20:35 +03:00
Anna Shaleva
85a2a9a989 *: improve error text for System.Crypto.CheckMultisig handling
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-03-25 19:16:21 +03:00
Anna Shaleva
37d7a3a2d5
Merge pull request #3301 from nspcc-dev/keccak256
interop: add keccak256 implementation
2024-03-23 14:23:10 +03:00
Ekaterina Pavlova
c090628ea5 rpcsrv: update block20StateRootLE
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-03-22 17:20:06 +03:00
Ekaterina Pavlova
6d1a22dcb3 *: update interop deps
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-03-22 17:17:30 +03:00
Ekaterina Pavlova
1840c057bd interop: add keccak256 implementation
Port neo-project/neo#2925.

Close #3295

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-03-22 17:15:43 +03:00
Anna Shaleva
fa1c07e7e6
Merge pull request #3362 from nspcc-dev/getCommitteeAddress
native: add getCommitteeAddress method
2024-03-22 17:13:29 +03:00
Anna Shaleva
d5a5e4c125
Merge pull request #3368 from nspcc-dev/test-dial
rpcsrv: fix TestRPC failing
2024-03-22 16:53:09 +03:00
Ekaterina Pavlova
f8ebed2da4 *: update interop deps
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-03-22 16:48:58 +03:00
Ekaterina Pavlova
72484a33eb rpcsrv: update block20StateRootLE
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-03-22 16:46:59 +03:00
Ekaterina Pavlova
e0328cc1f8 native: add getCommitteeAddress method
Port neo-project/neo#3154.

Close #3334

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-03-22 16:46:59 +03:00
Anna Shaleva
900ef462df
Merge pull request #3369 from nspcc-dev/test-await
cli: fix TestAwaitUtilCancelTx failing
2024-03-22 16:33:25 +03:00
Ekaterina Pavlova
d80e14dcbb cli: fix TestAwaitUtilCancelTx failing
Occasionally the block is being accepted right after main transaction
submission. Added two branches into this TestAwaitUtilCancelTx. One
branch handles the case of original transaction acceptance, the
other branch handles the conflicting transaction acceptance.

Close #3365

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-03-22 16:22:11 +03:00
Ekaterina Pavlova
f409fc36e2 rpcsrv: fix TestRPC failing
Default http.Client and http.Transport can be really slow. Also on
windows Timeout: time.Second was not enough. Probably network related
issue. As mentioned in https://github
.com/nspcc-dev/neo-go/issues/2975#issuecomment-1750523651 forcely use
only tcp4 and FallbackDelay: -1. This made TestRPC little bit faster so
gh windows runner can manage it without timeout or POST request fails.

Close #2975
Close #3314

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-03-22 16:18:19 +03:00
Anna Shaleva
b028c772f2
Merge pull request #3364 from nspcc-dev/fuzz
network: fix logging data race in the package
2024-03-21 19:52:33 +03:00
Anna Shaleva
308475f746
Merge pull request #3351 from nspcc-dev/CommitteeChanged
native: add committee change events
2024-03-21 19:37:43 +03:00
Ekaterina Pavlova
31548dc28f network: fix logging data race in the package
Nested goroutines could cause logging race.

Close #3316

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-03-20 13:12:14 +03:00
Ekaterina Pavlova
7c2575568d rpcsrv: update block20StateRootLE
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-03-19 23:00:06 +03:00
Ekaterina Pavlova
270515de6a native: add committee change events
Port neo-project/neo#3158.

Close #3326

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-03-19 23:00:06 +03:00
Roman Khimov
a81dc5c795
Merge pull request #3356 from fyfyrchik/fix-checkresok
rpcclient: return FaultException in checkResOk if any
2024-03-19 22:32:45 +03:00
Roman Khimov
da4e80e7a0
Merge pull request #3357 from nspcc-dev/fix-notary
core: prohibit reentry to Notary withdraw
2024-03-19 22:31:49 +03:00
Evgenii Stratonikov
1a3a494459 rpcclient: return FaultException in checkResOk if any
FaultException can be non-empty even in Halt state when there were
problems with stack marshaling to JSON.

Signed-off-by: Evgenii Stratonikov <fyfyrchik@runbox.com>
2024-03-19 18:39:02 +03:00
Roman Khimov
7e12cc11e4
Merge pull request #3361 from nspcc-dev/fix-rpc-511
rpcsrv: fix insufficient funds use
2024-03-18 20:49:10 +03:00
Roman Khimov
27f79b8c63 rpcsrv: fix insufficient funds use
This is not the way intended in https://github.com/neo-project/proposals/pull/156.
-511 covers _both_ cases because users hardly can distinguish one from another,
it's just that our mempool implementation has error codes for both..

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-03-18 20:37:39 +03:00
Roman Khimov
445ab97906
Merge pull request #3360 from nspcc-dev/adj-mempool-err-codes
rpcsrv: fix RPC error codes proposal compatibility
2024-03-18 18:55:42 +03:00
Anna Shaleva
82e52c4f6d rpcsrv: fix RPC error codes proposal compatibility
mempool.ErrInsufficientFunds is used when sender doesn't have enough
balance to pay the submitted transaction fees (-511 code according to
https://github.com/neo-project/proposals/pull/156). mempool.ErrConflict is
used when sender is not able to pay the overall transactions fee sum in
the pool (generic -500 error according to the proposal).

This bugfix is kind of breaking change for those users who relied on the
old -511 code previously returning "insufficient funds" error.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-03-18 18:05:19 +03:00
Anna Shaleva
335550fb1e rpcsrv: generate randome nonce for RPC server test transactions
Avoid mempool conflicts in tests.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-03-18 18:03:58 +03:00
Anna Shaleva
a6f52a7180 core: prohibit reentry to Notary withdraw
If we're withdrawing funds to contract that has onNEP17Payment method,
then it may call Notary's withdraw one more time, but the account's
state is not yet updated by this moment.

The problem is similar to https://github.com/neo-project/neo/pull/2734.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-03-18 17:08:32 +03:00
Anna Shaleva
bfc3aa6b67
Merge pull request #3349 from nspcc-dev/LastGasPerVote
native: clear LastGasPerVote when voting for NULL
2024-03-15 12:06:48 +03:00
Ekaterina Pavlova
0e6fbadfd5 native: clear LastGasPerVote when voting for NULL
Port neo-project/neo#3173.

Close #3345

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-03-15 10:51:32 +03:00
Roman Khimov
9c83beffbb
Merge pull request #3355 from nspcc-dev/close-rpc-clietn
rpcsrv: properly close RPC clients in tests
2024-03-14 11:56:04 +03:00
Anna Shaleva
37d4012306 rpcsrv: properly close RPC clients in tests
This commit doesn't fix anything, but clients should be closed, it's
just a good practice.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-03-14 11:04:39 +03:00
Anna Shaleva
67d39177d8
Merge pull request #3350 from nspcc-dev/tune-rpc-tests
rpcsrv: close idle client connections in doRPCCallOverHTTP
2024-03-14 10:52:35 +03:00
Roman Khimov
1679b162b8
Merge pull request #3354 from nspcc-dev/dependabot/go_modules/google.golang.org/protobuf-1.33.0
build(deps): bump google.golang.org/protobuf from 1.32.0 to 1.33.0
2024-03-14 08:29:11 +03:00
Roman Khimov
45c6a7dcd7
Merge pull request #3352 from nspcc-dev/dependabot/go_modules/examples/zkp/cubic_circuit/google.golang.org/protobuf-1.33.0
build(deps): bump google.golang.org/protobuf from 1.31.0 to 1.33.0 in /examples/zkp/cubic_circuit
2024-03-14 08:28:56 +03:00
Roman Khimov
077b4f9097
Merge pull request #3353 from nspcc-dev/dependabot/go_modules/examples/nft-nd-nns/google.golang.org/protobuf-1.33.0 2024-03-14 08:28:34 +03:00
dependabot[bot]
b015c7b05d
build(deps): bump google.golang.org/protobuf from 1.32.0 to 1.33.0
Bumps google.golang.org/protobuf from 1.32.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-13 23:40:17 +00:00
dependabot[bot]
57d828c4ab
build(deps): bump google.golang.org/protobuf in /examples/nft-nd-nns
Bumps google.golang.org/protobuf from 1.31.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-13 23:07:18 +00:00
dependabot[bot]
b78b715259
build(deps): bump google.golang.org/protobuf
Bumps google.golang.org/protobuf from 1.31.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-13 23:06:06 +00:00
Roman Khimov
86faf7b343 rpcsrv: close idle client connections in doRPCCallOverHTTP
Shouldn't affect things much, yet at the same time we no longer need any
connection after we're done with the request.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-03-13 12:58:15 +03:00
Anna Shaleva
319880e201
Merge pull request #3340 from nspcc-dev/wsclient-test
rpcclient: fix TestWSClientNonBlockingEvents
2024-03-13 12:08:11 +03:00
Ekaterina Pavlova
0016b6b630 rpc: add synchronisation for httptest.Server in tests
Add waiting for startSending to ensure that the client is ready before
the server starts sending messages.

Close #3005
Close #3312

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-03-13 11:41:43 +03:00
Anna Shaleva
b12ef701f0
Merge pull request #3344 from nspcc-dev/concurrent-test
rpcsrv: fix concurrent test TestClient_IteratorSessions
2024-03-12 00:04:31 +03:00
Ekaterina Pavlova
588d7c6418 rpcsrv: fix concurrent test TestClient_IteratorSessions
The default for `MaxConnsPerHost` is "no limit", so it'll use as many
connections as it can (potentially hitting MacOS/Windows limits
https://github.com/golang/go/issues/20960#issuecomment-447918270 ).

Close #3300

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-03-11 22:00:23 +03:00