Skip to content

feat: add node attestations endpoint#549

Merged
jorgeantonio21 merged 8 commits into
mainfrom
add-attestation-to-db
Jul 23, 2025
Merged

feat: add node attestations endpoint#549
jorgeantonio21 merged 8 commits into
mainfrom
add-attestation-to-db

Conversation

@Cifko

@Cifko Cifko commented Jul 22, 2025

Copy link
Copy Markdown
Collaborator

This pull request introduces functionality to manage node attestations in the atoma-proxy-service and atoma-state modules. 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:

    • Added two new endpoints: GET /get_node_attestation/{id} to retrieve a node's attestation and PUT /update_node_attestation to update a node's attestation. These endpoints are implemented in atoma-proxy-service/src/handlers/nodes.rs and integrated into the router. [1] [2] [3]
  • Database Integration:

    • Created a new node_attestations table to store node attestation data, including node_small_id, attestation, and updated_at timestamp.
    • Added methods to AtomaState in atoma-state/src/state_manager.rs for inserting, updating, and retrieving node attestations from the database.
  • Data Structures:

    • Introduced new structs NodeAttestation and UpdateNodeAttestation in atoma-state/src/types.rs to represent attestation data and update requests, respectively. These are used throughout the new functionality.

Codebase Modifications

  • Dependency Updates:

    • Added dependencies for blake2 and fastcrypto in atoma-proxy-service/Cargo.toml to support cryptographic operations for signature verification.
  • Router and Module Updates:

    • Updated the proxy service router and module structure to include the new nodes module 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.

@Cifko Cifko requested a review from jorgeantonio21 July 22, 2025 13:48

@jorgeantonio21 jorgeantonio21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking good

Comment thread atoma-proxy-service/src/handlers/nodes.rs Outdated
@Cifko Cifko marked this pull request as ready for review July 23, 2025 12:39
@jorgeantonio21 jorgeantonio21 merged commit 4fff68e into main Jul 23, 2025
13 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