Commit graph

3760 commits

Author SHA1 Message Date
Roman Khimov
818d5988f5
Merge pull request #1695 from nspcc-dev/committeechecks
native: unify committee checks
2021-01-29 11:58:33 +03:00
Evgeniy Stratonikov
690b787fe3 native: unify committee checks
Fail execution if tx is not signed by committee.
2021-01-29 10:50:17 +03:00
Roman Khimov
a6921ceecb
Merge pull request #1674 from nspcc-dev/extensible_pool
Add pool for `Extensible` payloads
2021-01-28 21:01:05 +03:00
Evgeniy Stratonikov
9592f3e052 network: implement pool for Extensible payloads 2021-01-28 17:09:06 +03:00
Evgeniy Stratonikov
153678160e native: use majority hash only for oracles 2021-01-28 17:09:06 +03:00
Evgeniy Stratonikov
db4e7558e0 native: cache all roles in Designate 2021-01-28 17:09:05 +03:00
Roman Khimov
9a99054e6b
Merge pull request #1427 from nspcc-dev/oracle/module
network: implement Oracle module
2021-01-28 15:24:36 +03:00
Roman Khimov
02d1411c0e
Merge pull request #1690 from nspcc-dev/usability-improvements
Compiler/CLI usability improvements
2021-01-28 14:44:53 +03:00
Evgeniy Stratonikov
c420014cb5 oracle: implement filters 2021-01-28 13:00:59 +03:00
Evgenii Stratonikov
e4528e59dc oracle: reprocess request on fail 2021-01-28 13:00:59 +03:00
Evgenii Stratonikov
aa852aaaac oracle: submit responses concurrently 2021-01-28 13:00:59 +03:00
Evgenii Stratonikov
25d734cbad oracle: process requests concurrently 2021-01-28 13:00:59 +03:00
Evgenii Stratonikov
43e4d3af88 oracle: integrate module in core and RPC
1. Initialization is performed via `Blockchain` methods.
2. Native Oracle contract updates list of oracle nodes
  and in-fly requests in `PostPersist`.
