Commit graph

3729 commits

Author SHA1 Message Date
Evgenii Stratonikov
d4723d8e81 cli: use default adress in transfer 2021-01-12 11:14:40 +03:00
Roman Khimov
ee10ea19e7
Merge pull request #1654 from nspcc-dev/fix/balance
cli: output nep17 balance using decimals
2021-01-11 23:52:54 +03:00
Evgenii Stratonikov
d737915843 cli: output nep17 balance using decimals
Also fix balance tests to match full line, not just prefix.
2021-01-11 15:02:24 +03:00
Roman Khimov
729902a293
Merge pull request #1642 from nspcc-dev/vmcli/run
vmcli: use manifest for method execution
2021-01-11 12:45:08 +03:00
Evgenii Stratonikov
1d4d93b3eb vmcli: use manifest for method execution 2021-01-11 10:45:42 +03:00
Roman Khimov
a0c4deb20f
Merge pull request #1630 from nspcc-dev/oracle_response
core: add ProtocolNotSupported oracle response code
2020-12-30 17:29:48 +03:00
Roman Khimov
a84ffccf21
Merge pull request #1643 from nspcc-dev/default_vm_interops_prices
vm: adjust default VM interops prices
2020-12-29 14:37:18 +03:00
Anna Shaleva
be3692136e vm: adjust default VM interops prices
It might be not so important, because we use them only for VM-CLI, but
let's keep them equal to the standard interops prices.
2020-12-29 11:11:56 +03:00
Roman Khimov
a8bb040558 *: fix ineffassign goreportcard warnings 2020-12-28 17:31:50 +03:00
Roman Khimov
459ad521ab *: fix misspellings spotted by goreportcard 2020-12-28 17:27:04 +03:00
Roman Khimov
811f38eaed *: gofmt -s 2020-12-28 17:23:30 +03:00
Roman Khimov
25435bbb52 CHANGELOG/ROADMAP: release 0.92.0 2020-12-28 16:53:52 +03:00
Roman Khimov
197b98f40b
Merge pull request #1640 from nspcc-dev/fix/mpt
Hotfixes for testnet
2020-12-26 09:04:18 +03:00
Evgenii Stratonikov
c2f70a179b Revert "mpt: do not allocate new buffer when updating dirty node"
This reverts commit 168ba7960c.

