Evgenii Stratonikov
27b3054df4
transaction: set feePerByte on tx construction
2020-07-03 17:52:13 +03:00
Roman Khimov
4f8e4628dc
cli/rpc: hide parameter encoding details for Invoke* calls
...
The script is passed as a hex string, but no one should care. The hash is a
hex-encoded LE value, but no one should care either. Hex might change to
base64, LE to BE, no one outside these functions should care about that.
2020-07-02 16:41:34 +03:00
Roman Khimov
17ea6411a2
rpc/client: ensure compatibility with preview2 C# node for invoke*
...
It won't work with proper cosigners and the client must be compatible both
with neo-go and C# node. See neo/neo-modules#260 also.
2020-07-02 16:40:32 +03:00
Roman Khimov
cc95d559cc
rpc/client: unify invoke* functions
2020-07-02 16:40:32 +03:00
Anna Shaleva
73b630db9b
*: switch from fixed8 to int64
...
Follow C# implementation, we have to marshall JSON Fixed8 fields without
taking into account decimals.
2020-06-29 21:39:27 +03:00
Evgenii Stratonikov
35f952e44f
rpc/server: simplify errors handling during parameter parsing
...
Forward-ported from 2.x with some updates.
2020-06-27 12:11:21 +03:00
alexvanin
cfa0c6e0ad
cli: update hardcoded script hashes for neo and gas contracts
...
Use LittleEndian as preferred way to encode script-hashes
2020-06-26 16:22:02 +03:00
Evgenii Stratonikov
f66199c99f
cli: hardcode NEO and GAS token info
...
Don't make extra network queries for already known contracts.
2020-06-25 17:21:26 +03:00
Evgenii Stratonikov
3e3781168d
rpc/client: do not query contract for account if it is in the wallet
2020-06-25 17:21:26 +03:00
Roman Khimov
5251607fb7
transaction: s/txid/hash/ for JSON to match C# implementation
...
It uses `hash` for transactions now, but `txid` for application logs.
2020-06-24 10:43:58 +03:00
Roman Khimov
0fdeafb8f7
Merge pull request #1058 from nspcc-dev/neo3/smartcontract/policy
...
core: add native policy contract
2020-06-24 09:37:29 +03:00
Anna Shaleva
b88863948d
rpc: add native policy API to RPC client
...
part of #904
2020-06-24 07:58:09 +03:00
Anna Shaleva
65c1ce4f6a
rpc: add GetStorageByID RPC client method
...
Should be a part of #1077
2020-06-23 17:31:22 +03:00
Evgenii Stratonikov
3787a8895e
rpc: marshal GasConsumed getapplicationlog
as string
...
Also there is no more decimal point.
2020-06-19 11:38:56 +03:00
Evgenii Stratonikov
c0e482fe6c
rpc: restructure getapplicationlog
response
...
Move VM-related fields to top-level.
2020-06-19 11:38:56 +03:00
Roman Khimov
b483c38593
block/transaction: add network magic into the hash
...
We make it explicit in the appropriate Block/Transaction structures, not via a
singleton as C# node does. I think this approach has a bit more potential and
allows better packages reuse for different purposes.
2020-06-18 12:39:50 +03:00
Roman Khimov
8fda6a3407
block: fix ConsensusData hashing
...
It's DoubleSha256 as with the rest of the structures.
2020-06-18 12:22:49 +03:00
Roman Khimov
5fe8287fbb
rpc: use non-pointer Block and Transaction in results
...
Pointers can be nil and in some cases it's important to always have access to
Block or Transaction fields.
2020-06-18 12:13:35 +03:00
Roman Khimov
d22286cbbc
client/cli: add network option to the RPC client
...
It doesn't affect anything yet, but it's going to be used in the future for
network-specific behavior. It also renames short '--timeout' form to '-s'
avoiding conlict with '-t' used for '--testnet'.
2020-06-18 12:11:13 +03:00
Evgenii Stratonikov
7b4ca57e33
*: change address to the new format
...
NEO3 uses new prefix for address (53 = 0x35), thus string representations as
well as encrypted WIFs should be changed.
2020-06-17 15:58:21 +03:00
Anna Shaleva
3568ab3d6d
core: add json marshaller for Cosigner's scopes
...
Following C# implementation, we should marshal Scopes as a set of
strings instead of single byte.
2020-06-15 13:48:15 +03:00
Roman Khimov
fe31c7ed2d
Merge pull request #1047 from nspcc-dev/neo3/rpc/invoke
...
rpc: update invoke* RPC-calls
2020-06-11 21:39:20 +03:00
Anna Shaleva
9e7fca013e
rpc: update CLI and RPC client invoke* calls
...
part of #1036
2020-06-11 20:32:05 +03:00
Evgenii Stratonikov
df958caf93
core: add Manifest to state.Contract
2020-06-11 10:45:24 +03:00
Anna Shaleva
0af5b9339d
rpc, cli: remove invoke
RPC-call
...
part of #1036
2020-06-10 20:30:55 +03:00
Anna Shaleva
3418e4f7f4
rpc: update getversion
RPC-call
...
closes #1035
2020-06-10 10:47:11 +03:00
Roman Khimov
795523f5cd
Merge pull request #1013 from nspcc-dev/neo3/vm/stackitem_refactoring
...
vm: move StackItem to a separate package
2020-06-08 15:30:44 +03:00
Anna Shaleva
7ca2807875
vm/encoding: move bigint from vm to encoding package
2020-06-08 13:27:13 +03:00
Evgenii Stratonikov
b28a8f2548
rpc: encode ContractState.Script in base64
2020-06-08 10:40:52 +03:00
Evgenii Stratonikov
138385e512
transaction: encode Script in base64
2020-06-08 10:31:51 +03:00
Evgenii Stratonikov
96c2cc0322
smartcontract: marshal ByteArray and Signature in base64
2020-06-08 10:27:39 +03:00
Evgenii Stratonikov
1fa25efa79
transaction: encode witness scripts in base64
2020-06-08 10:23:56 +03:00
Roman Khimov
3677358057
rpc/result: fix block confirmations counting
...
It should be the same as for headers and transactions.
2020-06-05 19:27:39 +03:00
Roman Khimov
709146f295
transaction: drop Inputs and Outputs, forget UTXO
2020-06-05 19:20:16 +03:00
Roman Khimov
21efccd300
transaction: remove type field, set Version to 0
...
Two changes being done here, because they require a lot of updates to
tests. Now we're back into version 0 and we only have one type of
transaction.
It also removes GetType and GetScript interops, both are obsolete in Neo 3.
2020-06-05 19:20:16 +03:00
Roman Khimov
f445f7c602
transaction: drop Contract transaction type
2020-06-05 19:20:16 +03:00
Roman Khimov
c6ae954e4e
rpc: drop getaccountstate method
...
It's not relevant for Neo 3.
2020-06-05 19:20:16 +03:00
Roman Khimov
657bb7575e
rpc: change getunclaimed to getunclaimedgas
...
getunclaimed doesn't exist on Neo 3 and getunclaimedgas works for NEP5 GAS.
2020-06-05 19:20:16 +03:00
Roman Khimov
d856df36a7
rpc: drop support for gettxout method
...
Neo 3 doesn't need it.
2020-06-05 19:20:16 +03:00
Roman Khimov
232e1a2598
rpc: drop support for getassetstate
...
It's for UTXO assets and it's absent in Neo 3.
2020-06-05 19:20:16 +03:00
Roman Khimov
63eb6069b2
rpc: drop support for getunspents method
...
Irrelevant for Neo 3.
2020-06-05 19:20:16 +03:00
Roman Khimov
337e65b696
rpc: drop UTXO transfer support, remove Balancer
...
Nothing uses them now and they're irrelevant for Neo 3.
2020-06-05 19:20:16 +03:00
Roman Khimov
c0e044961d
cli/wallet: add ability to save NEP5 transfer transaction
...
It allows to use multisig cli operations for multisig transaction creation and
send.
2020-06-05 19:20:16 +03:00
Roman Khimov
9a4e53b58e
rpc/client: no longer add UTXO GAS for fees
...
It's already being paid with NEP5 GAS.
2020-06-05 19:20:16 +03:00
Roman Khimov
670396b908
rpc: drop getclaimable RPC call support
...
It's not present in NEO 3 and it's not needed there.
2020-06-05 19:20:16 +03:00
Roman Khimov
3b2644da4f
rpc/client: pass token as simple hash into TransferNEP5
...
It doesn't need full wallet.Token structure.
2020-06-05 19:20:16 +03:00
Roman Khimov
ed0a3e4af5
rpc/client: drop neoscan support
...
It was used as getunspents substitute and it's not longer relevant for NEO 3.
2020-06-05 19:20:16 +03:00
Roman Khimov
d9400800e3
transaction: drop Gas field from InvocationTX
...
It essentialy is the new SystemFee, so use that. Had to increase GAS transfer
in test chain to 1000 to pay for deployment.
2020-06-05 19:20:16 +03:00
Roman Khimov
a446821753
Merge pull request #980 from nspcc-dev/neo3/protocol/version_payload_optimisation
...
protocol: add node capabilities
2020-05-27 19:13:00 +03:00
Anna Shaleva
c590cc02f4
protocol: add capabilities to version payload
...
closes #871
2020-05-27 19:01:14 +03:00