* 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`
* fix: elastic rpc new filters fix
* fix: add a small delay to give readers time to catch up
* fix: run the subscribe in a go routine
* fix: generate the filter id before
* fix: rpl not able to marshal negative big int
* fix: use json to get the message
* 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>
* lower gas limit to 30M
* increase suggested gas to 70 percentile and increase max suggested gas to 1000
* Fix race error.
* Increase price limit to 100e9.
* Set 95 percentile.
* Fix rpc response.
* [test] adjust funds for new higher gas price
* [rosetta] use new gas price
Co-authored-by: Rongjian Lan <rongjian.lan@gmail.com>
Co-authored-by: Konstantin <k.potapov@softpro.com>
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”>
This reverts commit aa30288dce. The commit
will be remade when #4146 is merged with the same epoch as that of HIP18
to make a combined hard fork for both features.
* 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
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
...for native tokens only, and not for smart contracts (which will be
added later). Resolves#4132 and requires a hard fork, currently
scheduled at EpochTBD on main and test nets, but epoch 1 (after
AcceptsCrossTx) on other nets.
The precompile is at address 249 and the method has the signature
`crossShardTransfer(uint256 amount, address to, uint32 toShardID)`. It
requires a transfer of the `amount` to the precompile address first, in
the form of `msg.value`, and cascades a cross shard receipt to the
network when executed. At this stage, it is blocked for use by smart
contracts by checking that there is no code at the address, and that the
address is not a validator. Documentation for Python integration tests
to follow.