Anna Shaleva
b0563ad0d7
services: fix Oracle responces mutex
...
Solves the following problem:
=== RUN TestOracleFull
logger.go:130: 2021-02-04T09:25:16.305Z INFO P2PNotaryRequestPayloadPool size is not set or wrong, setting default value {"P2PNotaryRequestPayloadPoolSize": 1000}
logger.go:130: 2021-02-04T09:25:16.306Z INFO no storage version found! creating genesis block
logger.go:130: 2021-02-04T09:25:27.687Z DEBUG done processing headers {"headerIndex": 1, "blockHeight": 0, "took": "2.413398ms"}
logger.go:130: 2021-02-04T09:25:27.696Z DEBUG done processing headers {"headerIndex": 2, "blockHeight": 1, "took": "1.138196ms"}
logger.go:130: 2021-02-04T09:25:28.680Z INFO blockchain persist completed {"persistedBlocks": 2, "persistedKeys": 173, "headerHeight": 2, "blockHeight": 2, "took": "166.793µs"}
fatal error: sync: Unlock of unlocked RWMutex
goroutine 6157 [running]:
runtime.throw(0x115dfdb, 0x20)
/usr/local/go/src/runtime/panic.go:1116 +0x72 fp=0xc000297ca0 sp=0xc000297c70 pc=0x44f432
sync.throw(0x115dfdb, 0x20)
/usr/local/go/src/runtime/panic.go:1102 +0x35 fp=0xc000297cc0 sp=0xc000297ca0 pc=0x44f3b5
sync.(*RWMutex).Unlock(0xc000135300)
/usr/local/go/src/sync/rwmutex.go:129 +0xf3 fp=0xc000297d00 sp=0xc000297cc0 pc=0x4a1ac3
github.com/nspcc-dev/neo-go/pkg/services/oracle.(*Oracle).Run(0xc000135180)
/go/src/github.com/nspcc-dev/neo-go/pkg/services/oracle/oracle.go:189 +0x82b fp=0xc000297fd8 sp=0xc000297d00 pc=0xe13b0b
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1373 +0x1 fp=0xc000297fe0 sp=0xc000297fd8 pc=0x4834d1
created by github.com/nspcc-dev/neo-go/pkg/core.TestOracleFull
/go/src/github.com/nspcc-dev/neo-go/pkg/core/oracle_test.go:276 +0x3f1
2021-02-05 11:37:12 +03:00
Anna Shaleva
2b06601646
core: change Oracle request ID endianness
2021-02-05 11:37:12 +03:00
Anna Shaleva
12f7111ca8
core: mark blocked accounts with empty byte array
2021-02-05 11:37:12 +03:00
Anna Shaleva
6a4e312eac
core: move GetPrice from core
to interop
...
We have additional logic for getting BaseExecFee policy value. This
logic should be moved to interop context instead of being in Policer,
because Policer is just an interface over Policy contract.
After moving this logic to interop context, we need to use it to define
BaseExecFee instead of (Policer).BaseExecFee. Thus, moving
(*Blockchain).GetPrice to (*Context).GetPrice is necessary.
2021-02-05 11:36:32 +03:00
Anna Shaleva
260bcd373c
core: store initial native values into DAO
2021-02-05 10:43:17 +03:00
Roman Khimov
641896b2fb
Merge pull request #1658 from nspcc-dev/signature_collection/module
...
core, network: add Notary module
2021-02-02 22:24:14 +03:00
Anna Shaleva
df26ca1c7f
core: add Notary module test
2021-02-02 22:01:32 +03:00
Anna Shaleva
4ad9c7929b
internals: move testchain from network to internals
...
It'll be useful for tests outside of the network pkg.
2021-02-02 22:01:32 +03:00
Anna Shaleva
bfbd096fed
core: introduce mempool notifications
2021-02-02 22:01:32 +03:00
Anna Shaleva
19fa0daaa6
core, network: add Notary module
2021-02-02 22:01:20 +03:00
Roman Khimov
f7cb00b82d
Merge pull request #1678 from nspcc-dev/nameservice
...
Implement NameService
2021-02-01 22:52:59 +03:00
Evgeniy Stratonikov
e4ff8326b5
native: add NameService
2021-02-01 21:40:21 +03:00
Roman Khimov
3e4f4e6dd1
Merge pull request #1700 from nspcc-dev/add-vm-test-for-big-haskey
...
vm: add test for neo-project/neo-vm#393
2021-02-01 19:15:23 +03:00
Roman Khimov
d822e8dc21
vm: add test for neo-project/neo-vm#393
2021-02-01 16:39:54 +03:00
Evgeniy Stratonikov
ec6317d643
core: allow to sign with arbitrary signer
...
Related #1677 .
2021-02-01 10:16:16 +03:00
Roman Khimov
cb56eb4696
Merge pull request #1693 from nspcc-dev/fix/deploy
...
Provide additional data on deployment
2021-01-29 17:23:29 +03:00
Evgeniy Stratonikov
c8a07be58d
native: sort methods in manifest
2021-01-29 12:19:08 +03:00
Evgeniy Stratonikov
2336415f42
naitve: disallow contract name modification
2021-01-29 12:19:08 +03:00
Evgeniy Stratonikov
c1cc7e6f9d
native: add additional parameters to deploy
...
1. Management contract has 2 overloads of `deploy` method.
2. Normal contracts should have `_deploy` with 2 parameters.
2021-01-29 12:19:08 +03:00
Evgeniy Stratonikov
849385a533
native: allow to overload native methods
2021-01-29 12:19:08 +03:00
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