Commit graph

6130 commits

Author SHA1 Message Date
Roman Khimov
fee7e2f223 rpcclient: add invoker package and structure 2022-08-01 21:31:23 +03:00
Roman Khimov
55164132df smartcontract: provide NewParametersFromValues for convenience as well 2022-08-01 21:31:23 +03:00
Roman Khimov
92a931c145 smartcontract: provide interface{}->Parameter conversion
Which is almost like a NeoFS's toStackParameter() on steroids (except it
doesn't mess with noderoles package, it can be casted to int). RPC client's
Invoke* functions expect Parameters, so make it easy to create them.
2022-08-01 21:31:23 +03:00
Roman Khimov
a8a2f2ed5a smartcontract: make CreateCallAndUnwrapIteratorScript accept Go types
Parameter is for the RPC client, all other CreateXXXScript functions deal with
regular types.
2022-08-01 21:31:23 +03:00
Roman Khimov
848d68fba8 smartcontract: improve package documentation 2022-08-01 21:31:23 +03:00
Roman Khimov
3c5a720e3a smartcontract: drop Params type and TryParse methods
They were first introduced in a058598ecc and
then carefully moved in 648e0bb242, but it looks
like they were never used by any external code. This code can be useful on the
server, but the server has its own params package to deal with
parameters. Clients usually create Parameters and then get results as
stackitem.Items, so they don't use this code either. So there is zero point in
keeping it.
2022-08-01 21:31:23 +03:00
Roman Khimov
9341bb6628 cli: restart notary service on USR1 2022-07-28 19:05:56 +03:00
Roman Khimov
2adcf406d3 cli: reload Oracle service on USR1
Which allows to enable/disable the service, change nodes, keys and other
settings. Unfortunately, atomic.Value doesn't allow Store(nil), so we have to
store a pointer there that can point to nil interface.
2022-07-28 19:05:56 +03:00
Roman Khimov
98e2c5568c rpcsrv: don't init Oracle in New, drop oracle dependency
The only thing rpcsrv needs is AddResponse callback.
2022-07-28 19:05:56 +03:00
Roman Khimov
3e406c3779 go.mod: update interops, just in case 2022-07-28 17:03:43 +03:00
Roman Khimov
61cfbbd33f Revert "vm/core: revert out-of-bounds script checks"
This reverts commit bd5644aa02 restoring changes
from #2538.
2022-07-28 17:01:23 +03:00
Roman Khimov
55f910777e Revert "native/interop: revert management.hasMethod()"
This reverts commit 6c7a401f77, introducing
changes from #2598 again.
2022-07-28 17:00:34 +03:00
Roman Khimov
c7b12f8d4c Revert "go.mod: update interop dependencies"
This reverts commit 1a8bff5bbf to simplify
subsequent reverts.
2022-07-28 17:00:19 +03:00
Roman Khimov
6b84722de5 ROADMAP: update slightly 2022-07-28 16:49:01 +03:00
Roman Khimov
a63897e128 CHANGELOG: release 0.99.1 2022-07-28 16:13:47 +03:00
Roman Khimov
4e98ca3358
Merge pull request #2616 from nspcc-dev/rollback-to-3.3.1
Rollback to 3.3.1
2022-07-28 16:00:49 +03:00
Roman Khimov
a5afa87571
Merge pull request #2615 from nspcc-dev/fix-candidate-register
native: trigger committee update on candidate registration
2022-07-28 12:11:53 +03:00
Roman Khimov
1a8bff5bbf go.mod: update interop dependencies
Just to make sure we're not missing something and using the latest ones.
2022-07-27 23:30:01 +03:00
Roman Khimov
6c7a401f77 native/interop: revert management.hasMethod()
This reverts commits
 * f50bcf617a
 * 4f184498bc
 * ab3330564a

