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.
The version of the reflect2 library we were pulling in (transitively,
via json-iterator) segfaults on go 1.18, due to some use of the unsafe
package that is not portable accross version; I was seeing this manifest
not long after running `make debug`.
The problem is fixed in the latest version, and similarly the latest
version of json-iterator depends on the fixed version. So, this patch
updates to the latest version to get he fix.
...and set suggested gas percentile to 40 instead of 60.
Recently, the recommended gas price requested via `eth_gasPrice`,
`hmy_gasPrice` or `hmyv2_gasPrice` has been fairly high (think 100k
gwei). This patch changes the maximum suggested gas price via these APIs
to be capped at 500 gwei. Users are still allowed to change the gas
price manually to be higher than this, for faster execution.
The occurence of these extremely high gas prices can be attributed to
the self reinforcing mechanism of this implementation. If some 20 blocks
are produced with extremely high gas prices for all transactions, the
API queries the transactions and returns the (erstwhile) 60th percentile
from them. This then results in a feedback loop for the following
blocks. This loop continues until transactions which do not use the
suggested gas price become part of the following blocks - which in
itself is unlikely, since transactions are sorted by gas price for
inclusion.