Turned PostMergeContext to be a regular class instead of a singleton.…#8248
Turned PostMergeContext to be a regular class instead of a singleton.…#8248Filter94 wants to merge 1 commit intobesu-eth:mainfrom
Conversation
| final WorldStateArchive worldStateArchive, | ||
| final ProtocolSchedule protocolSchedule) { | ||
| preMergeBesuControllerBuilder.postMergeContext(postMergeContext); | ||
| mergeBesuControllerBuilder.postMergeContext(postMergeContext); |
There was a problem hiding this comment.
Please note this change. I couldn't find a better way to get around this and I wonder if there's a better way
… Addded some other improvements to the acceptance tests DSL Signed-off-by: Roman <4833306+Filter94@users.noreply.github.com>
5e4027e to
8aabfa4
Compare
There was a problem hiding this comment.
I need a tip on this part. ThreadBesuNodeRunner can only create a Besu instance that doesn't have persistence, meaning it's losing all the state after restart. In-memory KeyValueStorageProvider is provided by BesuControllerModule::provideKeyValueStorageProvider called by dagger. I wonder if there's a non invasive way to invert this dependency and provide a different key value storage, namely I'd like to set it to a persistent version for my testing.
jframe
left a comment
There was a problem hiding this comment.
Overall I think the PR can be simpler by just reusing the consensusContext from the MergeBesuControllerBuilder.
I had a go at doing this by creating it up front in the MergeBesuControllerBuilder and exposing a getter for the TransitionControllerBuilder still a bit ugly but it hides the details in the controller builders.
Here's my attempt if you want to take a look #8253
| .cacheLastBlocks(numberOfblocksToCache) | ||
| .genesisStateHashCacheEnabled(genesisStateHashCacheEnabled) | ||
| .apiConfiguration(apiConfigurationSupplier.get()) | ||
| .postMergeContext(new PostMergeContext()) |
There was a problem hiding this comment.
I think this can be simpler. There is no need to expose the PostMergeContext as a method in the BesuControllerBuilder as we are already building this in the createContext method
|
Consumed by this PR |
… Addded some other improvements to the acceptance tests DSL
PR description
Fixed Issue(s)
This fix allows
ThreadBesuNodeRunnerto spin up and tear down Besu instances multiple times during process's lifecycle.Thanks for sending a pull request! Have you done the following?
doc-change-requiredlabel to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew spotlessApply./gradlew build./gradlew acceptanceTest./gradlew integrationTest./gradlew ethereum:referenceTests:referenceTests