Some tests take quite some time during exit, which I think causes
some appveyor fails like this:
https://ci.appveyor.com/project/ethereum/go-ethereum/builds/39511210/job/xhom84eg2e4uulq3
One of the things that seem to take time during exit is waiting
(up to 100ms) for the syncbloom to close. This PR changes it to use
a channel, instead of looping with a 100ms wait.
This also includes some unrelated changes improving the reliability of
eth/fetcher tests, which fail a lot because they are time-dependent.
This commit adds the package gethclient which is similar to the ethclient
and implements some geth specific functionality.
Co-authored-by: Edgar Aroutiounian <edgar.factorial@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
This fixes transaction sending in the case where an app using go-ethereum v1.10.4
is talking to a pre-EIP-1559 RPC node. In this case, the eth_maxPriorityFeePerGas
endpoint is not available and we can only rely on eth_gasPrice.
* core,eth/tracers: make isPrecompiled dependent on HF
* eth/tracers: use keys when constructing chain config struct
* eth/tracers: dont initialize activePrecompiles with random value
When the plugin loader itself had to know the types in the arguments
and return values of the plugin functions, it was very difficult to
avoid import loops, given that the types were often defined in the
same package that needed to invoke the plugins.
Under this model, the plugin loader has much less knowledge of the
plugins themselves, and within each package we define functions to
interact with the plugins.
Things are currently broken because of import cycles. I'm going to
need to revisit how the plugin loader works, but I wanted to make
a checkpoint before I start breaking things again.
This makes two main changes to the plugin system:
* Instead of assuming that each plugin will have exactly one type,
inspect each plugin to see which interfaces it provides, and
register it as a provider of each provided interface. This can
allow a single .so file to provide multiple interfaces, which
will likely be necessary for aggregating certain types of info.
* Rather than using dependency injection and having to propagate
the plugin system all throughout Geth, have a default plugin
loader so we need only import the module and make calls to it.
If the plan were to integrate this into mainline Geth, I would
say we use dependency injection and take the time to pass the
plugin loader throughout the codebase, but as I expect this to
be a fork that has to pull upstream changes, this approach
should make merge conflicts much less common.
This change increases the cache size from 64 to 256 Mb for block bodies.
Benchmarks have shown this to be one bottleneck when trying to achieve
higher download speeds.
The commit also includes a minor optimization for header inserts in package
core: previously, the presence of headers in the database was checked for
every header before writing it. With the change, if one header fails the
presence check, all subsequent headers are also assumed to be missing.
This is an improvement because in practice, the headers are almost always
missing during sync.
Previously, the test waited a second and then failed if geth had not
started. This caused the test to fail intermittently. This change checks
whether the IPC is open 10 times over a 5 second period and then fails
if geth is still not available.
The `README.md` links the Gitter channel for discussions, but the
official docs and even the Gitter channel itself recommend using the
official Discord Server for such discussions.
This PR simply changes the Gitter link and provides Discord invite link.
When deleting in fullNode, and the new child node nn is not nil, there is no need
to check the number of non-nil entries in the node. This is because the fullNode
must've contained at least two children before deletion, so there must be another
child node other than nn.
Co-authored-by: Felix Lange <fjl@twurst.com>
Copy the CliqueConfig instead of reusing the pointer.
This makes DeveloperGenesisBlock thread safe and prevents it from
changing params.AllCliqueProtocolChanges.Clique.Epoch.