-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid using MemBatch in ValidateChain
#10678
Conversation
ValidateChain
a420769
to
07cf0da
Compare
@@ -284,10 +283,6 @@ func (e *EthereumExecutionModule) updateForkChoice(ctx context.Context, original | |||
return | |||
} | |||
} | |||
if e.executionPipeline.HasUnwindPoint() { | |||
unwindToGenesis = e.executionPipeline.UnwindPoint() == 0 | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was useless btw
@@ -251,3 +248,68 @@ func DeserializeKeys(in []byte) [kv.DomainLen][]DomainEntryDiff { | |||
} | |||
return ret | |||
} | |||
|
|||
const diffChunkLen = 8*1024 - 32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had to move it here so that I can incorporate it with Flushing of domains
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand how ValidateChain can do BeginRw
.
What if node does execution at this time?
It means we have less time for pruning?
What if you need validate 2 forks?
Or did you mean BeginRo
?
Plz add this info in description of PR, otherwise hard to understand the intent.
Ok, so the "Write" part of RwTx is only used for unwinding beforehand. If you look at the code the RwTx is rollbacked right after Regarding intent, Intent are:
|
So this issue fixes DupSort issue in MemBatch causing |
yes that too, it is mostly a performance improvement though. removes 15ish% of block time. and also paves the way for persistence of some kind of cache across domains. maybe just the Btree |
We take advantage of sharedDoms