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

share/availability/light: Unmarshalling of failed sample results in false-positive error #3943

Open
renaynay opened this issue Nov 15, 2024 · 1 comment · May be fixed by #3944
Open

share/availability/light: Unmarshalling of failed sample results in false-positive error #3943

renaynay opened this issue Nov 15, 2024 · 1 comment · May be fixed by #3944
Labels
area:shares Shares and samples bug Something isn't working

Comments

@renaynay
Copy link
Member

renaynay commented Nov 15, 2024

2024-11-15T15:58:13.262Z	ERROR	das	das/worker.go:134	failed to sample header	{"type": "retry", "height": 3089050, "hash": "F2D6B3C115227531BB89B525073451475ABA4D997445043622A7A336196218F8", "square width": 2, "data root": "8F86D0659F5D39A08F3064E0352F64C5EA1558AA8C607A428A8722108268F090", "err": "invalid sampling result: expected 16 samples, got 4", "finished (s)": 0.00136031}
2024-11-15T15:58:13.262Z	ERROR	das	das/worker.go:134	failed to sample header	{"type": "retry", "height": 3089855, "hash": "C6805A02F90C480BA5422D419BDFCA044427F6CE6A2BAF34EB0B6DA18190D035", "square width": 2, "data root": "DAD2887B6E3BC2FB4E27ED6ADBD350744CB1121AA3C9E2F60D87BE57522517E7", "err": "invalid sampling result: expected 16 samples, got 4", "finished (s)": 0.00147832}

with corresponding non-empty block:
https://mocha.celenium.io/block/3089855?tab=transactions

This is because of https://github.com/celestiaorg/celestia-node/blob/main/share/availability/light/availability.go#L106

While we allow for smaller sampling set when generating the randomised coordinates, we still throw error if it doesn't align with the default amount (16). So if some retries occur on a block that looks like this, this error will happen.

@renaynay renaynay added bug Something isn't working area:shares Shares and samples labels Nov 15, 2024
@renaynay renaynay changed the title share/availability/light: 16 samples attempted on a non-empty, single-share ODS share/availability/light: Unmarshalling of failed sample results in false-positive error Nov 15, 2024
@renaynay
Copy link
Member Author

On second thought, we shouldn't sample all 4 quadrants of the square - one is sufficient and should be considered as an optimisation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:shares Shares and samples bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant