Roman Khimov
3809b10744
Merge pull request #852 from nspcc-dev/fix/coverage
...
.circleci: enable -coverpkg=all
2020-04-14 15:54:07 +03:00
Evgenii Stratonikov
86c9bcbffe
.circleci: use a separate job for coverage testing
...
When using -race flag more memory can be consumed.
2020-04-14 15:17:09 +03:00
Evgenii Stratonikov
9630f63224
.circleci: enable -coverpkg=all
...
We want to count test for coverage irregardless
of where it is located. Previously error "no non-test Go files"
was preventing us from doing so. This commit fixes it.
2020-04-14 15:11:36 +03:00
Roman Khimov
5faa532f2e
Merge pull request #853 from nspcc-dev/bump-db-version
...
core: bump DB version to make it differ from 2.0 branch
2020-04-14 14:16:54 +03:00
Roman Khimov
c40d7aa7f4
core: bump DB version to make it differ from 2.0 branch
2020-04-14 12:54:57 +03:00
Evgenii Stratonikov
4ad29d0867
compiler: emit Neo.Crypto.ECDsaVerify syscall instead of CHECKSIG
...
Also change the name of `VerifySignature` interop, to match
syscall's name. It also accepts arguments in different order.
2020-04-13 13:47:39 +03:00
Evgenii Stratonikov
948729137f
vm: remove HASH160/HASH256 opcodes
2020-04-13 13:47:39 +03:00
Evgenii Stratonikov
c23af595c9
core: implement Neo.Crypto.ECDsaCheckMultisig interop
2020-04-13 13:47:39 +03:00
Evgenii Stratonikov
5a30af2c75
core: implement Neo.Crypto.ECDsaVerify interop
2020-04-13 13:46:31 +03:00
Evgenii Stratonikov
1611ede58c
crypto/keys: implement NewPublicKeyFromBytes()
...
It is convenient to have a single function instead of
allocating new `PublicKey` and using `DecodeBytes()` on it.
2020-04-13 13:13:15 +03:00
Anna Shaleva
d1f92a585b
core: add NewTransactionFromBytes method to Transaction
...
Added `NewTransactionFromBytes(b []byte)` method to
transaction.Transaction in order to avoid code duplication.
2020-04-13 12:04:43 +03:00
Roman Khimov
405fa9c411
Merge pull request #847 from nspcc-dev/cli-invoke-nomethod-check
...
cli: check for method presence for invokefunction commands
2020-04-13 12:00:39 +03:00
Roman Khimov
1ebc6394c6
cli: check for method presence for invokefunction commands
...
Fixes #828 .
2020-04-13 11:19:37 +03:00
Roman Khimov
522e8e15af
Merge pull request #838 from nspcc-dev/refactoring/interop
...
core: move interop to a separate package
2020-04-13 10:26:42 +03:00
Evgenii Stratonikov
30cc2c5783
core: move enumerator/iterator interops to a separate packages
2020-04-11 10:56:36 +03:00
Evgenii Stratonikov
7ffc6c0936
core: move interopContext to a separate package
2020-04-11 10:56:36 +03:00
Evgenii Stratonikov
90a08986d6
core: fix typo in function doc-comment
2020-04-11 10:56:36 +03:00
Evgenii Stratonikov
89d1f7ce75
core: remove unneeded comment
...
Serialization interops are already implemented.
2020-04-11 10:56:36 +03:00
Evgenii Stratonikov
a7c19d445b
core: move Blockchainer interface to a separate package
2020-04-11 10:56:36 +03:00
Evgenii Stratonikov
efddcf3bfe
core: remove interop methods from interopContext
...
If interops are defined as a separate functions
they can be implemented in a separate packages
which can help us to structure core.
2020-04-11 10:56:35 +03:00
Roman Khimov
6d9c59f7fe
Merge pull request #845 from nspcc-dev/fix/gomod
...
*: go mod tidy
2020-04-10 17:51:49 +03:00
Evgenii Stratonikov
24ac001793
*: go mod tidy
...
Add `github.com/dgraph-io/badger` in go.mod .
2020-04-10 15:32:21 +03:00
Roman Khimov
5a22651e36
Merge pull request #784 from nspcc-dev/neo3/null
...
vm: support NULL stack item
2020-04-10 10:38:17 +03:00
Roman Khimov
c5721266ae
Merge pull request #842 from nspcc-dev/master-3.0-readme
...
README/docs: add 3.0 notice, update links to relative
2020-04-10 10:34:24 +03:00
Roman Khimov
57bf0810e2
README/docs: add 3.0 notice, update links to relative
...
Start real 3.0 branch, yay!
2020-04-09 19:46:30 +03:00
Roman Khimov
bfaa025a34
Merge pull request #839 from nspcc-dev/feature/badgerdb_support
...
storage: add support of BadgerDB
2020-04-09 15:57:50 +03:00
Anna Shaleva
54cdfe4a23
storage: add support of BadgerDB
...
closes #820
2020-04-09 13:55:59 +03:00
Roman Khimov
54a95810a4
Merge pull request #833 from nspcc-dev/test/vm_calls
...
vm: missing tests for CALL* instructions
2020-04-09 12:12:41 +03:00
Anna Shaleva
9f0bc2aaf5
vm: add tests to CALL* instructions
...
closes #452
2020-04-09 11:20:39 +03:00
Roman Khimov
5cd096381f
Merge pull request #829 from nspcc-dev/fix/compiler
...
cli: rename `contract compile` --debug flag
2020-04-08 16:01:33 +03:00
Evgenii Stratonikov
450263bcae
cli: rename contract compile
--emitdebug to --debug
...
It is more intuitive and easier to type.
2020-04-08 15:54:25 +03:00
Evgenii Stratonikov
c71ad6a5db
cli: output contract after compiling only with --verbose flag
...
Also remove Debug from compiler option as it is used only in CLI.
2020-04-08 13:09:51 +03:00
Evgenii Stratonikov
73c7b408b7
cli: rename --debug flag in contract compile
2020-04-08 13:09:51 +03:00
Roman Khimov
60b795f3ac
Merge pull request #832 from nspcc-dev/refactoring/core
...
core: split into several packages
2020-04-08 09:13:47 +03:00
Evgenii Stratonikov
ee0ba9b1b4
core: make SpawnVM a method of context
...
spawnVMWithInterops is rather long too type and
it doesn't use Blockchain in any way.
2020-04-08 08:38:45 +03:00
Evgenii Stratonikov
a71cd0961e
core/dao: remove unnecessary slice type
...
It is used only once, so a simple `sort.Slice`
invocation will suffice.
2020-04-08 08:38:45 +03:00
Evgenii Stratonikov
030b7754ad
core: move DAO to a separate package
2020-04-08 08:38:44 +03:00
Anna Shaleva
495c1b0565
vm: add tests for missing bit and numeric operations
...
Added tests for:
- bit operatoins: AND, OR, XOR
- numeric operations: BOOLOR, MIN, MAX, WITHIN, NEGATE
2020-04-07 18:10:31 +03:00
Roman Khimov
4e0c3fab0f
Merge pull request #811 from nspcc-dev/feature/debug
...
compiler: support neo-debugger
2020-04-06 19:18:13 +03:00
Evgenii Stratonikov
da826522f8
compiler: set variable index on first declaration
...
This way variables will have indices corresponding to their
order of appearance in a source file.
2020-04-06 15:30:07 +03:00
Evgenii Stratonikov
457e7e006a
compiler: support exporting method variables in debug info
2020-04-06 15:30:07 +03:00
Evgenii Stratonikov
5bdee683e6
cli,compiler: support emitting debug info in a file
2020-04-06 15:30:07 +03:00
Evgenii Stratonikov
5d3da26e1e
compiler: support sequence points in debug info
...
Sequence points is a way to map a specific instruction offset
from a compiled contract to a text span in a source file.
This commit implements mapping only for `return` statements.
Further improvements are straight-forward.
2020-04-06 15:30:07 +03:00
Evgenii Stratonikov
24fef35ead
compiler: split Compile info sub-functions
...
Also add tests for basic debug info.
2020-04-06 15:30:07 +03:00
Evgenii Stratonikov
00c40b58aa
compiler: record basic debug info
...
Save info about method's byte-code sections.
2020-04-06 15:30:06 +03:00
Roman Khimov
9997661998
Merge pull request #821 from nspcc-dev/fix-cache-propagation-to-invocations
...
core: wrap cached dao properly, don't miss cached data
2020-04-06 11:52:41 +03:00
Roman Khimov
b2c767e356
Merge pull request #827 from nspcc-dev/fix/shl
...
vm: handle negative arguments in SHL/SHR
2020-04-06 10:50:47 +03:00
Evgenii Stratonikov
96806262bf
vm: handle negative arguments in SHL/SHR
...
Do it as in reference implementation: a >> -b == a << b.
2020-04-06 10:46:35 +03:00
Roman Khimov
83a02f42f7
Merge pull request #825 from nspcc-dev/fix/compiler
...
compiler: accept varargs in `runtime.Notify`
2020-04-06 10:08:02 +03:00
Roman Khimov
48e619e26d
Merge pull request #826 from nspcc-dev/fix/mod
...
vm: use truncated division in MOD
2020-04-06 10:03:40 +03:00