Skip to content

Progressive list#82

Open
michaelsproul wants to merge 35 commits into
mainfrom
progressive-list
Open

Progressive list#82
michaelsproul wants to merge 35 commits into
mainfrom
progressive-list

Conversation

@michaelsproul

Copy link
Copy Markdown
Member

No description provided.

@michaelsproul

Copy link
Copy Markdown
Member Author

Hi @copilot, could you try implementing an iterator over ProgTree which wraps an iter::Iter instance and keeps track of the next ProgNodes to continue iterating from? The iterator should iterate all elements in the first right child, and then the right child of the first left child, right child of the second left child, and so on. The ProgTree structure is represented by this diagram below:

        root
         /\
        /  \
       /\   1: chunks[0 ..< 1]
      /  \
     /\   4: chunks[1 ..< 5]
    /  \
   /\  16: chunks[5 ..< 21]
  /  \
 0   64: chunks[21 ..< 85]

For more details you can also read EIP-7916: https://eips.ethereum.org/EIPS/eip-7916.

Copilot AI commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

@michaelsproul I've opened a new pull request, #84, to work on those changes. Once the pull request is ready, I'll request review from you.

@michaelsproul michaelsproul marked this pull request as ready for review December 1, 2025 02:43
@codecov-commenter

codecov-commenter commented Dec 1, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.50664% with 108 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.54%. Comparing base (8963bc5) to head (883e818).

Files with missing lines Patch % Lines
src/progressive_tree.rs 78.40% 46 Missing ⚠️
src/progressive_list.rs 81.15% 36 Missing ⚠️
src/any_list.rs 80.83% 23 Missing ⚠️
src/context_deserialize.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #82      +/-   ##
==========================================
+ Coverage   70.15%   75.54%   +5.38%     
==========================================
  Files          22       25       +3     
  Lines        1280     1803     +523     
==========================================
+ Hits          898     1362     +464     
- Misses        382      441      +59     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@michaelsproul

Copy link
Copy Markdown
Member Author

Hey @copilot, can you try adding ProgressiveList to the proptest suite of tests in src/tests/proptest/operations.rs? You'll need a new ProgressiveSpec data structure that doesn't have a length limit (no N), but you can reuse the same Op structure as we should support all of the same ops eventually (for now their implementations on ProgressiveList can be no-ops if not implemented). You'll want to write a new function apply_ops_progressive_list.

Copilot AI commented Dec 1, 2025

Copy link
Copy Markdown
Contributor

@michaelsproul I've opened a new pull request, #89, to work on those changes. Once the pull request is ready, I'll request review from you.

* Initial plan

* Add ProgressiveList to proptest suite

Co-authored-by: michaelsproul <4452260+michaelsproul@users.noreply.github.com>

* Refactor progressive list tests to only include supported operations

Co-authored-by: michaelsproul <4452260+michaelsproul@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: michaelsproul <4452260+michaelsproul@users.noreply.github.com>
Comment thread src/prog_tree.rs Outdated
Comment thread src/progressive_tree.rs
Comment on lines +140 to +148
// Assemble the `ProgressiveTree` in reverse from deepest to shallowest.
let mut current = Self::ProgressiveZero;
for tree in subtrees.into_iter().rev() {
current = Self::ProgressiveNode {
hash: RwLock::new(Hash256::ZERO),
left: tree,
right: Arc::new(current),
};
}

@macladson macladson Feb 13, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can probably assemble as we go instead, but I'm not sure how much value that adds

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