because they're 3.4.0-compatible while we need 3.3.1.
2022-07-27 23:26:24 +03:00
Roman Khimov
bd5644aa02 vm/core: revert out-of-bounds script checks
This reverts commits 1005c1f7db and
a5b5f88fe2 which are 3.4.0-compatible changes
while we need a 3.3.1-compatible release.
2022-07-27 23:25:23 +03:00
Roman Khimov
8e9bd3e28f native: trigger committee update on candidate registration
It can change the committee even if noone voted. Fixes state diff at block
390726 of T5 testnet where there are no transactions, but committee changes
because there were some registrations in previous 21 blocks.
2022-07-27 23:21:21 +03:00
Roman Khimov
0ae8b635a1
Merge pull request #2614 from nspcc-dev/version-output-format
cli: change --version output format, fix #2611
2022-07-27 17:39:14 +03:00
Roman Khimov
eb67b61c0f cli: change --version output format, fix #2611 2022-07-27 16:28:40 +03:00
Roman Khimov
e5c59f8ddd interop/runtime: disable notifications in dynamic scripts
That are only entry scripts today. See neo-project/neo#2796.
2022-07-27 14:49:53 +03:00
Roman Khimov
df24c1268e cli: restart pprof and prometheus on HUP 2022-07-27 12:30:08 +03:00
Roman Khimov
6593b94594 cli: use new configuration for the RPC server
Also fix addresses if needed and store this new configuration.
2022-07-27 12:30:08 +03:00
Roman Khimov
94099de3c3 cli: also check new ApplicationConfiguration for consistency
Most of the settings can't be changed, only services can.
2022-07-27 12:30:08 +03:00
Roman Khimov
3fca3352d8 cli: read new config on signal and check ProtocolConfiguration
ProtocolConfiguration must remain the same, any errors mean that the signal
will be ignored.
2022-07-27 12:30:08 +03:00
Roman Khimov
1ff588a11b
Merge pull request #2610 from nspcc-dev/sc-code-emit
Move code generation from rpcclient to smartcontract
2022-07-26 12:35:18 +03:00
Roman Khimov
c8ff489287 native: use CreateOracleResponseScript directly
It wasn't possible way back when this test was written
(CreateOracleResponseScript was a method), now we can simplify things.
2022-07-26 12:19:49 +03:00
Roman Khimov
f749aaff3c *: reuse smartcontract package to create standard entry scripts 2022-07-26 12:19:49 +03:00
Roman Khimov
32ebb4a90d smartcontract: add Builder, method invocation helpers and doc
Move the last remaining script-related things out of the rpcclient.
2022-07-25 22:49:47 +03:00
Roman Khimov
1b6f4051d8 smartcontract: move CreateCallAndUnwrapIteratorScript there
RPC client shouldn't build scripts and this function can be useful as a
reusable building block.
2022-07-25 15:46:20 +03:00
Roman Khimov
68b5260fb5
Merge pull request #2609 from nspcc-dev/nuke-rpc
Shuffle RPC packages
2022-07-25 12:49:18 +03:00
Roman Khimov
88542630ac blockchainer: drop the package completely
It's not an ideal solution, but at least it solves the problem for
now. Caveats:
 * consensus only needs one method, so it's mirrored to Blockchain
 * rpcsrv uses core.* definition of the StateRoot (so technically it might as
   well not have an internal Ledger), but it uses core already unfortunately
2022-07-25 11:58:13 +03:00
Roman Khimov
5ee7ea34b1 blockchainer: drop Blockchainer completely
It's only used by the RPC server now, so it can be internalized.
2022-07-25 11:58:13 +03:00
Roman Khimov
284335a4d2 blockchainer: strip unused methods 2022-07-25 11:58:13 +03:00
Roman Khimov
fcbda00f8a blockchainer/services: drop this package
It doesn't add any value.
2022-07-25 11:58:13 +03:00
Roman Khimov
dc7950d050 testchain: don't use blockchainer.Blockchain
It's not needed.
2022-07-25 11:58:13 +03:00
Roman Khimov
3a6626f21f blockchainer: drop unused services dependency 2022-07-25 11:58:13 +03:00
Roman Khimov
5b49636ebe neotest: use real *core.Blockchain
Hiding it behind blockchainer.Blockchain doesn't improve the testing system,
there is no other implementation of it that can fulfil all the needs of the
neotest and at the same time this limits the functions available to tests.
2022-07-25 11:58:13 +03:00
Roman Khimov
b3c25b5a1f neorpc/result: move NotaryRequestEvent to this package
Not worth a package of its own.
2022-07-25 11:58:13 +03:00
Roman Khimov
4acd1688a1 subscriptions: move NotificationEvent to state
1. It's not good for pkg/core to import anything from pkg/neorpc.
2. The type is closely tied to the state package, even though it's not stored
   in the DB
2022-07-25 11:58:13 +03:00
Roman Khimov
8e70cd3596 rpc: move rpc.Config to pkg/config, remove pkg/rpc
Makes no sense keeping it as is and TLS can be reused in the future.
2022-07-25 11:58:13 +03:00
Roman Khimov
1e0750e3cd rpc: merge response and request under pkg/neorpc
Move result there also.
2022-07-25 11:57:53 +03:00
Roman Khimov
2e27c3d829 metrics: move package to services
Where it belongs.
2022-07-21 23:38:23 +03:00
Roman Khimov
8c668765d2 rpc/client: move to pkg/rpcclient
Better package name, closer to user.
2022-07-21 22:39:53 +03:00
Roman Khimov
43a59adbd0 rpc/server: move to services/rpcsrv
`server` is not a good package name and it's an internal service, so it can be
just about anywhere.
2022-07-21 22:14:12 +03:00
Roman Khimov
30de3d60cd
Merge pull request #2608 from nspcc-dev/workflow-related-corrections
Workflow-related corrections
2022-07-21 19:37:32 +03:00
Roman Khimov
1c20bb0161 Dockerfile: honor VERSION and REPO during make build
buildx doesn't have complete .git at hand to detect them, so they're passed
from the outside and should be used inside the Dockerfile.
2022-07-21 18:20:46 +03:00