Ekaterina Pavlova
5d514538cf
rpc: add new header_of_added_block event subscription
...
New event is to notify the user about header's content by the moment
when block is stored (which happens after block's processing). This is
needed for proper Waiter work.
Closes #2751 .
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2023-12-22 15:14:01 +03:00
Evgenii Stratonikov
962b161652
wallet: allow complex contract verification schemes, close #3015
...
This was recently added in neotest, but working with the real RPC is
still not enjoyable. This commit extends `wallet.Account` with
invocation script builder to aid network fee calculations and signing.
Signed-off-by: Evgenii Stratonikov <fyfyrchik@runbox.com>
2023-12-21 11:26:55 +03:00
Anna Shaleva
d5dee8fc94
rpcclient: fix failing initialisation-based tests
...
Must be a part of #3257 .
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-12-11 12:41:56 +03:00
Ekaterina Pavlova
3fd48a743e
rpc: add an ability to filter out NotaryRequestEvents
...
Add new filter NotaryRequestFilter, support for filtering
NotaryRequestEvents by mempoolevent.Type
(added or removed).
Closes #2425 .
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2023-12-09 11:37:25 +03:00
Anna Shaleva
21ccb1a02a
rpcclient: check network initialisation for blocks subscriptions
...
StateRootInHeader depends on it, so we better immediately return error
if client is not initialised.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-12-08 21:57:40 +03:00
Anna Shaleva
6fdda0f15d
rpcclient: add doc link to notifications ordering guarantees
...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-29 13:53:45 +03:00
Anna Shaleva
42b84ad905
rpcclient: improve documentation
...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-28 20:23:33 +03:00
Roman Khimov
2ae44e074d
docs: canceltransaction is not going to be supported
...
Refs. neo-project/neo-modules#837 .
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-11-21 16:11:58 +03:00
Anna Shaleva
474225d425
core, rpcsrv: apply generic attributes fee logic to NotaryServiceFeePerKey
...
Remove related methods from native Notary and add relevant code to native
Policy.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-21 13:42:56 +03:00
Anna Shaleva
82cb2e718d
native: introduce attribute pricing
...
Port the https://github.com/neo-project/neo/pull/2916 .
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-21 13:42:56 +03:00
Anna Shaleva
963a22e280
neorpc: adjust common error messages
...
According to the initial proposal and
https://github.com/neo-project/proposals/pull/156/files#diff-2b5f7c12a23f7dbe4cb46bbf4be6936882f8e0f0b3a4db9d8c58eb294b02e6ed .
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-13 20:29:13 +03:00
Anna Shaleva
7a6b908cae
neorpc: fix exported structure comment
...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-20 19:31:23 +03:00
Anna Shaleva
3544d65ecd
rpcclient: disable linter for documentation example
...
Disable the following linter warning:
```
superfluous-else: if block ends with call to panic function, so drop this else and outdent its block (revive)
```
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-20 17:28:57 +03:00
Anna Shaleva
1841d818ec
rpcclient: always provide start
parameter for findstorage
RPC
...
Close #3137 .
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-18 20:12:05 +03:00
Ayrtat
ff19189937
rpcclient: fix #3135 wsclient hangs on making request
...
* Rename c.done channel to c.readerDone
* Introduce c.writerDone channel that is closed if the wsWriter's loop
is done
* Make the error returned by makeWsRequests verbose
Signed-off-by: Ayrtat <amper.meter1775@gmail.com>
2023-10-16 13:01:12 +03:00
Roman Khimov
a9a848a306
Merge pull request #3160 from nspcc-dev/add-version-hf
...
rpcsrv: add hardforks to `getversion` response
2023-10-16 10:37:10 +03:00
Anna Shaleva
69a0104d05
rpcsrv: add hardforks to getversion
response
...
Port https://github.com/neo-project/neo-modules/pull/823 .
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-16 10:33:21 +03:00
Anna Shaleva
dc3d1300dd
*: replace go.uber.org/atomic with sync/atomic
...
Use sync/atomic everywhere and exclude go.uber.org/atomic from go.mod.
Close #2626 .
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-12 17:59:34 +03:00
Roman Khimov
eb995c8600
rpcclient: drop deprecated Notifications an Subscribe*
...
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-10-10 13:26:07 +03:00
Roman Khimov
413caac941
rpcclient: drop deprecated Client APIs
...
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-10-10 13:26:07 +03:00
Tatiana Nesterenko
acd821948f
unwrap: add Nothing
function
...
The `Nothing` function expects zero stack items and a successful invocation
(HALT state).
Signed-off-by: Tatiana Nesterenko <tatiana@nspcc.io>
2023-09-03 16:54:50 +01:00
Tatiana Nesterenko
d06f135792
rpcclient: support getrawnotarytransaction and getrawnotarypool RPC methods
...
GetRawNotaryTransaction returns a fallback or main transaction that was
previously added to the memory pool by P2PNotaryRequest. This function
invokes the RPC server's `getrawnotarytransaction` method.
GetRawNotaryPool returns hashes from all the verified transactions,
including both main and fallback transactions. This function invokes
the RPC server's `getrawnotarypool` method.
Also, these functions were added to doc.go.
Signed-off-by: Tatiana Nesterenko <tatiana@nspcc.io>
2023-08-31 18:51:43 +01:00
Anna Shaleva
1fb0c96e2c
rpcsrv, rpcclient: support getstoragehistoric
call
...
Make it similar to `findstoragehistoric`.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-08-24 17:15:59 +03:00
Anna Shaleva
617c628c24
rpcsrv, rpcclient: support findstorage
and findstoragehistoric
...
Close #3095 and add the corresponding historic extension.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-08-24 17:15:58 +03:00
Anna Shaleva
50a77f3fae
rpcclient: fix test after 0.101.4 merge
...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-08-02 10:35:19 +03:00
Anna Shaleva
18c42f7993
Merge branch 'master' into rel-0.101.4
...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-08-01 19:34:34 +03:00
Anna Shaleva
6615cce81d
rpcclient: adjust unwrapContract
helper
...
There may be no such contract, then Null stackitem is expected on stack.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-08-01 17:46:12 +03:00
Roman Khimov
288dee8871
rpcclient: close subscriber channels on wsReader exit
...
The reader is about to exit and it will close legacy c.Notifications, but it
will leave subscription channels at the same time. This is wrong since these
channels will no longer receive any new events, game over.
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-08-01 17:29:14 +03:00
Roman Khimov
08b273266b
rpcclient: correctly handle request channel closure
...
wsReader() closes c.done first and then goes over the list of
c.respChannels. Technically this means that any of the two can be taken in
this select.
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-08-01 17:29:08 +03:00
Anna Shaleva
56b93d279e
config: use uint32 for validators/committee members count
...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-08-01 17:22:28 +03:00
Anna Shaleva
e57967b11c
rpcclient: adjust unwrapContract
helper
...
There may be no such contract, then Null stackitem is expected on stack.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-07-28 18:51:25 +03:00
Anna Shaleva
41938ffa78
smartcontract: drop standard events before RPC binging generation
...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-05-31 15:53:43 +03:00
Anna Shaleva
15138b2004
vm: allow to emit convertible
...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-05-17 12:47:31 +03:00
Roman Khimov
433275265f
*: use require.ErrorIs instead of require.True(t, error.Is())
...
This is just a much better way to do the same thing. Inspired by
nspcc-dev/neofs-sdk-go#407 .
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-05-04 17:03:47 +03:00
Roman Khimov
fcaa24f928
rpcclient: provide some exported error for disconnected WSClient
...
Regular Client doesn't care much about connections, because HTTP client's Do
method can reuse old ones or create additional ones on the fly. So one request
can fail and the next one easily succeed. WSClient is different, it works via
a single connection and if it breaks, it breaks forever for this
client. Callers will get some error on every request afterwards and it'd be
nice for this error to be the same so that API users could detect
disconnection this way too.
Related to nspcc-dev/neofs-node#2325 .
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-05-03 16:08:54 +03:00
Roman Khimov
0a160ee93b
*: use CompareAndSwap instead of CAS for atomics
...
go.uber.org/atomic deprecated CAS methods in version 1.10 (that introduced
CompareAndSwap), so we need to fix it.
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-04-28 12:07:19 +03:00
Anna Shaleva
dab13a4e2d
rpcclient: close WSClient subscriber on overflow
...
Close #2894 .
It should be noted that the subscriber's channel is being removed from the
list of receivers and closed, but it is still *in the list of subscribers*
and no unsubscription is performed by WSClient. Which means that RPC server
keeps sending notifications to WSClient and WSClient keeps dropping them
(because there's no receiver for this subscription and it's OK, WSClient
can handle this and this behaviour is documented). However, it's still the
caller's duty to call Unsubscribe() method for this subscription.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-04-25 11:42:17 +03:00
Anna Shaleva
4a49bf5de4
rpcclient: introduce WSOptions for WSClient
...
Make a separate structure for WSClient configuration.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-04-25 11:42:15 +03:00
Roman Khimov
6eaa76520f
rpcclient: close subscriber channels on wsReader exit
...
The reader is about to exit and it will close legacy c.Notifications, but it
will leave subscription channels at the same time. This is wrong since these
channels will no longer receive any new events, game over.
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-04-19 16:25:43 +03:00
Roman Khimov
45b353781f
rpcclient: correctly handle request channel closure
...
wsReader() closes c.done first and then goes over the list of
c.respChannels. Technically this means that any of the two can be taken in
this select.
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-04-18 19:36:27 +03:00
Anna Shaleva
8149d33fef
config: use uint32 for validators/committee members count
...
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-04-13 13:42:40 +03:00
Erik van den Brink
f479b2bc57
neorpc: change peer port to int type (fixes nspcc-dev#2910)
2023-04-06 18:33:09 +02:00
Roman Khimov
c053f1a4af
Merge pull request #2957 from nspcc-dev/rm-go-17
...
*: drop go 1.17 support
2023-04-04 15:25:14 +03:00
Anna Shaleva
6b21ad9922
*: replace interface{}
with any
keyword
...
Everywhere including examples, external interop APIs, bindings generators
code and in other valuable places. A couple of `interface{}` usages are
intentionally left in the CHANGELOG.md, documentation and tests.
2023-04-04 13:22:42 +03:00
Roman Khimov
1633ae32df
Merge pull request #2954 from ZhangTao1596/fix-format
...
Fix lint jobs issues
2023-03-31 09:49:39 +03:00
ZhangTao1596
d36df15878
ci: fix lint issues ( fix #2948 )
2023-03-29 11:19:23 +08:00
ZhangTao1596
f21e618be5
rpcclient: add GetProof and VerifyProof ( fix #2942 )
2023-03-23 17:03:22 +08:00
Roman Khimov
0d5613cfcb
Merge pull request #2938 from nspcc-dev/failing-actor-test
...
actor: don't close already closed channel, fix #2932
2023-03-17 11:46:31 +03:00
Roman Khimov
da7eafd4c7
Merge pull request #2937 from nspcc-dev/copy-wsclient-filters
...
Copy wsclient filters
2023-03-17 10:49:13 +03:00
Roman Khimov
e197f3faef
rpcclient: copy subscription params, fix #2890
...
Clients can change things and we better be safe here.
2023-03-17 10:33:30 +03:00
Roman Khimov
e84ea0207d
actor: don't close already closed channel, fix #2932
...
Waiter should close its channels, but WSClient can also do that and it can do
that in a drain loop as well.
2023-03-17 09:57:41 +03:00
Roman Khimov
74623e64bc
rpcclient: improve wsclient doc, fix #2895
2023-03-16 21:27:35 +03:00
Anna Shaleva
5f6c01336c
*: add nolint comments to multiple errors wrapping
...
To be enabled after go 1.20 support is added.
2023-03-15 16:38:01 +03:00
Roman Khimov
475d9de2d5
Merge pull request #2916 from nspcc-dev/not-so-local-client
...
Not so local RPC client
2023-02-20 10:38:30 +03:00
Roman Khimov
6f7fed344b
rpcclient: add Internal client for direct RPC server calls
...
It has a special `requestF` and a special initialization function, but other
than that it's an absolutely regular WSClient. Can be used to call, can be
used to subscribe. Fixes #2909 .
2023-02-16 23:49:58 +03:00
Erik van den Brink
3bdb3a87b8
rpcclient: expose endpoint ( fixes #2912 )
2023-02-15 08:29:44 +01:00
Anna Shaleva
51a28fac8d
rpcclient: adjust new subscriptions API doc
...
Add a warning about consequences of unproper notifications reading.
Ref. https://github.com/morphbits/neofs-cdn-edge-manager/pull/88#discussion_r1088007680 .
2023-01-30 14:36:11 +03:00
Leonard Lyubich
cbdc6ba469
rpcclient/actor: Document RPCActor.CalculateNetworkFee
method
...
`Actor.MakeUnsignedUncheckedRun` method imposes restriction to
`CalculateNetworkFee` method's implementations: `Hash` or `Size` methods
must not be called on the pointer to the given transaction.
Add docs to adjust described requirement.
Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
2023-01-17 21:28:20 +03:00
Anna Shaleva
28927228f0
*: adjust subscription-related doc
...
Add a warning about received events modification where applicable.
2023-01-17 17:11:19 +03:00
Anna Shaleva
2c0844221a
rpcclient: fix filtered naive subscriptions receiver
...
We should return the filter itself instead of pointer.
2022-12-07 16:56:16 +03:00
Roman Khimov
d909cab4a4
rpcclient/management: add new methods
2022-12-02 10:57:05 +03:00
Roman Khimov
93cec0bba5
Merge pull request #2786 from nspcc-dev/simplify-getversion
...
Simplify result.Version
2022-12-02 14:07:55 +07:00
Roman Khimov
fb09670fd1
rpcclient: extract more detailed server-side on WS connection problem
...
If available. Fixes #2818 .
2022-11-23 12:19:35 +03:00
Roman Khimov
fd04b2befd
actor: don't abort waiter on "already exists" error
...
It can happen in many cases of distributed tx generation/submission, we can
just wait normally in this case and there will be some proper result.
2022-11-23 10:07:37 +03:00
Roman Khimov
cd6bb68246
actor: check for tx after the subscription in wsWaiter, fix #2805
...
Don't wait for VUB block, solve this race immediately.
2022-11-22 17:28:55 +03:00
Roman Khimov
c95d140113
rpcclient: always return tx hash from sendrawtransaction
...
Let upper-layer APIs like actor.Send() return it as well. Server can return
"already exists" which is an error and yet at the same time a very special
one, in many cases it means we can proceed with waiting for the TX to settle.
2022-11-22 15:18:37 +03:00
Anna Shaleva
1399496dfb
rpcclient: refactor event-based waiting loop
...
Avoid receiver channels locks.
2022-11-16 23:57:00 +03:00
Anna Shaleva
95e23c8e46
actor: fix event-based tx awaiting
...
If VUB-th block is received, we still can't guaranty that transaction
wasn't accepted to chain. Back this situation by rolling back to a
poll-based waiter.
2022-11-16 23:44:31 +03:00
Anna Shaleva
6dbae7edc4
rpcclient: fix WS-client unsubscription process
...
Do not block subscribers until the unsubscription request to RPC server
is completed. Otherwise, another notification may be received from the
RPC server which will block the unsubscription process.
At the same time, fix event-based waiter. We must not block the receiver
channel during unsubscription because there's a chance that subsequent
event will be sent by the server. We need to read this event in order not
to block the WSClient's readloop.
2022-11-16 23:44:30 +03:00
Anna Shaleva
3f122fd591
rpcclient: adjust WS waiter error formatting
...
Follow the other errors formatting style.
2022-11-16 12:22:18 +03:00
Roman Khimov
b5c79f4be3
unwrap: add a complete set of simple array unwrappers
...
Arrays of basic types should be covered completely.
2022-11-14 13:01:13 +03:00
Roman Khimov
7f8a79ffaa
result: drop deprecated Magic and StateRootInHeader from Version
...
It's more than a year now we have them deprecated.
2022-11-10 16:32:49 +03:00
Roman Khimov
bb47d971dc
rpcclient/nep11: make DivisibleWriter part reusable
...
Same rationale as for BaseWriter or nep17.TokenWriter, otherwise it's hard to
build on top of plain Divisible structure.
2022-11-07 10:44:39 +03:00
Roman Khimov
b590d4ca04
Merge pull request #2766 from nspcc-dev/rpc-wrapper-autogen
...
Rpc wrapper autogeneration
2022-10-28 11:54:47 +07:00
Roman Khimov
f0abc035af
unwrap: add PublicKey to unwrap public keys
...
We have this type in NEP-14 directly.
2022-10-27 18:32:00 +03:00
Anna Shaleva
4fc11c2924
rpc: revert deprecated subscriptions API changes
...
Revert deprecated subscriptions-related method signature changed in
673a495527
, 8e84bb51d5
and d7c1f3eac7
.
2022-10-26 15:32:54 +03:00
Anna Shaleva
5811687836
rpc: fix bug in Actor's waiter
...
Execution events are followed by block events, not vise versa, thus,
we can wait until VUB block to be accepted to be sure that
transaction wasn't accepted to chain.
2022-10-26 15:32:54 +03:00
Anna Shaleva
0a5905390c
rpc: refactor WSClient subscriptions API
...
Make it more specific, close #2756 .
2022-10-26 15:32:54 +03:00
Anna Shaleva
3cccc89dac
rpc: add Wait wrapper to Notary actor
2022-10-24 06:09:36 +03:00
Anna Shaleva
1a6f1c805c
rpc: fix race in TestWSClientEvents
...
```
2022-10-21T08:59:45.2219797Z === RUN TestWSClientEvents/default_ntf_channel
2022-10-21T08:59:45.2219901Z ==================
2022-10-21T08:59:45.2220017Z WARNING: DATA RACE
2022-10-21T08:59:45.2220177Z Write at 0x00c000c82778 by goroutine 371:
2022-10-21T08:59:45.2220580Z github.com/nspcc-dev/neo-go/pkg/rpcclient.TestWSClientEvents.func2()
2022-10-21T08:59:45.2221112Z /home/runner/work/neo-go/neo-go/pkg/rpcclient/wsclient_test.go:171 +0x1c4
2022-10-21T08:59:45.2221244Z testing.tRunner()
2022-10-21T08:59:45.2221617Z /opt/hostedtoolcache/go/1.18.7/x64/src/testing/testing.go:1439 +0x213
2022-10-21T08:59:45.2221759Z testing.(*T).Run.func1()
2022-10-21T08:59:45.2222124Z /opt/hostedtoolcache/go/1.18.7/x64/src/testing/testing.go:1486 +0x47
2022-10-21T08:59:45.2222138Z
2022-10-21T08:59:45.2222308Z Previous read at 0x00c000c82778 by goroutine 37:
2022-10-21T08:59:45.2222694Z github.com/nspcc-dev/neo-go/pkg/rpcclient.(*Client).StateRootInHeader()
2022-10-21T08:59:45.2223151Z /home/runner/work/neo-go/neo-go/pkg/rpcclient/rpc.go:1104 +0xb0
2022-10-21T08:59:45.2223482Z github.com/nspcc-dev/neo-go/pkg/rpcclient.(*WSClient).wsReader()
2022-10-21T08:59:45.2224077Z /home/runner/work/neo-go/neo-go/pkg/rpcclient/wsclient.go:210 +0x651
2022-10-21T08:59:45.2224416Z github.com/nspcc-dev/neo-go/pkg/rpcclient.NewWS.func2()
2022-10-21T08:59:45.2224892Z /home/runner/work/neo-go/neo-go/pkg/rpcclient/wsclient.go:149 +0x39
2022-10-21T08:59:45.2224901Z
2022-10-21T08:59:45.2225049Z Goroutine 371 (running) created at:
2022-10-21T08:59:45.2225182Z testing.(*T).Run()
2022-10-21T08:59:45.2225548Z /opt/hostedtoolcache/go/1.18.7/x64/src/testing/testing.go:1486 +0x724
2022-10-21T08:59:45.2225911Z github.com/nspcc-dev/neo-go/pkg/rpcclient.TestWSClientEvents()
2022-10-21T08:59:45.2226408Z /home/runner/work/neo-go/neo-go/pkg/rpcclient/wsclient_test.go:167 +0x404
2022-10-21T08:59:45.2226539Z testing.tRunner()
2022-10-21T08:59:45.2226900Z /opt/hostedtoolcache/go/1.18.7/x64/src/testing/testing.go:1439 +0x213
2022-10-21T08:59:45.2227042Z testing.(*T).Run.func1()
2022-10-21T08:59:45.2227398Z /opt/hostedtoolcache/go/1.18.7/x64/src/testing/testing.go:1486 +0x47
2022-10-21T08:59:45.2227406Z
2022-10-21T08:59:45.2227552Z Goroutine 37 (finished) created at:
2022-10-21T08:59:45.2227851Z github.com/nspcc-dev/neo-go/pkg/rpcclient.NewWS()
2022-10-21T08:59:45.2228327Z /home/runner/work/neo-go/neo-go/pkg/rpcclient/wsclient.go:149 +0x6fb
2022-10-21T08:59:45.2228843Z github.com/nspcc-dev/neo-go/pkg/rpcclient.TestWSClientEvents.func2()
2022-10-21T08:59:45.2229434Z /home/runner/work/neo-go/neo-go/pkg/rpcclient/wsclient_test.go:168 +0x131
2022-10-21T08:59:45.2229569Z testing.tRunner()
2022-10-21T08:59:45.2229930Z /opt/hostedtoolcache/go/1.18.7/x64/src/testing/testing.go:1439 +0x213
2022-10-21T08:59:45.2230069Z testing.(*T).Run.func1()
2022-10-21T08:59:45.2230424Z /opt/hostedtoolcache/go/1.18.7/x64/src/testing/testing.go:1486 +0x47
2022-10-21T08:59:45.2230526Z ==================
2022-10-21T08:59:45.2230703Z wsclient_test.go:186:
2022-10-21T08:59:45.2230988Z Error Trace: wsclient_test.go:186
2022-10-21T08:59:45.2231209Z Error: Should be true
2022-10-21T08:59:45.2231536Z Test: TestWSClientEvents/default_ntf_channel
2022-10-21T08:59:45.2231812Z testing.go:1312: race detected during execution of test
```
2022-10-24 06:09:36 +03:00
Anna Shaleva
d2a9e9120d
rpc: extend Waiter interface to wait for several txs with context
2022-10-24 06:09:36 +03:00
Anna Shaleva
6b216050f3
rpc: add compat tests for RPC* interfaces and Client implementations
2022-10-24 06:09:36 +03:00
Anna Shaleva
00d44235c1
rpc: add tests for RPC waiters
2022-10-24 06:09:36 +03:00
Anna Shaleva
388112dcaa
rpc: mark old WSClient's SubscribeFor* methods as deprecated
2022-10-24 06:09:36 +03:00
Anna Shaleva
5b81cb065f
rpc: refactor waiter-related actor code
2022-10-24 06:09:36 +03:00
Anna Shaleva
8e84bb51d5
rpc: add "till" filter to WS block events
2022-10-24 06:09:36 +03:00
Anna Shaleva
345d48d051
rpc: improve WS-based transaction awaiting
...
Subscribe only for required aers.
2022-10-24 06:09:36 +03:00
Anna Shaleva
d7c1f3eac7
rpc: add "container" filter to WS execution notifications
2022-10-24 06:09:36 +03:00
Anna Shaleva
71069b0ed0
rpc: improve WS-enabled transaction awaiting
...
Fetch blocks since VUB+1, if block received and we haven't returned the
result yet, then transaction wasn't accepted at all.
2022-10-24 06:09:36 +03:00
Anna Shaleva
673a495527
rpc: add "since" filter to WS block events
2022-10-24 06:09:36 +03:00
Anna Shaleva
10a0716217
rpc: implement transaction awaiting functionality
...
Close #2704 .
2022-10-24 06:09:36 +03:00
Anna Shaleva
6d38e75149
rpc: support multiple WSClient notification receivers
2022-10-24 06:09:36 +03:00
Anna Shaleva
4ce6bc6a66
rpc: adjust comment to Notification value cast
...
And explicitly specify field names on Notification creation.
2022-10-24 06:09:36 +03:00
Roman Khimov
317dd42513
*: use uint*Size and SignatureLen constants where appropriate
2022-10-05 10:45:52 +03:00
Roman Khimov
d40eb79975
rpcclient: simplify historic API
...
util.Uint256 is util.Uint256 and it's same RPC behind the scenes, so we can
make it a bit easier to digest. See #2545 also.
2022-09-09 13:41:45 +03:00
Roman Khimov
541d4b49e1
context: define a constant for transaction context type
2022-09-08 14:33:04 +03:00
Roman Khimov
6be9367f03
rpcclient/notary: add OnNEP17PaymentData and an example
...
Update documentation as well to mention it and not mention outdated APIs. We
can't link them yet, this will be done after the release.
2022-09-08 14:33:04 +03:00
Roman Khimov
3c02177d3c
rpcclient: improve comments for some methods
2022-09-08 14:33:04 +03:00
Roman Khimov
3e8e6857e5
rpcclient; deprecate more methods
...
They make little sense now.
2022-09-08 14:33:04 +03:00
Roman Khimov
c4ddf80742
rpcclient: correct Init requirement in documentation
2022-09-08 14:33:04 +03:00