Roman Khimov
8d170a1eb8
native: add Oracle.finish reentrancy test
2022-08-10 19:02:36 +03:00
Roman Khimov
da2db74bc9
contracts: decipher oracle test contract
...
Make it a proper Go contract, opcodes are fun until you want to change
something in them. Part of #2412 .
2022-08-10 19:02:36 +03:00
Roman Khimov
5cd3b0c923
Merge pull request #2637 from nspcc-dev/cli-use-actor-more
...
Use Actor more in the CLI
2022-08-10 18:26:18 +03:00
Roman Khimov
f155a7f161
rpcclient: move result processing code into unwrap package
...
Which will be reused by upper-layer packages. It can be extended with more
types in future.
2022-08-09 17:38:47 +03:00
Roman Khimov
7c266fc9bf
cli/wallet: use Actor for voting commands
2022-08-09 17:28:46 +03:00
Roman Khimov
e98ac8bc53
cli: rework registration commands with Actor
...
And reduce the amount of wasted GAS.
2022-08-09 17:28:45 +03:00
Roman Khimov
593fa4cac8
Merge pull request #2632 from nspcc-dev/rpcclient-actor
...
RPC client Actor interface
2022-08-09 17:21:24 +03:00
Roman Khimov
f3d7656b44
Merge pull request #2634 from nspcc-dev/go-1-19-upd
...
*: go 1.19 support
2022-08-09 16:33:08 +03:00
Anna Shaleva
c3670fecc5
github: update linter job
...
Use the latest linter action and explicitly setup go version.
2022-08-09 15:47:18 +03:00
Anna Shaleva
d20d293f84
examples: update neo-go dependency
2022-08-09 15:47:04 +03:00
Anna Shaleva
119b40c378
*: update interop deps
2022-08-09 15:40:15 +03:00
Anna Shaleva
3094d3e0c1
*: update prometheus client library
2022-08-09 15:37:59 +03:00
Anna Shaleva
fc3aa7f181
ci: update workflows' go version
2022-08-09 15:37:59 +03:00
Anna Shaleva
16458dd934
*: remove travis config file
...
We don't use travis anymore, we have GA and CircleCI instead.
2022-08-09 15:37:59 +03:00
Anna Shaleva
916f2293b8
*: apply go 1.19 formatter heuristics
...
And make manual corrections where needed. See the "Common mistakes
and pitfalls" section of https://tip.golang.org/doc/comment .
2022-08-09 15:37:52 +03:00
Roman Khimov
ff72ed5715
actor: take ValidatorsHistory into account for CalculateValidUntilBlock
...
Which makes permanent result.Version caching safe for all cases.
2022-08-09 15:36:40 +03:00
Roman Khimov
95b72db707
rpcsrv: return more configuration data to the client
...
These are extensions, but they're important for the client to make various
decisions.
2022-08-09 15:36:40 +03:00
Roman Khimov
5194b34a93
Merge pull request #2633 from nspcc-dev/fix-wallet-version
...
Fix wallet version
2022-08-08 17:00:04 +03:00
Anna Shaleva
bb751535d3
*: bump minimum supported go version
...
Close #2497 .
2022-08-08 13:59:32 +03:00
Roman Khimov
afef8b85d9
rpcclient: add deprecation warnings
2022-08-08 09:51:51 +03:00
Roman Khimov
260bcc0f49
wallet: fix wallet version to conform to NEP-6
...
See neo-project/neo#2390 . Can't see it there? No wonder, that's why we have
this bug for a year and a half. Not critical, we don't care about versions,
but _very_ annoying.
2022-08-07 22:41:40 +03:00
Roman Khimov
d9feec2be5
cli: use MVUBI for saved transactions
...
And DO NOT CHANGE TX in paramcontext InitAndSave, because it's really
unobvious and must not be done this way.
2022-08-07 22:33:57 +03:00
Roman Khimov
ba2e7063dd
cli: compensate VUB for prompt waiting time
...
We also have now ways to change it with actor package, so technically this
fixes #2618 .
2022-08-07 22:33:57 +03:00
Roman Khimov
7132b38425
cli: use actor.Actor for smart contract invocations
...
That's a proof of the concept mostly since it doesn't change much in this
particular case.
2022-08-07 22:33:56 +03:00
Roman Khimov
f369c2a359
wallet: allow pre-filled contract-based scripts in SignTx
...
They're allowed already for regular accounts (see below), but parameterless
accounts always add a script which is wrong.
2022-08-07 22:33:56 +03:00
Roman Khimov
8385efe4b3
cli: simplify and fix invokeWithArgs logic
...
Saving into a file can't be successful without signAndPush flag (wallet
present). This situation can't happen in CLI invocations since
testinvokefunction doesn't have `--out` flag, but still it's a logic
error. Everything else can be simplified a bit taking that into account.
2022-08-07 22:33:56 +03:00
Roman Khimov
aa2dbe9caf
smartcontract: accept Parameter in NewParameterFromValue
...
While it makes little sense, there can be a situation where this function will
get predefined Parameters in some way.
2022-08-07 22:33:56 +03:00
Roman Khimov
c0705e45c9
rpcclient: add actor package
...
Somewhat similar to invoker, but changing the state (or just creating a
transaction). Transaction creation could've been put into a structure of its
own, but it seems to be less convenient to use this way.
2022-08-07 22:33:56 +03:00
Roman Khimov
41613cd631
Merge pull request #2625 from nspcc-dev/excessive-cli-positionals
...
Handle excessive positional arguments in the CLI
2022-08-05 19:05:54 +03:00
Roman Khimov
4c8e00369c
cli/wallet: specify --wallet-config for all commands accepting it
2022-08-05 18:28:02 +03:00
Roman Khimov
28e2010cbd
cli: add UsageText to commands that were missing it
...
Makes --help a bit more useful.
2022-08-05 18:28:02 +03:00
Roman Khimov
1367d0df00
cli: provide more explanations for node options
2022-08-05 16:04:56 +03:00
Roman Khimov
3e147a3fc9
cli: db dump/restore commands have no --debug flag
2022-08-05 15:59:23 +03:00
Roman Khimov
1518019be8
cli: add excessive arguments checks
...
Some commands don't accept arguments, but users try giving them and don't
notice a mistake. It's a bit more user-friendly to tell the user that there is
something wrong with the way he tries to use the command.
2022-08-05 15:50:12 +03:00
Roman Khimov
b8a4a6dc5b
Merge pull request #2613 from nspcc-dev/exec-changes-3.4.0
...
Exec changes for 3.4.0
2022-08-05 15:04:35 +03:00
Roman Khimov
e8d2277fe5
contract/vm: only push NULL after call in dynamic contexts
...
And determine the need for Null dynamically. For some reason the only dynamic
context is Contract.Call. CALLT is not dynamic and neither is a call from
native contract, go figure...
2022-08-05 14:35:00 +03:00
Roman Khimov
99e2681d3a
interop/vm: use more robust CalledByEntry check
...
Directly check contexts.
2022-08-05 14:35:00 +03:00
Roman Khimov
13f5fdbe8a
vm: extract shared parts of the Context
...
Local calls reuse them, cross-contract calls create new ones. This allows to
avoid some allocations and use a little less memory.
2022-08-05 14:26:25 +03:00
Roman Khimov
ab7743d78d
Merge pull request #2619 from nspcc-dev/script-oob-and-hasmethod-3.4.0
...
Script OOB checks and HasMethod for 3.4.0
2022-08-04 12:41:43 +03:00
Roman Khimov
25bd941d6f
Merge pull request #2601 from nspcc-dev/disallow-unnamed-parameters
...
compiler: disallow unnamed parameters for exported methods of the main package
2022-08-02 18:04:11 +03:00
Anna Shaleva
725e8779a1
compiler: always ensure manifest passes base check
2022-08-02 17:37:43 +03:00
Anna Shaleva
94f6a9ee61
compiler: disallow unnamed parameters for exported methods
2022-08-02 17:19:33 +03:00
Roman Khimov
d4292ed532
Merge pull request #2621 from nspcc-dev/sc-params
...
Smartcontract Parameters and Invoker interface
2022-08-02 14:18:34 +03:00
Roman Khimov
cfd2a35172
Merge pull request #2612 from nspcc-dev/fancy-service-restart
...
Fancy service restart
2022-08-02 14:11:44 +03:00
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