It seems, there are some problems with it:
`2020-12-25T18:13:07.476+0300    WARN    blockQueue: failed adding block into the blockchain     {"error": "error while trying to apply MPT changes: unexpected EOF", "blockHeight": 9729, "nextIndex": 9730}`
2020-12-25 18:42:47 +03:00
Roman Khimov
c1409844f5
Merge pull request #1639 from nspcc-dev/preview4-fixes-2
core: fix (*NEO).getCandidates
2020-12-25 17:18:48 +03:00
Anna Shaleva
c13382e27d core: fix (*NEO).getCandidates
Don't need to pay attention to key prefix while sorting.
2020-12-25 17:03:05 +03:00
Roman Khimov
756785acd3
Merge pull request #1638 from nspcc-dev/fix/mpt
mpt: do not allocate new buffer when updating dirty node
2020-12-25 14:52:09 +03:00
Roman Khimov
f11a223709
Merge pull request #1637 from nspcc-dev/broadcast
network: support non-blocking broadcast
2020-12-25 14:50:34 +03:00
Evgenii Stratonikov
30423f3306 mpt: update MPT after the block processing 2020-12-25 14:40:23 +03:00
Evgenii Stratonikov
84a3474fc5 network: set timeout on write
Fix a bug occuring under high load when node
hangs during this write.
2020-12-25 14:36:53 +03:00
Evgenii Stratonikov
5bd6c1e5cc 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-25 14:36:53 +03:00
Evgenii Stratonikov
2cb536a6a1 network: provide NullPayload where necessary 2020-12-25 14:36:53 +03:00
Evgenii Stratonikov
0a5049658f network: support non-blocking broadcast
Right now a single slow peer can slow down whole network.
Do broadcast in 2 parts:
1. Perform non-blocking send to all peers if possible.
2. Perform blocking sends until message is sent to 2/3 of good peers.
2020-12-25 14:36:52 +03:00
Evgenii Stratonikov
168ba7960c mpt: do not allocate new buffer when updating dirty node
Running time becomes faster under high load while staying the same in
the average case.
Memory allocation done in `Trie` goes down by about ~10% (even more,
actually).
2020-12-25 11:33:49 +03:00
Roman Khimov
9fcee12276
Merge pull request #1636 from nspcc-dev/states_fixes
core: preview4 compatibility fixes
2020-12-24 14:25:31 +03:00
Anna Shaleva
bc3f8a3b48 core: fix (*NEO).computeCommitteeMembers
In (*NEO).computeCommitteeMembers we return standbyCommittee in case
if there's not enought candidates. But there can be standby committee
members among candidates, so we need to fill in known votes.
2020-12-24 12:47:42 +03:00
Anna Shaleva
be0609cc7a rpc: fix getapplicationlog RPC handler
Fixes the following panic:
```
2020/12/22 18:16:09 http: panic serving 127.0.0.1:50228: runtime error: invalid memory address or nil pointer dereference
goroutine 4043 [running]:
net/http.(*conn).serve.func1(0xc00094c960)
	net/http/server.go:1772 +0x139
panic(0xcd9b40, 0x16a94e0)
	runtime/panic.go:973 +0x396
github.com/nspcc-dev/neo-go/pkg/rpc/server.(*Server).getApplicationLog(0xc000094ea0, 0xc000472d20, 0x2, 0x4, 0xc0000be228, 0xc0007ad601, 0x28)
	github.com/nspcc-dev/neo-go/pkg/rpc/server/server.go:542 +0xac
github.com/nspcc-dev/neo-go/pkg/rpc/server.(*Server).handleIn(0xc000094ea0, 0xc000089770, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	github.com/nspcc-dev/neo-go/pkg/rpc/server/server.go:326 +0x981
github.com/nspcc-dev/neo-go/pkg/rpc/server.(*Server).handleRequest(0xc000094ea0, 0xc001bccba0, 0x0, 0x0, 0x0)
	github.com/nspcc-dev/neo-go/pkg/rpc/server/server.go:296 +0x26a
github.com/nspcc-dev/neo-go/pkg/rpc/server.(*Server).handleHTTPRequest(0xc000094ea0, 0x1071f40, 0xc000b089a0, 0xc00053c200)
	github.com/nspcc-dev/neo-go/pkg/rpc/server/server.go:290 +0x91b
net/http.HandlerFunc.ServeHTTP(0xc0004e61b0, 0x1071f40, 0xc000b089a0, 0xc00053c200)
	net/http/server.go:2012 +0x44
net/http.serverHandler.ServeHTTP(0xc0000d2ee0, 0x1071f40, 0xc000b089a0, 0xc00053c200)
	net/http/server.go:2807 +0xa3
net/http.(*conn).serve(0xc00094c960, 0x10749c0, 0xc0006ae980)
	net/http/server.go:1895 +0x86c
created by net/http.(*Server).Serve
	net/http/server.go:2933 +0x35c

```
2020-12-23 11:18:44 +03:00
Anna Shaleva
33386065bc core: adjust parameters of native methods
This commit is mostly about Hash160 -> ByteArray for native contracts'
methods. Manifest is included into states, so we need to be compatible.
2020-12-23 11:18:44 +03:00
Anna Shaleva
e40f3610ed core: store MinimumDeploymentFee as uint32 2020-12-22 16:09:16 +03:00
Roman Khimov
df6cb11017
Merge pull request #1631 from nspcc-dev/fix/appexec
vm: allow to serialize interop items
2020-12-22 13:20:30 +03:00
Roman Khimov
fb48bc3f91
Merge pull request #1635 from nspcc-dev/max_gas_invoke
config: update MaxGasInvoke
2020-12-22 13:09:24 +03:00
Anna Shaleva
2c58f274d0 config: update MaxGasInvoke 2020-12-22 12:25:34 +03:00
Roman Khimov
19d7267773
Merge pull request #1633 from nspcc-dev/payload_test
consensus: update binary payload tests
2020-12-21 13:36:26 +03:00
Roman Khimov
aab175f471
Merge pull request #1634 from nspcc-dev/dbft
go.mod: update dbft version
2020-12-21 13:36:05 +03:00
Evgenii Stratonikov
d6ec1290c5 go.mod: update dbft version
Close #1632.
2020-12-21 13:20:23 +03:00
Anna Shaleva
766f66c5ca consensus: update binary payload tests 2020-12-21 12:51:07 +03:00
Roman Khimov
dee97d8542
Merge pull request #1524 from nspcc-dev/rpc/invoke_verify
rpc: add `invokecontractverify` RPC-method
2020-12-21 10:36:54 +03:00
Roman Khimov
0ce948332d
Merge pull request #1624 from nspcc-dev/core/managment_fix
core: managment contract updates
2020-12-20 00:21:42 +03:00
Roman Khimov
a697ff40f6
Merge pull request #1628 from nspcc-dev/cli/hash
cli: allow to calculate contract hash before deployment
2020-12-18 18:18:28 +03:00
Anna Shaleva
b1324db847 core: add notifications to ManagmentContract 2020-12-18 16:52:51 +03:00
Anna Shaleva
d34353aec2 core: add MinimumDeploymentFee 2020-12-18 16:48:05 +03:00
Anna Shaleva
a65544aab1 core: fix Managment destroy price
Too expensive.
2020-12-18 16:46:09 +03:00
Roman Khimov
203f8adc9d
Merge pull request #1618 from nspcc-dev/contractcache
native: cache contract in Management contract
2020-12-18 14:59:42 +03:00
Evgenii Stratonikov
3397f2c9be native: cache contract in Management contract 2020-12-18 13:11:17 +03:00
Evgenii Stratonikov
8c22d27acc state: allow to encode AppExecResult with recursive items
1. Encode them to a special type, decode to `nil`.
2. `Interop` can be encoded in JSON, this info should also be preserved.
2020-12-18 13:04:31 +03:00
Anna Shaleva
e0d76d873e core: add ProtocolNotSupported oracle response code 2020-12-18 13:01:45 +03:00
Evgenii Stratonikov
c49eb86a2e cli: allow to calculate contract hash before deployment 2020-12-17 15:44:42 +03:00
Roman Khimov
c13d6ecc55
Merge pull request #1625 from nspcc-dev/fix_oracle
core: restrict allowed Oracle callbacks
2020-12-17 13:21:58 +03:00
Anna Shaleva
31b06907c9 core: restrict allowed Oracle callbacks 2020-12-17 11:41:28 +03:00
Roman Khimov
f2365e2392
Merge pull request #1620 from nspcc-dev/fix/consensus
consensus: validate timestamp in `verifyBlock()`
2020-12-16 19:13:15 +03:00