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

fix: aggregate offer invocation cid wrong #1063

Conversation

vasco-santos
Copy link
Contributor

@vasco-santos vasco-santos commented Nov 3, 2023

because not pieces cid block being used but buffer block, which was meaning a different CID being computed for invocation and receipt, as seen in:

So, AggregatorRecord now has a property for buffer and one for pieces. buffer allows us to get to know the pieces inside the buffer while pieces is the direct encoding of PieceLink[] dag-cbor. We could just rely on the buffer, but for issuing all aggregate/accept receipts for each piece, we would need an extra S3 get to read the buffer and compute the dag cbor for the list of pieces inside the buffer

@vasco-santos vasco-santos changed the title fix: aggregate offer invocation cid wrong because not pieces cid bloc… fix: aggregate offer invocation cid wrong Nov 3, 2023
@vasco-santos vasco-santos force-pushed the fix/aggregate-offer-invocation-cid-wrong-because-not-pieces-cid-block-being-used-but-buffer-block branch from b88ed5d to 49ed90f Compare November 3, 2023 11:56
@vasco-santos vasco-santos force-pushed the fix/aggregate-offer-invocation-cid-wrong-because-not-pieces-cid-block-being-used-but-buffer-block branch from 49ed90f to 53f7d2e Compare November 3, 2023 11:58
@vasco-santos vasco-santos merged commit 90a5a4d into main Nov 3, 2023
2 checks passed
@vasco-santos vasco-santos deleted the fix/aggregate-offer-invocation-cid-wrong-because-not-pieces-cid-block-being-used-but-buffer-block branch November 3, 2023 12:07
vasco-santos pushed a commit that referenced this pull request Nov 3, 2023
🤖 I have created a release *beep* *boop*
---


##
[4.0.3](filecoin-api-v4.0.2...filecoin-api-v4.0.3)
(2023-11-03)


### Bug Fixes

* aggregate offer invocation cid wrong
([#1063](#1063))
([90a5a4d](90a5a4d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
@@ -77,6 +77,7 @@ export const pieceAccept = async ({ capability }, context) => {
}
}

// Get buffered pieces
Copy link
Contributor Author

Choose a reason for hiding this comment

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

line 88 .pieces now has pieces CID instead of buffer :)

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.

1 participant