Commit graph

35 commits

Author SHA1 Message Date
Anna Shaleva
7acf5b2841 core: add SystemFee and NetworkFee to transaction
closes #831
2020-05-20 23:26:48 +03:00
Anna Shaleva
55fd9f8d24 core: change block.ConsensusData to neo3 format
1. Dropped `Base.ConsensusData` block field

2. Added `Block.ConsensusData` field with `Nonce` and `PrimaryIndex`

3. Removed "Neo.Header.GetConsensusData" and
"AntShares.Header.GetConsensusData" interops
2020-04-27 17:57:37 +03:00
Anna Shaleva
aa554f0a9a core: update block timestamp format
Changed block.Timestamp from uint32 to uint64
2020-04-27 17:56:44 +03:00
Roman Khimov
b83e84ca08 core: switch to the new voting system (via native NEO contract)
It has all the methods required now, so you can register, vote and get
voting results. Fixes #865.
2020-04-27 16:06:50 +03:00
Roman Khimov
2fa3bdf6a9 core/native: move Votes from account to native NEO state 2020-04-27 12:30:39 +03:00
Evgenii Stratonikov
a7c19d445b core: move Blockchainer interface to a separate package 2020-04-11 10:56:36 +03:00
Roman Khimov
e41853d0a4
Merge pull request #789 from nspcc-dev/fix/tx_specific_data_marshalling
rpc: fix marshalling of type-specific tx data
2020-03-30 16:10:25 +03:00
Anna Shaleva
9c09ad9c89 rpc: fix marshalling of type-specific tx data
closes #585
2020-03-30 15:48:50 +03:00
Roman Khimov
2316e2c4a7 rpc: fix stack field name for invocation results
Follow C# implementation:
https://docs.neo.org/docs/en-us/reference/rpc/latest-version/api/invokefunction.html
2020-03-28 13:59:42 +03:00
Anna Shaleva
ca12c75b12 rpc: fix name of json nep5balance field
Problem: wrong json field name of result.NEP5Balances.Balances
(see for details:
https://github.com/neo-project/neo-modules/blob/master-2.x/RpcNep5Tracker/RpcNep5Tracker.cs#L295)

Solution: rename field from `balances` to `balance` to be consistent with C# client
2020-03-24 14:55:20 +03:00
Anna Shaleva
4911837949 rpc: fix wrong script marshalling in getcontractstate RPC server
problem: `script` field of result.ContractState is marshalled as []byte

solution: add marshaller for result.ContractState
2020-03-24 14:55:20 +03:00
Anna Shaleva
79f7862496 rpc: fix blockheader marshalling in getblockheader RPC server
Problem: wrong json marshalling of `nextconsensus` field of
result.Header

Solution: change field type from util.uint160 to address string
2020-03-24 14:55:20 +03:00
Roman Khimov
751e79d480
Merge pull request #785 from nspcc-dev/feature/uint160_marshalling
util: JSONify uint160 using LE instead of BE
2020-03-24 12:41:07 +03:00
Anna Shaleva
2187346158 rpc: fix json marshalling of result.AssetState
Modified result.AssetState:
	- removed `FeeMode` and `FeeAddress` fields
	- fixed json name of `ID` and `AssetType` fields
to be consistent with C# RPC server
2020-03-23 17:44:15 +03:00
Anna Shaleva
2001a40312 util: JSONify uint160 using LE instead of BE
closes #769
2020-03-23 17:38:58 +03:00
Evgenii Stratonikov
6ed2bd63b9 core: marshal AppExecResult.Stack as an array
Closes #782.
2020-03-23 16:27:47 +03:00
Roman Khimov
e9429374aa
Merge pull request #756 from nspcc-dev/feature/unclaimed
core/state: do not unmarshal Unclaimed balances in account
2020-03-16 13:21:23 +03:00
Evgenii Stratonikov
e503d1001d core/state: do not unmarshal Unclaimed balances in account 2020-03-16 12:19:32 +03:00
Evgenii Stratonikov
66727ab8fa rpc: marshal Asset hash in LE in getnep5balances RPC 2020-03-16 10:14:55 +03:00
Anna Shaleva
784bac0b38 rpc: bug with empty stack marshalling in getapplicationlog
Problem: cannot marshall empty raw message from appExecResult.Stack

Solution: add handler for case when appExecResult.Stack is an empty string
2020-03-13 12:50:51 +03:00
Anna Shaleva
c23a522d25 rpc: implement getunclaimed
closes #712
2020-03-11 18:33:15 +03:00
Roman Khimov
4b83e9a5cd
Merge pull request #732 from nspcc-dev/feature/getvalidators
rpc: implement getvalidators
2020-03-07 21:43:38 +03:00
Anna Shaleva
456a2d55fd rpc: implement getvalidators
closes #714
2020-03-07 18:05:40 +03:00
Evgeniy Kulikov
b34ac22434
[rpc/server] fix getblock verbose response
- Nonce should not trim leading zeros
- NextConsensus should returns address (uint160 -> base58)
2020-03-06 19:53:11 +03:00
Roman Khimov
fbdc60b731
Merge pull request #723 from nspcc-dev/feature/nep5
core,rpc: implement NEP5-related logic
2020-03-05 18:33:58 +03:00
Evgenii Stratonikov
95a8fa234f rpc: implement getnep5transfers RPC 2020-03-05 18:22:40 +03:00
Evgenii Stratonikov
2757882d26 rpc: implement getnep5balances RPC 2020-03-05 18:22:40 +03:00
Anna Shaleva
42e2aff381 rpc: implement getblockheader RPC
closes #711
2020-03-05 14:47:45 +03:00
Roman Khimov
e41d434a49 *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
Roman Khimov
4c8d327353 rpc: drop duplicating Invoke* structures
And use smartcontract.Parameter instead of vm.StackItem where
appropriate. Closes #689.
2020-03-03 15:38:03 +03:00
Roman Khimov
9b4fd99fbc vm: break circular references when recursing into ToContractParameters
Reference types can have circular pointers to each other, thus we need to
control recursion.
2020-03-03 15:38:03 +03:00
Evgenii Stratonikov
51c4868641 rpc: implement getclaimable RPC 2020-03-02 18:01:49 +03:00
Anna Shaleva
ff4384d7ff rpc: implement getapplicationlog RPC
Closes #500
2020-03-02 17:25:27 +03:00
Roman Khimov
877b987ecf rpc: omitempty some fields in TransactionOutputRaw
These might be undefined for mempool transactions, thus they should be defined
as omitempty.
2020-02-21 15:12:04 +03:00
Roman Khimov
69e1ad512f rpc: move result package into response
`response` is to be populated soon.
2020-02-21 15:12:04 +03:00