Commit graph

80 commits

Author SHA1 Message Date
Anna Shaleva
133b600c8c config: set MinPeers=0 for unit testchain
Some RPC tests require network services to be enabled and running
(i.e. notary pool subscriptions). Services can be launched either when
node has reached synchronised state or when it does not have connected
peers and MinPeers=0. The second one is the case of RPC tests.
2021-06-01 12:24:28 +03:00
Anna Shaleva
99b37efc31 core: remove native NNS 2021-05-17 22:22:07 +03:00
Roman Khimov
134c7acff1 config: update testnet magic number for N3 RC2 testnet
It's 'N3T2', see https://github.com/neo-project/neo-node/releases/tag/v3.0.0-rc2
2021-05-06 11:40:45 +03:00
Anna Shaleva
c77997a357 config: enable Notary contract for single unittestnet chain
We need this for tests.
2021-04-16 16:22:18 +03:00
Roman Khimov
b2944bcf8a config: adjust default testnet magic for RC1 testnet
It's 827601742, N3T1, see https://github.com/neo-project/neo-node/releases/tag/v3.0.0-rc1
2021-03-24 10:57:05 +03:00
Roman Khimov
c1b2a79cfe netmode: use proper testnet magic number
Preview5 network used 'N3P5' as its magic, but the official testnet magic is
still 'NEOt', that's the way it's defined in neo-node, so use that.
2021-03-19 16:18:45 +03:00
Anna Shaleva
9377751e65 config: add NativeUpdateHistory 2021-03-15 12:35:14 +03:00
Anna Shaleva
717591afe8 config: add default notary configuration
For a better user experience.
2021-02-16 13:58:25 +03:00
Roman Khimov
20a506012e config: update magic for preview5 testnet 2021-02-05 15:10:22 +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
Anna Shaleva
2c58f274d0 config: update MaxGasInvoke 2020-12-22 12:25:34 +03:00
Anna Shaleva
b00eb51c55 core: add P2PNotary designated role 2020-11-24 18:47:09 +03:00
Roman Khimov
b327308df8 core/config: move MaxTraceableBlocks to configuration file
Follow neo-project/neo#2042, use 2102400 setting for mainnet/testnet and
200000 for private networks.
2020-11-06 13:41:46 +03:00
Evgenii Stratonikov
468f7ee650 cli: add tests for NEP5 balance querying 2020-09-18 12:07:02 +03:00
Evgenii Stratonikov
b0c051b817 internal: extend committee for unit tests
Committee should differ from the set of validators, to catch
possible bugs during testing.
2020-08-27 18:40:36 +03:00
Anna Shaleva
b92e90636e config: add ValidatorsCount to default privnet configuraton
This commit prevents the following error while starting default privnet
node:

```
2020-08-10T15:23:35.733+0300	INFO	restoring blockchain	{"version": "0.1.0"}
could not initialize blockchain: param m cannot be smaller or equal to 1 got 0

```
2020-08-10 15:36:38 +03:00
Evgenii Stratonikov
e5d973d3a4 config: rename StandbyValidators to StandbyCommittee 2020-08-06 20:39:13 +03:00
Evgenii Stratonikov
9bc731b3b1 native: implement delegated voting
Close #867.
2020-08-06 20:39:13 +03:00
Evgenii Stratonikov
8d2e9b68bf docker: fix privnet node config and compose file 2020-07-24 16:30:38 +03:00
Roman Khimov
e21a36a705 config: add MaxGasInvoke to all configuration files
Limit the GAS available by default.
2020-07-13 20:09:58 +03:00
Anna Shaleva
8de0332107 *: use MaxTransactionsPerBlock from Policy native contract
part of #904

1. We now have MaxTransactionsPerBlock set in native Policy contract,
   so this value should be used in (dbft).GetVerified method instead
   of passing it as an argument.
2. Removed (dbft).WithTxPerBlock.
2. DBFT API has changed, so update it's version.
3. Removed MaxTransactionsPerBlock from node configuration, as we
   have it set in native Policy contract.
2020-06-24 07:58:05 +03:00
Evgenii Stratonikov
5354352d63 core: remove transaction priority
There is no such thing as high/low priority transactions, as there are
no free transactions anymore and they are ordered by fees contained
in transaction itself.

Closes #1063.
2020-06-18 22:44:10 +03:00
Evgenii Stratonikov
2f724b792c core: remove config fields related to free transactions
In NEO3 every transaction must have some gas attached.

