* reduce shard of testnet to 2
* remove harmony inner nodes in shard2 and shard3
* check shardID in VerifyCrossLink
* get NumShards by epoch instead of hardcodeed shards
* add Localnet in NewGenesisSpec
* do mayTestnetShardReduction in the block before the last block
* fix localnet epoch calculation
* not use old committee if shard reduction happens
* fix preLastBlock calculation
* do testnet shard reduction when propose new blocks
* enable 2s block period at epoch 0
* call IntermediateRoot once in the end
* skip inactive&baned validators when testnet shard reduction happens
* update ShardReductionEpoch to epoch 486
As a follow up to #4270, ensure that all localnet URLs returned as part
of the sharding structure are accurate.
Signed-off-by: MaxMustermann2 <82761650+MaxMustermann2@users.noreply.github.com>
Signed-off-by: MaxMustermann2 <82761650+MaxMustermann2@users.noreply.github.com>
* [testnet] ninety percent voting power
to keep the network stable
* [testnet] 90% voting power at epoch 399
* fix: replace `testchain` with `testnetchain`
* Revert "Increase voting power of harmony nodes in testnet to 0.7 (#4200)"
This reverts commit 20edef740b.
* RESET TESTNET
* fix vrf testcase
* reduce number of nodes required for reseting testnet
* use only harmony nodes before staking epoch
* fix: add option for console only
Signed-off-by: Jason Yi <jasonhk.yi@consensys.net>
* fix: add console option for node & harmony
Signed-off-by: Jason Yi <jasonhk.yi@consensys.net>
* fix: add console to default config
Signed-off-by: Jason Yi <jasonhk.yi@consensys.net>
* fix: remove debugging code
Signed-off-by: Jason Yi <jasonhk.yi@consensys.net>
* fix: add log.console to cmd line options
Signed-off-by: Jason Yi <jasonhk.yi@consensys.net>
* fix: linting & revert back msg.pg.go
Signed-off-by: Jason Yi <jasonhk.yi@consensys.net>
* undo changes in go.sum
Signed-off-by: Jason Yi <jasonhk.yi@consensys.net>
* update: config migration
Signed-off-by: Jason Yi <jasonhk.yi@consensys.net>
* [txpool] fix#4215, support allowed transaction list.
* test: fix node tests for allowlist of txs
* add error checking of tx.data
* recover test scripts
* config migration
* add tx.data to error info
* [pool] refactor: log more if `from` in denylist
* reject tx if it does not pass the allowed whiltelist check
Co-authored-by: MaxMustermann2 <82761650+MaxMustermann2@users.noreply.github.com>
* increase voting power of harmony nodes in testnet to 0.7
* decrease QuorumThreshold to 0.6 of testnet
* decrease QuorumThreshold of testnet to 51%
* change IsQuorumAchievedByMask
* HIP18: support allowlist
* sort allowlist by default order
* fix and add unit test
* simplified calculation of index of leader
* restore code of NthNextHmy()
* rename MaxLimit to MaxLimitPerShard and add comments
* init allowlist of testnet
* update allowlist
* change HIP18 epoch to TBD
* set HIP18 of testnet to 75840
* rename _BLS() to BLS()
* update comment
* add version of allowlist variable
* recover the travis_rpc_checker script
* update HIP18 epoch
* add new config to set local accounts from harmony config
* removed extra if for checking flag change and fix format
Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”>
* fix unexpected chain id (https://github.com/harmony-one/harmony/issues/4129)
* update epoch numbers for ChainId fix
* updated ChainID Epoch for test net
* align comment with other comments
* fix the build using goimports
* added flags to enable/disable rpc for staking and eth
* add feature to be able to feed custom configuration for each single node in testnet
* add method filter
* add rpc method filters file and one new flag for legacy APIs
* fixed tests and improved method filter and added more tests
* fix format and removed extra comments
* fix method_filter comments
* remove extra debug print
Co-authored-by: “GheisMohammadi” <“Gheis.Mohammadi@gmail.com”>
* [p2p]: feat: allow disable scan of private ips
Add a command line flag `--p2p.no-private-ip-scan` or config file option
in P2P `DisablePrivateIPScan` to stop node operators from receiving
netscan abuse emails. Fixes#4036, #4046 and #3788. After this change,
node operators should not need to use `iptables` to firewall out RFC1918
traffic.
* [p2p] fix: Cascade disallow private scan
* HIP-6: increase external voting power to 51%
* HIP-8: increase external slots to 900
* never enable for local net
Signed-off-by: Leo Chen <leo@harmony.one>
* Add rate limit to metrics
* Compliance with harmony's metrics specifications
* Improve rate limit metrics info
* minor: remove the redundancy of rpc metrics name
Signed-off-by: Leo Chen <leo@harmony.one>
* [rpc] set default rate limit to 1000
Signed-off-by: Leo Chen <leo@harmony.one>
* [rpc] fix test errors
Signed-off-by: Leo Chen <leo@harmony.one>
* [metrics] init rpc rate limiter
Signed-off-by: Leo Chen <leo@harmony.one>
Co-authored-by: Leo Chen <leo@harmony.one>