Skip to content

Conversation

@Chen-Yifan
Copy link
Contributor

@Chen-Yifan Chen-Yifan commented Nov 22, 2025

Add --root-offsets-chunk-count flag to monad_mpt to make the number of
chunks allocated for root offsets configurable (default: 16, must be
power of 2). Each chunk holds approximately 16.5M history entries,
allowing operators to adjust history depth based on deployment
requirements. Previously, this was hardcoded to 2 chunks.

Copilot AI review requested due to automatic review settings November 22, 2025 00:18
Copilot finished reviewing on behalf of Chen-Yifan November 22, 2025 00:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the number of chunks allocated for root offsets configurable through a new --root-offsets-chunk-count flag in the monad_mpt CLI tool. Previously hardcoded to 2 chunks, operators can now adjust history depth based on deployment requirements, with each chunk holding approximately 16.5M history entries.

Key changes:

  • Added root_offsets_chunk_count configuration field with default value of 2
  • Changed UpdateAux and UpdateAuxImpl constructors from taking pointer to reference for AsyncIO
  • Updated storage pool to support configurable conventional chunk counts with backward compatibility

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
category/mpt/ondisk_db_config.hpp Added root_offsets_chunk_count configuration field
category/async/storage_pool.hpp Added num_cnv_chunks field to creation flags and metadata
category/async/storage_pool.cpp Implemented configurable chunk allocation with backward compatibility
category/mpt/trie.hpp Changed constructors to take AsyncIO by reference instead of pointer
category/mpt/update_aux.cpp Updated set_io signature and chunk allocation logic
category/mpt/db.cpp Updated constructor calls to pass AsyncIO by reference
category/mpt/find_notify_fiber.cpp Changed member variable from pointer to reference
category/mpt/cli_tool_impl.cpp Added --root-offsets-chunk-count CLI flag and validation
category/mpt/test/update_aux_test.cpp Added test for configurable chunk allocation
category/mpt/test/*.cpp Updated test code to use reference-based constructors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Chen-Yifan Chen-Yifan force-pushed the vicky/root-offsets-config branch from ec0b109 to cd1df48 Compare November 22, 2025 00:42
maxkozlovsky
maxkozlovsky previously approved these changes Nov 24, 2025
@Chen-Yifan Chen-Yifan force-pushed the vicky/root-offsets-config branch from cd1df48 to 0003927 Compare November 24, 2025 17:33
@Chen-Yifan Chen-Yifan force-pushed the vicky/root-offsets-config branch 4 times, most recently from 852d4dd to 269892e Compare November 24, 2025 18:35
kkuehlz
kkuehlz previously approved these changes Nov 24, 2025
kkuehlz
kkuehlz previously approved these changes Nov 24, 2025
Add --root-offsets-chunk-count flag to monad_mpt to make the number of
chunks allocated for root offsets configurable (default: 16, must be
power of 2). Each chunk holds approximately 16.5M history entries,
allowing operators to adjust history depth based on deployment
requirements. Previously, this was hardcoded to 2 chunks.
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.

4 participants