Skip to content

Introduce --db.page-size argument #19546

@shekhirin

Description

@shekhirin

Describe the feature

Problem

To be able to use --db.max-size larger than 8TB, you need to bump the page size to 8KB. This limitation is coming from the fact that MDBX has a max page number of 2^31 https://github.com/paradigmxyz/reth/blob/65acaf330e23fe51f44ce3fdbbae3f216a291bed/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c#L2241. With 4KB pages, it means a maximum database size of 2^31 * 4096 = 8TB.

Solution

To work around this limitation, you need to increase the page size to the next power of 2, which is 8KB. Currently, we don't have a way to set the page size via CLI arguments, we need to add it as --db.page-size argument.

Additionally, the documentation for the CLI argument should explain that it's not possible to change the page size without re-creating the database, effectively meaning a resync of the node.

Additional context

No response

Metadata

Metadata

Assignees

Labels

A-cliRelated to the reth CLIA-dbRelated to the databaseC-docsAn addition or correction to our documentationC-enhancementNew feature or requestD-good-first-issueNice and easy! A great choice to get started

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions