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: Don't mark blob as confirmed if already confirmed #262

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

ian-shim
Copy link
Contributor

@ian-shim ian-shim commented Feb 19, 2024

Why are these changes needed?

There seems to be a race condition that results in some blobs being encoded/dispersed multiple times.
This affects the centralized retriever at the disperser because duplicate dispersals overwrite/corrupt the metadata from the initial confirmation.
This PR is a temporary solution that makes a confirmed metadata immutable. No additional dispersals would overwrite the existing confirmation metadata. Note that it does it in a way that is very inefficient, adding an extra call to retrieve the metadata for every MarkBlobConfirmed call.

Checks

  • I've made sure the lint is passing in this PR.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

Copy link
Contributor

@jianoaix jianoaix left a comment

Choose a reason for hiding this comment

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

lgtm as a stopgap

@ian-shim ian-shim force-pushed the dont-update-confirmed-meta branch from ea6f0a6 to 66d7b09 Compare February 19, 2024 20:35
@ian-shim ian-shim force-pushed the dont-update-confirmed-meta branch from 66d7b09 to 2791059 Compare February 19, 2024 20:45
@ian-shim ian-shim marked this pull request as ready for review February 19, 2024 20:45
@ian-shim ian-shim merged commit 1395860 into Layr-Labs:master Feb 19, 2024
4 checks passed
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.

2 participants