Skip to content
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

Respect the sync limit of blocks insertion when inserting in MDBX. #10341

Merged
merged 14 commits into from
May 15, 2024

Conversation

Giulio2002
Copy link
Contributor

Basically, when we download blocks. we keep the in ETL and do: Insert N Blocks + Execute N blocks and so on... without inserting big amounts at once and then do small steps.

@Giulio2002 Giulio2002 changed the title Respect the sync limit of step when inserting in MDBX. Respect the sync limit of blocks insertion when inserting in MDBX. May 14, 2024
@AskAlexSharov AskAlexSharov merged commit 9596770 into main May 15, 2024
10 checks passed
@AskAlexSharov AskAlexSharov deleted the sync-back-loop branch May 15, 2024 01:18
@AskAlexSharov
Copy link
Collaborator

AskAlexSharov commented May 15, 2024

tested on Holesky. See:

[INFO] [05-15|03:53:57.770] [4/12 Execution] starting                from=610001 to=612000 fromTxNum=10814695 offsetFromBlockBeginning=0 initialCycle=false useExternalTx=true

initialCycle=false - means aggressive pruning disabled. and couple other optimizations:

if initialCycle {
	if _, ok := engine.(*aura.AuRa); ok { //gnosis collate eating too much RAM, will add ETL later
		agg.SetCollateAndBuildWorkers(1)
	} else {
		agg.SetCollateAndBuildWorkers(min(2, estimate.StateV3Collate.Workers()))
	}
	agg.SetCompressWorkers(estimate.CompressSnapshot.Workers())
	defer agg.DiscardHistory(kv.CommitmentDomain).EnableHistory(kv.CommitmentDomain)
} else {
	agg.SetCompressWorkers(1)
	agg.SetCollateAndBuildWorkers(1)
}

It's ok to have external RwTx and initialCycle=true in same time

trying to fix by #10343

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants