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

Reexamine the solution for informing the node-service about poet proofs #6645

Open
poszu opened this issue Jan 21, 2025 · 0 comments · May be fixed by #6659
Open

Reexamine the solution for informing the node-service about poet proofs #6645

poszu opened this issue Jan 21, 2025 · 0 comments · May be fixed by #6659

Comments

@poszu
Copy link
Contributor

poszu commented Jan 21, 2025

Description

The ATX Builder (which runs on the smeshing-service), registers in poet services and downloads proofs from them without interaction with the node-service. Because of this, the node-service is not aware of any poet proofs. This creates a problem when the smeshing-service publishes an ATX to the node-service - the ATX cannot be validated because the node-service doesn't know the poet proof (it's not part of the ATX).

In the current implementation, there is a special POST endpoint /poet, which is used to send the poet proof to the node-service, which validates it and stores it in the state DB. This opens up a vulnerability - the node-service is easily DOS-able by sending it many (potentially millions) of valid poet proofs.

The poet proof is pushed to the node-service in:

if db.remoteStorer != nil {
err := db.remoteStorer.StorePoetProof(ctx, proofMessage)
if err != nil {
db.logger.Warn("failed to store the poet proof in remote store", zap.Error(err))
}
}

Note

A minimal poet proof is easy to create. It needs to have only 150 leaves and more proofs can be created upon it by adding one more leaf (151, 152, 153 and so on).

We need to find a better way of informing the node-service about the poet proof used in the ATX. One way could be to include the proof along with the published ATX.

@poszu poszu moved this to 📋 Backlog in Dev team kanban Jan 21, 2025
@poszu poszu self-assigned this Jan 21, 2025
@poszu poszu moved this from 📋 Backlog to 🔖 Next in Dev team kanban Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔖 Next
Development

Successfully merging a pull request may close this issue.

1 participant