Commit graph

6192 commits

Author SHA1 Message Date
Roman Khimov
be74cc6b55 cli: use nep17 wrapper to implement commands 2022-08-12 18:21:02 +03:00
Roman Khimov
309358c85b rpcclient: add new NEP-17 wrapper 2022-08-12 18:21:02 +03:00
Roman Khimov
aa80416632
Merge pull request #2640 from nspcc-dev/fix-state-diff
core: fix native Management's hasMethod signature
2022-08-12 12:02:13 +03:00
Anna Shaleva
94e84f0364 core: fix native Management's hasMethod signature
Affects states, see
28ab45a6ec/src/Neo/SmartContract/Native/ContractManagement.cs (L155).
2022-08-11 16:10:01 +03:00
Roman Khimov
509cdec981
Merge pull request #2639 from nspcc-dev/oracle-fix
Oracle fix
2022-08-11 10:02:02 +03:00
Roman Khimov
bf094dffbb
Merge pull request #2638 from nspcc-dev/rpc-unwrap
rpcclient: move result processing code into unwrap package
2022-08-10 19:04:04 +03:00
Roman Khimov
bc3bffea53 native: fix oracle.finish reentrancy bug
See neo-project/neo#2795.
2022-08-10 19:02:36 +03:00
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