Evgenii Stratonikov
2dcd366ef9
network: remove extra error check from Message.Encode()
...
Buffer write error is returned from `Encode()`.
2020-12-04 15:00:35 +03:00
Evgenii Stratonikov
63aebfeae3
network: fix MerkleBlock
serialization
...
1. It contains `block.Base` thus needs network magic.
2. TxCount should match number of hashes.
2020-12-04 14:59:13 +03:00
Roman Khimov
2d7b823f25
Merge pull request #1587 from nspcc-dev/tests/interop
...
Extend test suite for interops
2020-12-03 17:01:23 +03:00
Evgenii Stratonikov
6e749f4977
core: add tests for crypto interops
...
Also move related test from `core/`.
2020-12-03 14:14:35 +03:00
Evgenii Stratonikov
d5b4553bb3
keys: allow to create keys on arbitrary curve
2020-12-03 14:06:35 +03:00
Evgenii Stratonikov
5bd8ca9597
core/tests: extend test suite
2020-12-03 14:02:58 +03:00
Evgenii Stratonikov
dcc58b7c44
core: validate manifest before incrementing ID in Contract.Create
...
Also add more tests.
2020-12-02 15:54:03 +03:00
Evgenii Stratonikov
b203c23515
core: cover enumerator/iterator interops
2020-12-02 15:54:03 +03:00
Evgenii Stratonikov
e4ee7cd407
vm: improve coverage for default interops
2020-12-02 15:54:03 +03:00
Evgenii Stratonikov
d136569ac8
core: move System.Binary.*
interops to binary/
package
...
Also extend test suite.
2020-12-02 15:54:03 +03:00
Evgenii Stratonikov
2eb256014e
core: move System.Runtime.*
interops to runtime/
package
...
Also extend test suite.
2020-12-02 15:54:03 +03:00
Roman Khimov
972b0f176d
Merge pull request #1584 from nspcc-dev/tests/vmcli
...
Add tests for `vmcli`
2020-12-02 13:33:44 +03:00
Roman Khimov
0c1d1e061d
Merge pull request #1568 from nspcc-dev/blockfetch
...
network: fetch blocks in parallel
2020-12-02 10:59:43 +03:00
Evgenii Stratonikov
4aa1a37f3f
network: fetch blocks in parallel
...
Blockcache size is 2000, while max request size is 500.
Try to fetch blocks in chunks starting from current height.
Lower height has priority.
2020-12-02 10:50:35 +03:00
Evgenii Stratonikov
33f13ab1c0
vmcli: add tests
2020-12-02 10:49:37 +03:00
Evgenii Stratonikov
f8728e4f44
vmcli: unify error messages
2020-12-02 10:49:37 +03:00
Evgenii Stratonikov
bea5125d42
vmcli: return after error in break
2020-12-02 10:49:37 +03:00
Evgenii Stratonikov
d7ffa89811
vmcli: set breakpoint before the instruction
...
Breakpoint should occur before actual instruction execution.
2020-12-02 10:49:37 +03:00
Evgenii Stratonikov
2f39701d76
vm: provide writer in PrintOps()
...
Make it more flexible and testable. Fallback to using
stdout if no writer is provided.
2020-12-02 10:49:37 +03:00
Roman Khimov
9a4183abb9
Merge pull request #1583 from nspcc-dev/tests/dump
...
cli: add tests for `db dump/restore`
2020-12-01 19:36:24 +03:00
Evgenii Stratonikov
99bdee676a
cli: add tests for db dump/restore
2020-12-01 18:38:09 +03:00
Roman Khimov
9211cb636c
Merge pull request #1555 from nspcc-dev/constant-contract-hashes
...
Constant contract hashes
2020-12-01 14:12:26 +03:00
Roman Khimov
795b2bd713
Merge pull request #1573 from nspcc-dev/doubleresponse
...
mempool: correctly handle tx with oracle response
2020-12-01 12:42:42 +03:00
Evgenii Stratonikov
1db27c004e
native: do not fail on missing request in Oracle.PostPersist()
2020-12-01 12:29:18 +03:00
Evgenii Stratonikov
cba117352c
mempool: correctly handle tx with oracle response
...
If tx with the same oracle response ID is already in mempool,
replace it if network fee of added transaction is higher and
return error otherwise.
2020-12-01 12:29:18 +03:00
Roman Khimov
0cf8dae1c3
Merge pull request #1574 from nspcc-dev/onpayment
...
native: call `onPayment` only during `transfer`
2020-12-01 11:07:20 +03:00
Evgenii Stratonikov
3085710e9b
native: call onPayment
only during transfer
...
OnPayment method should be called during GAS distribution
and NEO transfer.
2020-11-30 13:05:44 +03:00
Roman Khimov
1672887123
nef: increase version field to 32 bytes
...
Follow recent C# changes.
2020-11-30 11:26:29 +03:00
Roman Khimov
470e1592d9
request: make CreateDeploymentScript work with NEFs
...
And use it in testing code.
2020-11-27 21:53:39 +03:00
Roman Khimov
4d0eaef510
nef: treat Version as string
...
Following changes in C# code and simpilifying things a lot.
2020-11-27 21:47:08 +03:00
Roman Khimov
e12c52f588
nef: change checksum calculation scheme
...
It's now being calculated for whole file, not just header.
2020-11-27 21:47:08 +03:00
Roman Khimov
d93aa745bb
contract: avoid going to the DB for entry scripts
...
This optimizes out DB access for non-deployed contracts under the assumption
that deployed ones are always loaded via `LoadScriptWithHash` (and if they're
not --- it's a bug anyway with the new hashing model) which actually is a very
popular case (every entry script does that).
2020-11-27 21:47:08 +03:00
Roman Khimov
49f6b33eae
core: fix contract-based verification script hash
...
When using contract-based verification it's important to load contract's hash
along with the script, otherwise it won't be valid.
Simplify things along the way.
2020-11-27 21:47:08 +03:00
Roman Khimov
0c7e727859
nef: drop scripthash
...
It's no longer a part of the file.
2020-11-27 21:47:08 +03:00
Roman Khimov
1cf1fe5d74
*: introduce stable contract hashes
...
Follow neo-project/neo#2044 .
2020-11-27 21:47:08 +03:00
Roman Khimov
7044e9be40
Merge pull request #1549 from nspcc-dev/core/fix_committee_update
...
core: update committee every [committee length] blocks
2020-11-27 11:04:40 +03:00
Roman Khimov
c5e39dfabf
nef: forbid NEFs with zero-length scripts
2020-11-26 18:30:53 +03:00
Roman Khimov
b92ea2a48a
manifest/compiler: drop hashes from ABI and debug info
...
See neo-project/neo-devpack-dotnet#391 and neo-project/neo#2044 .
2020-11-26 18:30:49 +03:00
Roman Khimov
34d2eaf00e
manifest: update maximum possible length
...
As per neo-project/neo#2002 .
2020-11-26 18:07:20 +03:00
Roman Khimov
586dedecad
Merge pull request #1567 from nspcc-dev/tests/stillrelevant
...
core: add tests for `Blockchain.isTxStillRelevant()`
2020-11-26 17:28:21 +03:00
Evgenii Stratonikov
9f26d7b249
core: add tests for Blockchain.isTxStillRelevant()
2020-11-26 16:04:43 +03:00
Roman Khimov
f8957f10d7
Merge pull request #1566 from nspcc-dev/contractjson
...
rpc: marshal fees and GAS as Fixed8 decimal
2020-11-26 15:12:35 +03:00
Evgenii Stratonikov
a79b12b4d4
rpc: marshal fees and GAS as Fixed8 decimal
2020-11-26 15:04:30 +03:00
Roman Khimov
eca8b02c25
Merge pull request #1564 from nspcc-dev/tests/removeold
...
core: add test for `RemoveUntraceableBlocks` setting
2020-11-26 14:46:28 +03:00
Roman Khimov
badb1d6d49
Merge pull request #1373 from nspcc-dev/feature/standard
...
manifest: support interface checking
2020-11-26 14:46:13 +03:00
Evgenii Stratonikov
75a9a42403
compiler: check emitted event names
...
Check that all `Notify` invocations in source correspond to some event
in manifest.
Helpful for typos such as `transfer` instead of `Transfer`.
2020-11-26 13:49:58 +03:00
Evgenii Stratonikov
25f1db6de0
compiler: check supported standards
...
Check that emitted manifest complies with supported standards.
This can be made a separate flag.
2020-11-26 12:51:39 +03:00
Evgenii Stratonikov
279b769fa3
manifest: support interface checking
...
There are some standards (NEP5, etc.) which impose
some restrictions on what methods and events a contract
must contain and their signatures. This commit supports
checking if arbitrary manifest complies with the standard.
2020-11-26 12:50:29 +03:00
Evgenii Stratonikov
3a986d8635
core: add test for RemoveUntraceableBlocks
setting
2020-11-26 12:33:34 +03:00
Roman Khimov
882c214646
Merge pull request #1561 from nspcc-dev/removeold
...
core: remove old blocks and transactions
2020-11-25 19:14:32 +03:00