Roman Khimov
663f10192f
core: record transfers even if 'from' balance is 0
...
Transfer events should still be saved even if balance tracking goes wild.
2021-03-16 12:57:20 +03:00
Roman Khimov
4a2bdf5ddc
Merge pull request #1783 from nspcc-dev/allow-specifying-sysgas-for-invocations-2.x
...
[2.x] cli: allow specifying system fee via -s for invocations
2021-02-27 10:01:51 +03:00
Roman Khimov
483fefbb62
cli: allow specifying system fee via -s for invocations
...
Makes it possible to migrate a contract on Neo 2.
2021-02-26 14:52:45 +03:00
Roman Khimov
259522abde
CHANGELOG: fix typo
2021-02-26 14:46:37 +03:00
Roman Khimov
39a2360448
CHANGELOG: release 0.78.3
2021-02-22 11:51:26 +03:00
Roman Khimov
3f50f90dc5
Merge pull request #1760 from nspcc-dev/rpc-compatibility-fixes-and-docs
...
[2.x] RPC compatibility (and other) fixes and docs
2021-02-19 12:30:59 +03:00
Roman Khimov
1179fdb44d
Merge pull request #1761 from nspcc-dev/backport-from-3.0
...
[2.x] Backport from 3.0
2021-02-19 09:11:27 +03:00
Roman Khimov
98580ae9b4
transaction: always JSONize all contract fields for Publish tx
2021-02-18 17:28:19 +03:00
Roman Khimov
7fc4f3c4ea
transaction: always marshal all token's data for register tx
...
Fix missing precision and token type.
2021-02-18 17:28:19 +03:00
Roman Khimov
9d6a5dc26f
result: fix confirmations count for blocks
...
It's +1, current block actually had `-1` value calcuated that transformed into
4294967295.
2021-02-18 17:28:19 +03:00
Roman Khimov
8571107741
core: bump DB version for NEP5 tracking data change
...
It's incompatible.
2021-02-18 17:28:19 +03:00
Roman Khimov
eb1986d2fc
state: use big.Int for NEP5 balances and transfer amounts
...
In general, NEP5 contracts are not limited to int64. And we have an example
of pnWETH Flamingo token now (with 18 decimals) that easily overflows int64,
so for correctness we need to store big.Int.
And as TransferLog is shared for different purposes I've decided to not make
it variable-length on Neo 2.
2021-02-18 17:28:19 +03:00
Roman Khimov
38842531ca
core: drop NEP5 tracker data if balance is zero
...
Makes no sense storing it and returning to the user (C# plugin doesn't do
that).
2021-02-18 17:28:19 +03:00
Roman Khimov
d4f26fe473
docs: update RPC documentation
...
Add missing methods and notice a bit more implementation differences.
2021-02-18 17:28:19 +03:00
Roman Khimov
07c91ea22d
core: fix getenrollments
...
Make getvalidators return the same set of keys with C# for mainnet.
2021-02-18 17:28:19 +03:00
Roman Khimov
1ef91fa409
rpc: encode port numbers as proper numbers in getpeers
...
The way C# node does it.
2021-02-18 17:28:19 +03:00
Roman Khimov
850d29060a
result: assets are LE in JSON
...
LE/BE split is the worst NEO feature ever.
2021-02-18 17:28:19 +03:00
Roman Khimov
70a20ce031
core: fix system fee calculation
...
It was completely wrong starting from the genesis block.
2021-02-18 17:28:19 +03:00
Roman Khimov
5ff57e890b
consensus: flush previous proposal on new block
...
Reusing proposals from previous blocks doesn't make sense. And reduce some
code duplication along the way.
2021-02-18 15:45:34 +03:00
Roman Khimov
d1e02c393d
consensus: only use previous proposal if it has something in it
...
It might just be uninitialized it doesn't really make sense using zero-length
previous proposal anyway.
2021-02-18 15:42:06 +03:00
Roman Khimov
62a11807a8
fixedn: always correctly unmarshal Fixed8 values
...
Quoted or not, they should be unmarshalled without going through float64.
2021-02-18 15:38:02 +03:00
Evgeniy Stratonikov
feb6ba2ef7
io: allow to restrict string size
2021-02-18 15:36:22 +03:00
Roman Khimov
a46c93f6bb
rpc: fix getblocksystemfee call
...
It should return cumulative fee and it should be wrapped into a string.
2021-02-15 17:58:39 +03:00
Roman Khimov
fda8b784c8
rpc/server: allow numbers for getblockheader call
2021-02-15 17:27:23 +03:00
Roman Khimov
9c34dea296
rpc/server: return more specific error in getblockhash
2021-02-15 16:18:03 +03:00
Roman Khimov
c3b6405f0f
transaction: fix asset type JSONization
...
It's stringy in C#.
2021-02-12 23:02:51 +03:00
Roman Khimov
90a06ed7a5
rpc: fix IsFrozen JSONization for assets
...
C# node uses `frozen` as field name here.
2021-02-12 00:04:13 +03:00
Roman Khimov
9571ecffac
core: add proper asset issuer for UTXO assets
...
It just wasn't set which is wrong (AFmseVrdL9f9oyCzZefL9tG6UbvhPbdYzM was
always the issuer).
2021-02-12 00:01:00 +03:00
Roman Khimov
89fb02a7f8
Merge pull request #1648 from nspcc-dev/backport-fixes-from-master
...
Backport fixes from master to 2.x
2021-01-11 12:44:05 +03:00
Roman Khimov
17c010e07d
Merge pull request #1649 from nspcc-dev/dont-return-spent-in-gettxout
...
rpc: fix gettxout result for already spent outputs
2021-01-02 13:20:06 +03:00
Roman Khimov
9e35758653
rpc: fix gettxout result for already spent outputs
...
As per C# documentation [1]:
If the transaction output is already spent, the result value will be null .
[1]: https://docs.neo.org/docs/en-us/reference/rpc/latest-version/api/gettxout.html
2020-12-31 13:54:42 +03:00
Evgenii Stratonikov
ee45d7739f
network: fix requestTx()
...
2 bugs were here:
1. If amount of tx is small, no messages were sent.
2. Correctly cut byte slice if last message is small.
2020-12-31 13:00:50 +03:00
Roman Khimov
363c24d128
network: fix tx requests, we can't ask more than 500 txes at once
2020-12-31 13:00:00 +03:00
Evgenii Stratonikov
9756ed2b06
network: set timeout on write
...
Fix a bug occuring under high load when node
hangs during this write.
2020-12-31 12:58:00 +03:00
Evgenii Stratonikov
edf587bbf1
network: fix a bug in discovery with a peer connected twice
...
It could be the case that checks are performed simultaneosly and
peers connections goes down from 2 to 0. We must take such case into
account and register address as good in discovery.
2020-12-31 12:57:43 +03:00
Evgenii Stratonikov
0d2bc8f4a6
network: remove extra error check from Message.Encode()
...
Buffer write error is returned from `Encode()`.
2020-12-31 12:52:40 +03:00
Evgenii Stratonikov
0510d1e6c1
vmcli: return after error in break
2020-12-31 12:51:01 +03:00
Evgenii Stratonikov
5d6065c3ee
vmcli: set breakpoint before the instruction
...
Breakpoint should occur before actual instruction execution.
2020-12-31 12:50:52 +03:00
Anna Shaleva
4a8259caea
rpc: adjust getrawtransaction
and gettransactionheight
RPC call
...
We should not return transaction metadata from `getrawtransaction` in case
transaction is not in the mempool. Height shouldn't be returned from
`gettransactionheight` in case transaction is in the mempool.
2020-12-31 12:44:07 +03:00
Roman Khimov
124c674b17
*: gofmt -s
2020-12-31 11:52:27 +03:00
Roman Khimov
50f477b2af
Merge pull request #1623 from nspcc-dev/2x/core/mempool_fix
...
[master-2.x] core: fix bug with mempool.verifiedMap
2020-12-16 16:54:46 +03:00
Anna Shaleva
66a64dd4c9
core: fix bug with mempool.verifiedMap
...
Changes ported from #1621 .
2020-12-16 14:14:09 +03:00
Roman Khimov
0333107327
CHANGELOG: release 0.78.2
2020-12-03 15:41:39 +03:00
Roman Khimov
75c4251a06
Merge pull request #1588 from nspcc-dev/keep-only-latest-in-the-config
...
config: add KeepOnlyLatestState setting where EnableStateRoot is set
2020-12-02 20:26:09 +03:00
Roman Khimov
73bb2c2543
config: add KeepOnlyLatestState setting where EnableStateRoot is set
...
With its default value set to `false`.
2020-12-02 16:52:04 +03:00
Roman Khimov
64d0876fc0
Merge pull request #1503 from nspcc-dev/mpt/refcount
...
Implement reference counting in MPT
2020-11-18 14:20:42 +03:00
Evgenii Stratonikov
0ffffb93d7
mpt: implement reference counting
2020-11-18 12:16:05 +03:00
Roman Khimov
3a1b67e9f7
Merge pull request #1532 from nspcc-dev/feature/retransmit
...
network: retransmit stale transactions
2020-11-12 14:27:27 +03:00
Evgenii Stratonikov
d93ddfda10
network: retransmit stale transactions
2020-11-11 15:51:36 +03:00
Roman Khimov
06f3c34981
mempool: replace timeStamp with blockStamp
...
Time is not really relevant for us here and we don't use this timestamp in any
way. Yet it occupies 24 bytes and we do two clock_gettime calls to get it.
Replace it with blockStamp which is going to be used in the future for
transaction retransmissions.
It allows to improve single-node TPS by another 3%.
2020-11-11 15:48:13 +03:00