Roman Khimov
3134e364b2
core: fix CalculateNetworkFee() for multisig contracts
...
We return m from the vm.ParseMultiSigContract and n is the length of pubs,
invocation script then pushes m signatures for n keys.
2020-07-13 18:05:46 +03:00
Roman Khimov
afc5ee1ded
core: fix ECDSA verifiation price, it's 1000000 and it's defined in crypto
2020-07-13 18:04:50 +03:00
Roman Khimov
d1b92f1767
Merge pull request #1172 from nspcc-dev/update-dbft-timestamps-and-cv-reasons
...
Update dbft, add 64-bit timestamps and cv reasons
2020-07-13 09:14:54 +03:00
Roman Khimov
a43e374ac6
consensus: replace magic 1000000 with something more meaningful
2020-07-11 19:54:50 +03:00
Roman Khimov
579630a3fa
native: don't expose internal slices to the outside world
...
They should be hidden.
2020-07-11 19:54:50 +03:00
Roman Khimov
7eef895061
consensus: use GetNextBlockValidators where appropriate
...
GetValidators without parameter is called upon DBFT initialization and it
should receive validators for the next block (that will create it),
parameterized GetValidators is used for NextConsensus calculation where we
need a list for the current state of the chain.
2020-07-11 19:54:50 +03:00
Roman Khimov
2278cd5700
consensus: drop NextConsensus from the prepareRequest
...
Follow neo-project/neo#744 to make our requests compatible with C# node.
2020-07-11 19:54:50 +03:00
Roman Khimov
ae497228f0
core: use native NEO GetValidators for bc.GetValidators
...
NextBlockValidators are updated before the new block persist, so we need to
use GetValidators to get the list corresponding to the current state of the
chain.
2020-07-11 19:54:50 +03:00
Roman Khimov
815c075112
consensus: update dbft, use millisecond-precision time, add CV reason
2020-07-11 19:54:50 +03:00
Roman Khimov
97ea5593b0
Merge pull request #1171 from nspcc-dev/drop-old-transaction-attributes
...
transaction: drop old attributes
2020-07-10 21:54:14 +03:00
Roman Khimov
fedcc6b6fc
transaction: drop old attributes
...
They're not supported in Neo 3. Also change data encoding to base64 following
Neo 3 changes.
2020-07-10 20:40:27 +03:00
Roman Khimov
56a8f11ad6
Merge pull request #1115 from nspcc-dev/fix/convert
...
keys: support returning legacy verification script
2020-07-10 19:27:36 +03:00
Roman Khimov
ace877ab68
Merge pull request #1170 from nspcc-dev/neo3/mempool/verify_fix
...
core: prevent concurrent map writes during (*mp).Verify
2020-07-09 22:08:50 +03:00
Anna Shaleva
789ee2d3c1
core: do not update mempool while verifying tx
...
Closes #1168
2020-07-09 20:45:59 +03:00
Anna Shaleva
4be1009def
core: refactor checkBalanceAndUpdate
2020-07-09 18:27:20 +03:00
Anna Shaleva
72a6740717
rpc: adjust getcontractstate
RPC-call JSON fields names
...
Part of #1130
2020-07-09 17:34:53 +03:00
Anna Shaleva
15f7b78a8c
rpc: adjust getnep5transfers
RPC-call JSON fields names
...
Part of #1130
2020-07-09 17:34:53 +03:00
Anna Shaleva
dc273736be
rpc: adjust getnep5balances
RPC-call JSON fields names
...
Part of #1130
2020-07-09 17:34:53 +03:00
Anna Shaleva
e81ccb7deb
rpc: adjust getblock
RPC-call JSON fields names
...
Part of #1130
2020-07-09 17:34:53 +03:00
Anna Shaleva
51576f236d
rpc: adjust getapplicationlog
RPC-call JSON fields names
...
Part of #1130
2020-07-09 17:34:53 +03:00
Roman Khimov
1fa2d4bc6a
Merge pull request #1165 from nspcc-dev/neo3/state/nep5transfer
...
core: store NEP5 transfers and balances as big.Int
2020-07-09 16:55:51 +03:00
Roman Khimov
d234db9864
Merge pull request #1167 from nspcc-dev/fix-initsslot-for-contract-calls
...
vm: fix INITSSLOT, it's context-wide, not VM-wide
2020-07-09 15:09:52 +03:00
Roman Khimov
15c6cc932d
vm: drop checkedhash, it's an unused NeoVM 2 remnant
2020-07-09 15:05:14 +03:00
Roman Khimov
1bb26dcdc1
vm: fix INITSSLOT, it's context-wide, not VM-wide
...
It's tied to the current contract, not to VM.
2020-07-09 15:00:49 +03:00
Roman Khimov
2a16df8db1
Merge pull request #1166 from nspcc-dev/fix-struct-default-init
...
Fix struct default init
2020-07-09 14:52:00 +03:00
Roman Khimov
bc1d6791b9
compiler: allow to append multiple elements
2020-07-09 13:59:43 +03:00
Anna Shaleva
abe3c94b95
core: use big.Int to store NEP5 balances
...
closes #1133
2020-07-09 13:26:39 +03:00
Anna Shaleva
43b28ffa06
core: get rid of NEP5TransferSize
...
Part of #1133
It will help us to use big.Int to store amount of NEP5 tokens. As far as
big.Int doesn't have constant size, we shouldn't use `NEP5TransferSize`
constant anymore.
2020-07-09 13:25:03 +03:00
Roman Khimov
76925fe3e0
compiler: slices must default to nil
2020-07-09 13:07:21 +03:00
Roman Khimov
eee8ac1655
compiler: fix initialization of struct fields, fix #1164
...
Make `s{}` initializers work. Deduplicate code a bit along the way. The test
added follows bf6aa02dcf
test.
2020-07-09 12:27:21 +03:00
Roman Khimov
f32920bf39
Merge pull request #1162 from nspcc-dev/neo3/compiler/dynamic_appcall
...
compiler: compile appcall with dynamic argument
2020-07-08 19:55:53 +03:00
Anna Shaleva
56a5c9db11
compiler: compile appcall with dynamic argument
...
Closes #1160
2020-07-08 19:49:14 +03:00
Roman Khimov
cf1e5243b9
Merge pull request #1157 from nspcc-dev/neo3/env_image/fix
...
dockerfile: fix useragent version
2020-07-08 09:40:50 +03:00
Roman Khimov
8532d76401
Merge pull request #1155 from nspcc-dev/interop-compiler-fixes-for-3.0
...
Interop and compiler fixes for 3.0
2020-07-08 09:40:06 +03:00
Roman Khimov
bca890a888
Merge pull request #1156 from nspcc-dev/hex-base64-fix
...
rpc/request: decode bytearray as base64, fix #1151
2020-07-08 09:39:44 +03:00
Anna Shaleva
a8d9e27513
dockerfile: fix useragent version
...
Useragent version wasn't set when building from Dockerfile. Fixed.
2020-07-08 08:40:27 +03:00
Roman Khimov
540a20c1c9
rpc/request: decode bytearray as base64, fix #1151
...
It's encoded in base64 now.
2020-07-07 22:35:03 +03:00
Roman Khimov
694963d607
compiler: fix binary.* syscalls compilation, fix #1152
...
They were attributed to a wrong package.
2020-07-07 21:57:51 +03:00
Roman Khimov
ebe37d1a46
compiler: check for NULL when calculating len(), fix #1153
2020-07-07 21:49:21 +03:00
Roman Khimov
b3e450477d
interop/runtime: synchronize trigger values with smartcontract/trigger
...
Neo 3.0 has new updated and improved constants. A better (non-function-based)
fix requires #1154 to be solved.
2020-07-07 20:25:52 +03:00
Roman Khimov
b823a516f1
Merge pull request #1142 from nspcc-dev/neo3/compiler/unexported_methods
...
compiler, cli: update manifest.json format
2020-07-07 16:41:36 +03:00
Anna Shaleva
08ae869028
examples: update ANT owner for workshop
2020-07-07 15:57:17 +03:00
Anna Shaleva
db8cb752e3
examples: update methods signatures
...
Update methods signatures in order to generate correct manifest files
with full description of available methods.
2020-07-07 15:57:12 +03:00
Anna Shaleva
53ff02f1ad
examples: fix typo in method argument
2020-07-07 15:54:45 +03:00
Anna Shaleva
2200f7ff71
compiler: lowercase the first letter of methods in manifest
...
In order to be compatable with NEP5 standards and C# node we have to
keep the first letter of each manifest method lowercased.
2020-07-07 13:44:47 +03:00
Anna Shaleva
f37831d173
compiler: convert to manifest only methods from main pkg
...
manifest.json should contain only methods from the package where `Main`
function located.
2020-07-07 13:42:15 +03:00
Anna Shaleva
c2dccb6314
compiler: add ability to emit package to debug info
...
Emit package information into MethodDebugInfo
2020-07-07 13:39:58 +03:00
Anna Shaleva
c3a0998cae
compiler: fix bug in codegen
...
Main function (as far as the others uncknown to codegen at the moment of
`convertFuncDecl`) didn't have package set. Fixed.
2020-07-07 13:28:38 +03:00
Anna Shaleva
c3431f4fff
cli: add extra validUntilBlockIncrement to transferNEP5
...
When we export tx to a file, we might need validUntilBlock to be larger
a bit in order to use it in future.
2020-07-07 13:23:01 +03:00
Anna Shaleva
7d8a3a7065
compiler: exclude unexported methods from manifest
...
We should be able to invoke exported methods only.
2020-07-07 13:23:01 +03:00