Roman Khimov
dfa53c635d
config: revert the wrong part of 8850ecd4c
...
Sorry.
2020-08-10 19:56:34 +03:00
Roman Khimov
d8aac7c675
Merge pull request #1291 from nspcc-dev/stateroot-relaying-during-commit-2.x
...
Stateroot relaying during commit 2.x
2020-08-10 19:22:17 +03:00
Roman Khimov
47ed2eda43
docs: update neox.md with the latest protocol changes
2020-08-10 16:48:05 +03:00
Roman Khimov
8850ecd4ca
config: enable stateroot for mainnet
...
See neo-project/neo-node#644 .
2020-08-10 16:48:05 +03:00
Roman Khimov
92f8cee6cd
network: raise MPTRoot broadcast priority
...
It can affect consensus process.
2020-08-10 16:48:05 +03:00
Roman Khimov
ab7a69bfec
network: prevent useless getroots requests
...
At the height of A we only reliably have a state root for A-1, so there is no
point in requesting state root for A from our peers. Prevents tons of useless
traffic:
2020-08-10T00:02:35.537+0300 DEBUG got msg {"addr": "127.0.0.1:20333", "type": "getroots"}
2020-08-10T00:02:35.537+0300 DEBUG got msg {"addr": "127.0.0.1:20333", "type": "roots"}
2020-08-10T00:02:35.537+0300 DEBUG got msg {"addr": "127.0.0.1:20333", "type": "getroots"}
2020-08-10T00:02:35.537+0300 DEBUG got msg {"addr": "127.0.0.1:20333", "type": "roots"}
2020-08-10T00:02:35.539+0300 DEBUG got msg {"addr": "127.0.0.1:20335", "type": "getroots"}
2020-08-10T00:02:35.539+0300 DEBUG got msg {"addr": "127.0.0.1:20335", "type": "roots"}
2020-08-10T00:02:35.539+0300 DEBUG got msg {"addr": "127.0.0.1:20334", "type": "getroots"}
2020-08-10T00:02:35.539+0300 DEBUG got msg {"addr": "127.0.0.1:20334", "type": "roots"}
2020-08-10T00:02:35.540+0300 DEBUG got msg {"addr": "127.0.0.1:20334", "type": "getroots"}
2020-08-10T00:02:35.540+0300 DEBUG got msg {"addr": "127.0.0.1:20334", "type": "roots"}
2020-08-10T00:02:35.542+0300 DEBUG got msg {"addr": "127.0.0.1:20336", "type": "getroots"}
2020-08-10T00:02:35.542+0300 DEBUG got msg {"addr": "127.0.0.1:20336", "type": "roots"}
2020-08-10 16:48:05 +03:00
Roman Khimov
253c39d4ee
consensus: move stateroot message generation to commit phase
...
* update dbft library, change to 64-bit timestamps and CV reason
* modify messages
* generate stateroot witness data from prepare* messages during commit
Fix #1273 .
2020-08-10 16:48:05 +03:00
Roman Khimov
ffbdcb202f
Merge pull request #1288 from nspcc-dev/fix/utxo
...
rpc: adjust `getutxotransfers` RPC
2020-08-07 19:08:46 +03:00
Evgenii Stratonikov
57a325b3d5
rpc: adjust getutxotransfers
RPC
2020-08-07 18:12:40 +03:00
Roman Khimov
ebcec6e5dc
Merge pull request #1282 from nspcc-dev/rpc/invoke_with_hashes
...
rpc: use hashes for verifying in `invoke*` calls
2020-08-07 17:00:36 +03:00
Anna Shaleva
4b351f3123
cli: use hashes for verifying in invoke*
calls
2020-08-07 14:41:44 +03:00
Anna Shaleva
d20e54b725
rpc: fix method comment
2020-08-07 13:19:00 +03:00
Anna Shaleva
4715efd531
core, rpc: invoke script with hashes for verifying
...
Closes #1275
2020-08-07 13:18:55 +03:00
Roman Khimov
92851aa8e4
Merge pull request #1285 from nspcc-dev/drop-go1.12-2.x
...
[2.x] Drop go 1.12 support
2020-08-07 12:40:12 +03:00
Roman Khimov
f1ac01578b
Merge pull request #1284 from nspcc-dev/feature/nep5timestamps
...
rpc: provide timestamps in `getnep5transfers`
2020-08-07 12:34:43 +03:00
Roman Khimov
010d55e92f
use -trimpath build flag for more reproducible builds
...
Fix #349 .
2020-08-07 12:26:18 +03:00
Roman Khimov
bb4385ca50
drop support for Go 1.12
...
It's old and not maintained. Use latest Go for builds and test only with 1.13
and 1.14.
2020-08-07 12:25:45 +03:00
Roman Khimov
db98f8f30b
Merge pull request #1274 from nspcc-dev/lowercase-json-field-names-for-stateroot
...
rpc: use lowercase JSON field names for StateHeight
2020-08-07 12:24:59 +03:00
Evgenii Stratonikov
02033f8355
rpc: set default values in getutxotransfers
2020-08-07 09:49:09 +03:00
Evgenii Stratonikov
fe5e5ff44a
rpc: provide timestamps in getnep5transfers
...
Set default value for the first timestamp to a week ago.
2020-08-07 09:43:23 +03:00
Roman Khimov
9aa7b7fc97
Merge pull request #1268 from nspcc-dev/feature/utxo
...
Implement `getutxotransfers` RPC (2.x)
2020-08-06 16:19:55 +03:00
Roman Khimov
edeb9a3d2e
Merge pull request #1272 from nspcc-dev/consensus/fix
...
consensus: create recovery message with state root
2020-08-06 15:16:34 +03:00
Evgenii Stratonikov
7bd4488ff9
core: do not store NEP5 transfer log in memory
...
Traversing transfer log instead of accumulating and returning it
is faster and takes less memory.
2020-08-06 14:22:30 +03:00
Evgenii Stratonikov
022fb04077
rpc: implement getutxotransfers
RPC
2020-08-06 14:16:28 +03:00
Evgenii Stratonikov
407e348cd5
core: save UTXO transfer info
2020-08-06 14:03:21 +03:00
Roman Khimov
ab5eff620b
rpc: use lowercase JSON field names for StateHeight
...
Follow neo-project/neo#1808 . Note that this is an incompatible change, but
this feature is still considered to be experimental upstream.
2020-08-05 18:15:29 +03:00
Anna Shaleva
50e5e6fe29
consensus: create recovery message with state root
...
Closes #1270
2020-08-05 17:08:24 +03:00
Evgenii Stratonikov
e4fcd90b6d
state: make NEP5Transfer log more generic
2020-08-04 16:57:36 +03:00
Evgenii Stratonikov
49f9c4ad7e
dao: rename transfers to nep5transfers
2020-08-04 15:50:09 +03:00
Roman Khimov
e135719c38
Merge pull request #1250 from nspcc-dev/fix/nep5
...
Fix `getnep5*` RPC format
2020-08-03 18:05:39 +03:00
Evgenii Stratonikov
c4c9f9225c
rpc: return raw values in getnep5*
...
C# nodes format result without using decimals.
2020-08-03 11:00:15 +03:00
Evgenii Stratonikov
c6d33c5841
core: save NEP5 transfer notify index
...
TransferNotifyIndex is the index of transfer event in the list
of all transfers in a transaction.
2020-08-03 10:58:23 +03:00
fyrchik
a702423c4a
Merge pull request #1217 from nspcc-dev/fix/nep5transfers
...
rpc: return transfers for migrated contracts
2020-07-31 19:43:09 +03:00
Evgenii Stratonikov
f0d75afc48
rpc: provide old transfers in getnep5transfers
...
Return performed transfers even if contract was migrated.
2020-07-24 14:39:16 +03:00
Evgenii Stratonikov
7cd1bca1e1
core,dao: save contract metadata on migration
...
After contract is migrated there is no way to retrieve it's state.
This commit implements some metadata for NEP5 contracts, so that
values important for diplaying transfer log aren't lost.
2020-07-24 14:38:10 +03:00
Evgenii Stratonikov
7bdbfbad19
rpc: fix getnep5transfers
address check condition
2020-07-21 11:12:40 +03:00
Roman Khimov
8341913468
CHANGELOG: release 0.76.2
2020-07-19 07:43:41 +03:00
Roman Khimov
7d5d6b620e
Merge pull request #1213 from nspcc-dev/fix-stateheight-sync-for-nonzero-enableindex
...
core: fix stateroot height update for testnet
2020-07-18 21:37:11 +03:00
Roman Khimov
692565c5a2
network: fix stateroot processing for StateRootEnableIndex != 0
...
We we missing stateroot for StateRootEnableIndex, starting only with
StateRootEnableIndex + 1.
2020-07-18 20:58:47 +03:00
Roman Khimov
6d32751292
core: fix stateroot height update for testnet
...
When synchronizing with stateroot-enabled network from genesis and if
stateroot is not enabled in block zero we were failing to update state height
because initially it's updated with a jump from 0 to StateRootEnableIndex, so
we should allow that to happen to have correct state height.
2020-07-18 10:17:17 +03:00
Roman Khimov
dbbe57d11a
Merge pull request #1186 from nspcc-dev/fix-astack-clearance-on-call-2.x
...
vm: clear altstack on CALL, fix #1158
2020-07-18 07:32:05 +03:00
Roman Khimov
35c60cd8f4
vm: fix elements counting for isolated calls
...
The map and the counter are VM-wide, not context-specific, that's the whole
point of them.
2020-07-18 07:27:08 +03:00
Roman Khimov
3d62db4f34
vm: clear altstack on CALL, fix #1158
...
neo-vm doesn't copy altstack on CALL, so it effectively is cleared. But we
need to copy things back on return if there are any.
2020-07-18 07:27:08 +03:00
Roman Khimov
38c195fea9
Merge pull request #1185 from nspcc-dev/fix-panic-on-shutdown-2.x
...
network: copy peers for Shutdown iteration
2020-07-16 16:23:58 +03:00
Roman Khimov
4d0f4d3e51
network: copy peers for Shutdown iteration
...
We can't lock them (or there will be a deadlock), but we need to fix this:
fatal error: concurrent map iteration and map write
goroutine 1 [running]:
runtime.throw(0xdec086, 0x26)
/usr/lib64/go/1.12/src/runtime/panic.go:617 +0x72 fp=0xc02fec2bf8 sp=0xc02fec2bc8 pc=0x42d932
runtime.mapiternext(0xc02fec2d40)
/usr/lib64/go/1.12/src/runtime/map.go:860 +0x597 fp=0xc02fec2c80 sp=0xc02fec2bf8 pc=0x40efe7
github.com/nspcc-dev/neo-go/pkg/network.(*Server).Shutdown(0xc0000fc160)
/home/rik/dev/neo-go2/pkg/network/server.go:194 +0x238 fp=0xc02fec2db0 sp=0xc02fec2c80 pc=0xa89da8
github.com/nspcc-dev/neo-go/cli/server.startServer(0xc0000fcc60, 0x0, 0x0)
/home/rik/dev/neo-go2/cli/server/server.go:399 +0x7a9 fp=0xc02fec3820 sp=0xc02fec2db0 pc=0xae2079
...
2020-07-16 11:43:34 +03:00
Roman Khimov
e375267422
ROADMAP: drop from master-2.x branch
...
It makes no sense there, master-2.x doesn't really have any ROADMAP any more
and Neo 3 development is being tracked in master branch.
2020-07-15 17:56:35 +03:00
Roman Khimov
4374e98f15
CHANGELOG: release 0.76.1
2020-07-15 17:40:51 +03:00
Roman Khimov
bf3c29c319
Merge pull request #1149 from nspcc-dev/fix-nep5-balances-2.x
...
Fix nep5 balances migration (2.x)
2020-07-07 22:05:01 +03:00
Roman Khimov
1ab4f81fc3
dao: migrate nep5 balances with the contract
...
Fixes #1144 . It's quite simple approach, we just update balance info right
upon contract migration. It will slow down migration transactions, but it
takes about 1-2 seconds to Seek through balances at mainnet's 3.8M, so the
approach should still work good enough. The other idea was to make lazy
updates (maintaining contract migration map), but it's more complicated to
implement (and implies that a balance get might also do a write).
There also is a concern about memory usage, it can give a spike of some tens
of megabytes, but that also is considered to be acceptable.
2020-07-07 19:55:55 +03:00
Roman Khimov
fd778e0250
Merge pull request #1146 from nspcc-dev/fix/getnep5balances
...
rpc: support stringified address in getnep5balances RPC
2020-07-03 18:56:34 +03:00