Commit graph

6191 commits

Author SHA1 Message Date
Roman Khimov
9b0ea2c21b network/consensus: always process dBFT messages as high priority
Move category definition from consensus to payload, consensus service is the
one of its kind (HP), so network.Server can be adjusted accordingly.
2022-08-02 13:07:18 +03:00
Roman Khimov
ff93a680eb metrics: don't Panic on bad shutdown
Just log the error.
2022-08-02 13:06:10 +03:00
Roman Khimov
b92896b0c0 cli: fix FTBFS on Windows
It has a stub for SIGHUP, but doesn't have anything for USR1 and USR2:

Error: cli\server\server.go:520:31: undefined: syscall.SIGUSR1
Error: cli\server\server.go:521:31: undefined: syscall.SIGUSR2
Error: cli\server\server.go:565:17: undefined: syscall.SIGUSR1
Error: cli\server\server.go:608:17: undefined: syscall.SIGUSR2
2022-08-02 13:06:08 +03:00
Roman Khimov
e1ef3c45ce docs: update documentation for signals 2022-08-02 13:05:39 +03:00
Roman Khimov
94a8784dcb network: allow to drop services and solve concurrency issues
Now that services can come and go we need to protect all of the associated
fields and allow to deregister them.
2022-08-02 13:05:39 +03:00
Roman Khimov
5a7fa2d3df cli: restart consensus service on USR2
Fix #1949. Also drop wallet from the ServerConfig since it's not used in any
meaningful way after this change.
2022-08-02 13:05:07 +03:00
Roman Khimov
bf92966633 cli: reload state root service on USR1
It's a bit special since it's _always_ present to catch stateroots from the
network.
2022-08-02 13:02:36 +03:00
Roman Khimov
d84f8940f1
Merge pull request #2622 from nspcc-dev/minor-fix
.github: adjust image builder job
2022-08-02 12:13:46 +03:00
Anna Shaleva
40788db960 .github: adjust image builder job
Don't need to check runner OS, because it's ubuntu-20.04. Remnant from
b8b85ce911.
2022-08-02 12:02:37 +03:00
Roman Khimov
31c9ae6339 rpcclient: add CallAndExpandIterator to Invoker
And deprecate Client.InvokeAndPackIteratorResults.
2022-08-01 21:31:23 +03:00
Roman Khimov
b52282c3c7 rpcclient: use Invoker internally for external APIs
It's not a big improvement, but it allows to test Invoker better.
2022-08-01 21:31:23 +03:00
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