3. RPC uses Oracle module directly.
2021-01-28 13:00:58 +03:00
Evgenii Stratonikov
7e16bea126 network: implement Oracle module 2021-01-28 12:43:20 +03:00
Evgeniy Stratonikov
c146540ce8 core: fix native contract verification 2021-01-28 12:35:02 +03:00
Roman Khimov
f2b12756ee docs: use contract instead of mycontract throughout the compiler doc 2021-01-28 12:16:18 +03:00
Roman Khimov
a217d62f8a docs: make compiler documentation more up to date
Add some notes on GOROOT setup and output files, properly describe
YAML/manifest interactions and remove severely outdated examples (we have
better ones in `examples` anyway).
2021-01-28 12:16:18 +03:00
Roman Khimov
79e11c93a1 cli: allow to specify cosigners with Neo addresses
Make it a bit more usable.
2021-01-27 22:32:29 +03:00
Roman Khimov
48e3a41133 cli: remove outdated contract deploy comment
It's relevant for Neo 2.0, but not 3.0.
2021-01-27 21:45:44 +03:00
Roman Khimov
fac2a0d7e3 cli: provide -m flag for manifest when deploying a contract
It's a bit easier to use. Previously we couldn't have it because it was used
for '--mainnet', but we no longer specify the network, so it can be used for
'--manifest'.
2021-01-27 21:39:14 +03:00
Roman Khimov
f1792b32b9
Merge pull request #1689 from nspcc-dev/overload
core: allow to overload contract methods
2021-01-27 15:11:54 +03:00
Evgeniy Stratonikov
dd1e2cefe4 core,cli: disallow verify methods with non-bool returns 2021-01-27 12:51:47 +03:00
Evgeniy Stratonikov
73f888f02e core: allow to overload contract methods
Multiple methods with different parameter count can co-exist.
2021-01-27 12:51:07 +03:00
fabwa
32e86785fa
Update notifications.md 2021-01-24 16:50:02 +01:00
Roman Khimov
3d79c7644e
Merge pull request #1687 from nspcc-dev/fix-transaction-fee-marshalling
Fix transaction fee marshalling
2021-01-23 15:11:14 +03:00
Roman Khimov
ca258d6fbd fixedn: always correctly unmarshal Fixed8 values
Quoted or not, they should be unmarshalled without going through float64.
2021-01-22 19:14:33 +03:00
Roman Khimov
120ae4841f transactions: fix JSON unmarshalling of fees
Fixed8 is already marshalled as a string and stripping quotes from it just
leads to interpreting it as a float with all regular float problems (like
test transaction failing with `txid doesn't match transaction hash`).
2021-01-22 18:22:09 +03:00
Roman Khimov
524c1238e8
Merge pull request #1686 from nspcc-dev/update-contract-hash-calculations
Update contract hash calculation scheme
2021-01-22 14:20:23 +03:00
Roman Khimov
054ca27e9c state: use checksums and names to calculate contract hashes
It allows to deploy the same NEF using one sender and get different contract
hashes. See neo-project/neo#2240.
2021-01-22 12:22:48 +03:00
Roman Khimov
6b9b37f170 native: don't call CreateNativeContractHash() in oracle contract
Move oracleScript from global context to Oracle itself. We have the hash
already computed by NewContractMD, there is no need to repeat this
calculation.
2021-01-22 11:28:13 +03:00
Roman Khimov
dfc23c4246
Merge pull request #1667 from nspcc-dev/extensible
Introduce extensible payloads
2021-01-22 11:10:40 +03:00
Evgeniy Stratonikov
5d83c28bc9 network: replace ConsensusType with ExtensibleType 2021-01-22 10:38:33 +03:00
Evgeniy Stratonikov
b918ec3abc consensus: refactor payloads structure
1. `Version` and `PrevHash` are now in `PrepareRequest`.
2. Serialization is done via `Extensible` payload.
3. Update dbft version.
2021-01-22 10:38:32 +03:00
Evgeniy Stratonikov
59a193c7c7 network/payload: add Extensible payload 2021-01-22 10:35:42 +03:00
Roman Khimov
6bc2512767
Merge pull request #1684 from nspcc-dev/candidate-registration-price
native: make registering as a candidate cost more
2021-01-22 10:04:53 +03:00
Roman Khimov
07583332cd
Merge pull request #1673 from nspcc-dev/vm/calltoken
Implement CALLT opcode
2021-01-22 09:40:16 +03:00
Evgeniy Stratonikov
49de8161ef core: implement LoadToken handler 2021-01-22 09:04:37 +03:00
Roman Khimov
476cbbebdc native: make registering as a candidate cost more
Follow neo-project/neo#2252.
2021-01-21 23:02:59 +03:00
Evgenii Stratonikov
bb706aa55b vm: implement CALLT opcode 2021-01-21 19:30:04 +03:00
Roman Khimov
8fad05c5bb
Merge pull request #1679 from nspcc-dev/fix/policysign
Check for committee witness in native contracts
2021-01-21 15:42:36 +03:00
Evgeniy Stratonikov
c6894f3f55 native: check for committee in setters 2021-01-21 15:20:34 +03:00
Evgeniy Stratonikov
24d9a31476 testchain: support signing tx by committee 2021-01-21 14:51:15 +03:00
Roman Khimov
fbbcb16fa1
Merge pull request #1672 from nspcc-dev/fix/nef
Fix NEF serialization
2021-01-19 15:57:48 +03:00
Evgeniy Stratonikov
719dceff77 nef: merge Compiler and Version fields 2021-01-19 11:19:28 +03:00
Evgeniy Stratonikov
0bbdee2ce1 nef: add Reserved bytes 2021-01-19 11:19:28 +03:00
Evgeniy Stratonikov
52843fc1bf nef: add Tokens field 2021-01-19 11:19:24 +03:00
Evgeniy Stratonikov
7fb40e104a io: allow to restrict string size 2021-01-19 11:16:23 +03:00
Roman Khimov
376c22adee
Merge pull request #1670 from nspcc-dev/vm/popitem
Add POPITEM opcode
2021-01-19 09:51:53 +03:00
Evgeniy Stratonikov
f0fe03117a compiler: optimize struct copy a bit
POPITEM is cheaper than PUSH + PICKITEM.
2021-01-19 09:46:01 +03:00
Evgeniy Stratonikov
324107b31e vm: implement POPITEM opcode 2021-01-19 09:46:01 +03:00