Skip to content

Conversation

@rvagg
Copy link
Collaborator

@rvagg rvagg commented Dec 18, 2025

BREAKING: EnhancedDataSetInfo.nextPieceId removed, s/currentPieceCount/activePieceCount

This exposes getActivePieceCount from PDPVerifier, replaces the inaccurate nextPieceId-based counting with actual active piece count, and removes nextPieceId from the data set details struct to avoid extra eth_call for a low- value piece of information.


This is a fix on top of #487, I think it should probably be landed separately because of the breaking change. Happy to discuss that breakage though. nextPieceId was originally interesting because it was used as the nonce for AddPieces, but now it's just left as a proxy for piece count, but even that's not accurate because of removals, and we've since added getActivePieceCount that we can call directly. It iterates over the pieces, but this is an eth_call so it's not going to be measurably slower than getNextPieceId where we need it.

BREAKING: EnhancedDataSetInfo.nextPieceId removed, s/currentPieceCount/activePieceCount

This exposes getActivePieceCount from PDPVerifier, replaces the inaccurate
nextPieceId-based counting with actual active piece count, and removes
nextPieceId from the data set details struct to avoid extra eth_call for a low-
value piece of information.
@rvagg rvagg requested a review from SgtPooki December 18, 2025 06:29
@rvagg rvagg requested a review from hugomrdias as a code owner December 18, 2025 06:29
@github-project-automation github-project-automation bot moved this to 📌 Triage in FOC Dec 18, 2025
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 18, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
synapse-dev a1ac567 Dec 18 2025, 06:58 AM

@rjan90 rjan90 moved this from 📌 Triage to 🔎 Awaiting review in FOC Dec 18, 2025
Copy link
Contributor

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

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

changes look good to me.. pretty straightforward

@github-project-automation github-project-automation bot moved this from 🔎 Awaiting review to ✔️ Approved by reviewer in FOC Dec 18, 2025
@rvagg rvagg merged commit e251dd5 into fix/435-byProviderId Dec 19, 2025
11 of 12 checks passed
@github-project-automation github-project-automation bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC Dec 19, 2025
@rvagg rvagg deleted the rvagg/activepieces branch December 19, 2025 09:12
SgtPooki pushed a commit that referenced this pull request Jan 5, 2026
BREAKING: EnhancedDataSetInfo.nextPieceId removed, s/currentPieceCount/activePieceCount

This exposes getActivePieceCount from PDPVerifier, replaces the inaccurate
nextPieceId-based counting with actual active piece count, and removes
nextPieceId from the data set details struct to avoid extra eth_call for a low-
value piece of information.
SgtPooki pushed a commit that referenced this pull request Jan 5, 2026
BREAKING: EnhancedDataSetInfo.nextPieceId removed, s/currentPieceCount/activePieceCount

This exposes getActivePieceCount from PDPVerifier, replaces the inaccurate
nextPieceId-based counting with actual active piece count, and removes
nextPieceId from the data set details struct to avoid extra eth_call for a low-
value piece of information.
SgtPooki pushed a commit that referenced this pull request Jan 5, 2026
BREAKING: EnhancedDataSetInfo.nextPieceId removed, s/currentPieceCount/activePieceCount

This exposes getActivePieceCount from PDPVerifier, replaces the inaccurate
nextPieceId-based counting with actual active piece count, and removes
nextPieceId from the data set details struct to avoid extra eth_call for a low-
value piece of information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

3 participants