Closes #1064.
2020-06-18 22:44:08 +03:00
Evgenii Stratonikov
84387b2416 core: set gas limit to transaction.SystemFee for all transactions 2020-06-18 22:17:48 +03:00
Roman Khimov
1c2318eed4 netmode: use non-zero unittest network
Using zero is a bit dangerous as it's the default type's value, so we can miss
some uninitialized variables when testing.
2020-06-18 12:10:12 +03:00
Roman Khimov
6eb600de5a config: sync network magic numbers
unit_testnet YAML was out of sync with Go code and Go code was out of sync
with YAML for mainnet and testnet after 308243f36e.
2020-06-18 12:09:55 +03:00
Evgenii Stratonikov
651976b2ca config: remove AddressVersion from the configuration
It is never used and is the same constant for both mainnet, testnet and
privnet.
2020-06-17 15:55:22 +03:00
Roman Khimov
0a09a20900 transaction: drop Register transaction type
And everything associated like SystemFee configuration.
2020-06-05 19:20:16 +03:00
Roman Khimov
169c5ae775 transaction: drop Issue TX support 2020-06-05 19:20:16 +03:00
Roman Khimov
308243f36e config: update testnet and mainnet configurations
New magic numbers, seed lists and testnet standby validators from neo-node.
2020-05-27 13:46:13 +03:00
Roman Khimov
612500ed96 rpc/server: start and shutdown Server in tests
It will be important for proper subscription testing and it doesn't hurt even
though technically we've got two http servers listening after this change (one
is a regular Server's http.Server and one is httptest's Server). Reusing
rpc.Server would be nice, but it requires some changes to Start sequence to
start Listener with net.Listen and then communicate back its resulting
Addr. It's not very convenient especially given that no other code needs it,
so doing these changes just for a bit cleaner testing seems like and
overkill.

Update config appropriately. Update Start comment along the way.
2020-05-25 00:27:39 +03:00
Roman Khimov
e6f5cffff6 transaction: drop Enrollment and State types
They're completely replaced now by the NEO native contract voting system.
2020-04-27 16:06:58 +03:00
Roman Khimov
4912e4f425 *: drop Publish transaction type
It shouldn't be used even in NEO 2 as it was substituted by contract
deployment interop functions.
2020-04-16 14:40:20 +03:00
Anna Shaleva
54cdfe4a23 storage: add support of BadgerDB
closes #820
2020-04-09 13:55:59 +03:00
Anna Shaleva
5a984fdf88 config: move config.go out of config/
closes #423
2020-03-31 17:55:59 +03:00
Evgenii Stratonikov
dfbb84ef38 rpc: support https
Allow to start TLS RPC server on a separate port.
Closes #702.
2020-03-17 12:44:23 +03:00
Anna Shaleva
e5c6fd0aae config: add default ping timeouts config value
closes #680

Problem: cannot connect to neo-go node with a client with default ping
timeouts values

Solution: added default config values for PingInterval=30 and PingTimeout=90
2020-03-13 18:10:13 +03:00
Roman Khimov
e41d434a49 *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
Roman Khimov
eb11e5fb11 core: implement basic policying support, fix #370
Implement mempool and consensus block creation policies, almost the same as
SimplePolicy plugin for C# node provides with two caveats:
 * HighPriorityTxType is not configured and hardcoded to ClaimType
 * BlockedAccounts are not supported

Other than that it allows us to run successfuly as testnet CN, previously our
proposals were rejected because we were proposing blocks with oversized
transactions (that are rejected by PoolTx() now).

Mainnet and testnet configuration files are updated accordingly, but privnet
is left as is with no limits.

Configuration is currently attached to the Blockchain and so is the code that
does policying, it may be moved somewhere in the future, but it works for
now.
2020-02-19 12:19:02 +03:00
Evgenii Stratonikov
b1d9e1132d cli: dump storage changes into JSON files 2020-02-12 12:16:31 +03:00
Evgeniy Kulikov
eb59460032
Merge pull request #614 from nspcc-dev/configurable-mempool-size
config: add MemPoolSize configuration parameter
2020-01-23 13:25:27 +03:00
Roman Khimov
d6784e8f45 config: add MemPoolSize configuration parameter
Allow tuning/experimenting with mempool.
2020-01-23 13:10:44 +03:00
Evgenii Stratonikov
303b82cc44 core: set free GAS limit via config 2020-01-22 14:32:21 +03:00
Evgenii Stratonikov
54e0b5a4a7 rpc: set MaxGasInvoke in config
Implement ability to restrict maximum amount of GAS
available for free RPC calls.
2020-01-22 14:31:57 +03:00
Roman Khimov
2c4ace022e network/config: redesign ping timeout handling a bit
1) Make timeout a timeout, don't do magic ping counts.
2) Drop additional timer from the main peer's protocol loop, create it
   dynamically and make it disconnect the peer.
3) Don't expose the ping counter to the outside, handle more logic inside the
   Peer.

Relates to #430.
2020-01-20 19:37:17 +03:00
Roman Khimov
f4aa088d04
Merge pull request #603 from nspcc-dev/feature/wallet
consensus: use wallets instead of WIF, closes #588.
2020-01-20 16:16:10 +03:00
Evgenii Stratonikov
940ac42ded docker: use wallets in config 2020-01-17 17:25:51 +03:00
Vsevolod Brekelov
4e6ed9021c network: add ping pong processing
add pingInterval same as used in ref C# implementation with the same logic
add pingTimeout which is used to check whether pong received. If not -- drop the peer.
add pingLimit which is hardcoded to 4 in TCPPeer. It's limit for unsuccessful ping/pong calls (where pong wasn't received in pingTimeout interval)
2020-01-17 13:24:14 +03:00
Evgenii Stratonikov
70b23076f8 network: allow single-node privnet setup 2020-01-13 18:01:20 +03:00
Roman Khimov
89b6cbf795 address: make Prefix overridable
As it should be, it's specified in the configuration file (and it should be
treated as byte in the config)
2019-12-25 15:42:18 +03:00