feat: add node attestations endpoint#549
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces functionality to manage node attestations in the
atoma-proxy-serviceandatoma-statemodules. The key changes include adding new API endpoints for managing node attestations, integrating database support for storing and retrieving attestations, and updating the OpenAPI documentation to reflect these changes.New Node Attestation Functionality
API Endpoints for Node Attestations:
GET /get_node_attestation/{id}to retrieve a node's attestation andPUT /update_node_attestationto update a node's attestation. These endpoints are implemented inatoma-proxy-service/src/handlers/nodes.rsand integrated into the router. [1] [2] [3]Database Integration:
node_attestationstable to store node attestation data, includingnode_small_id,attestation, andupdated_attimestamp.AtomaStateinatoma-state/src/state_manager.rsfor inserting, updating, and retrieving node attestations from the database.Data Structures:
NodeAttestationandUpdateNodeAttestationinatoma-state/src/types.rsto represent attestation data and update requests, respectively. These are used throughout the new functionality.Codebase Modifications
Dependency Updates:
blake2andfastcryptoinatoma-proxy-service/Cargo.tomlto support cryptographic operations for signature verification.Router and Module Updates:
nodesmodule and its routes. [1] [2] [3]These changes collectively enhance the system by enabling secure and efficient management of node attestations, with robust database support and API integration.