Prioritize high gas prices during mining. Previously we ordered only by
the order in which the transactions were received. This will increase
expected profit when mining.
Co-authored-by: Joshua Melton <jmelton@lawlogix.com>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
If a peer exceeds the authorized number of pending blocks, Besu will replace the lowest priority block in the cache from this peer by this new one until the local node sync a new block and maybe purges one of the blocks of this peer.
The highest priority blocks are those that are lowest in block height and then higher priority if they were sent more recently.
Other peers will not be impacted and will be able to continue sending pending blocks.
The cache size limit is the distance between the minimum and maximum value of the BlockPropagationRange parameter. Besu automatically purges blocks outside this range.
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Allows nodes in a network to not strictly prefer older peers. This
helps break up impenetrable cliques in small, stable networks (private
networks often fit this description). We generate a random mask for the
lifetime of the process and use that to xor against the nodeId of a
potential peer. The desired behavior of the network is that some of the
nodes will allow the new peer to make an inbound connection but that
peer can't try to farm a nodeId that would make prioritize it over all
other peers in a guaranteed fashion.
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* Add genesis config parameter ecip1099Block
Signed-off-by: Edward Mack <ed@edwardmack.com>
* add stub for epoch activation config
Signed-off-by: Edward Mack <ed@edwardmack.com>
* add stubs for EtcBesuControllerBuilder
that will handle ECIP 1099 Colibrate Epoch Duration functionality
Signed-off-by: Edward Mack <ed@edwardmack.com>
* introduce EtcHashMinerExecutor
Signed-off-by: Edward Mack <ed@edwardmack.com>
* implement EtcHashMinerExecutor
Signed-off-by: Edward Mack <ed@edwardmack.com>
* remove ecip1099 genesis config option
Signed-off-by: Edward Mack <ed@edwardmack.com>
* apply spotless to code
Signed-off-by: Edward Mack <ed@edwardmack.com>
* add test for Etc Hash epoch calculation
Signed-off-by: Edward Mack <ed@edwardmack.com>
* cleanup comments, apply spotless
Signed-off-by: Edward Mack <ed@edwardmack.com>
* make needed variables final
Signed-off-by: Edward Mack <ed@edwardmack.com>
* update changelog
Signed-off-by: Edward Mack <ed@edwardmack.com>
* refactor code to add epochCalculator to EthHash
As suggested in comment removed EtcHash series of classes to keep
existing controller.
Signed-off-by: Edward Mack <ed@edwardmack.com>
* use gas limit calculator
Signed-off-by: Edward Mack <ed@edwardmack.com>
* fix imports
Signed-off-by: Edward Mack <ed@edwardmack.com>
* run spotless apply
Signed-off-by: Edward Mack <ed@edwardmack.com>
* fix imports
Signed-off-by: Edward Mack <ed@edwardmack.com>
* fix comments
Signed-off-by: Edward Mack <ed@edwardmack.com>
* add ecip1099Block option to asMap method
Signed-off-by: Edward Mack <ed@edwardmack.com>
Updated returned HTTP status code to 200 for JSON-RPC error
Updated tests related to the modified HTTP status code
Signed-off-by: gabrieledm <gabriele.delmonte90@gmail.com>
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Co-authored-by: gabrieledm <gabriele.delmonte90@gmail.com>
GasLimitCalculator is now just an interface. This simplifies the logic
in what was previously GasLimitCalculator but is now
TargetingGasLimitCalculator.
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Enable eth65 by default for the RC period. This commit should be
reverted if issues are found before the release date.
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* Prefer `EvmAccount` in interfaces and methods
* Rename `DefaultEvmAccount` to `WrappedEvmAccount`
* Move `UpdateTrackingAccount` to a top level class from an inner class
* Re-type `getTouchedAcounts()` to not use `UpdateTrackingAccount`
* Extract `WorldStateArchive` interface, rename old class
`DefaultWorldStateArchive`
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Add better invalid reason logging.
The EVMTool state-test will add a field in the json result object.
Block transaction processing will log at INFO why the block is invalid
and include the block hash and (if relevant) transaction hash.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* store warmed addresses and slots i the MessageFrame
* update gas calculations for berlin specific rules
* allow state tests in EVMTool to override the forks.
* retesteth should't broadcast re-orgs
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Add some Quality of Life changes to reference tests
* ShanghaiLove tests tend to OOM in parallel execution. Exclude them.
* LegacyTests, as generated code, are not subject to SPDX header checks.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* handle case where onchain groups do not exist
* added constructor so the tests can mock the onchain management contract
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
LogBloom could be invalid in the cache after a reorg. With this PR, there is an update of the cache every time a reorg takes place
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
The NETSTATS_URL_REGEX allows domain names but only allows dots, letters and numbers.
Modified the NETSTATS_URL_REGEX to allow dashes
Signed-off-by: Roderik van der Veer <roderik@settlemint.com>
Co-authored-by: matkt <karim.t2am@gmail.com>
Fix some issues which caused some log to be missing when calling the eth_getLogs method
- Setting up a cache version
- Add a check integrity of the cache
- Fix a lock issue
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
We were attempting to use hashes from a queue we frequently evict from
and not handling that case in an iterator that walks over that
collection.
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* Fix#1110: Privacy: Restart caused by insufficient memory can cause inconsistent private state
Signed-off-by: Stefan Pingel <stefan.pingel@consensys.net>
This solves the same problem as 3a39fbb but better. The attempt
there has an issue where it still emulates sending the request and
therefore only 5 requests max can be aborted. Thus the problem of the
peer becoming stuck in a busy state remains. Here we do what we
should've done all along, which is proactively abort these requests
when a disconnect event occurs.
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* addded genesis config option getEcip1017EraRounds
to define the number of Rounds in an Era for Ethereum Classic Emission
Schedule.
Signed-off-by: Edward Mack <ed@edwardmack.com>
* add entry to CHANGLOG.mg
Signed-off-by: Edward Mack <ed@edwardmack.com>
* some doc changes and implemented style suggestions
Signed-off-by: Edward Mack <ed@edwardmack.com>
This PR add the support to DNS. By default Besu refuses the use of a DNS but it is possible to use it by adding the following flag --Xdns-enabled=true. Adding this flag will resolve the hostname when starting besu and then it won't change
If there is a need for a more dynamic update (eg for permissioning) add also this flag --Xdns-update-enabled = true ( this will query the DNS every time. So you must trust the DNS on which you are looking for the IP)
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>