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

Addressing Aggregated Public Key Updates in a Dynamic Node Network #69

Open
abramsymons opened this issue Nov 25, 2024 · 1 comment
Open

Comments

@abramsymons
Copy link
Collaborator

Description

When a node in the Zellular sequencer network joins, leaves, or changes its public key, the aggregated public key (APK) of the network changes. Currently, each node fetches and periodically updates the list of network nodes at predefined intervals. This periodic synchronization introduces potential inconsistencies:

The leader node might have a different view of the aggregated public key than other nodes, leading to verification failures for the locking and finalization proofs generated by the leader on other nodes.

Problem Scope

This issue is further complicated by the following:

  • Continuous Updates: Node list changes can occur continuously rather than at isolated intervals.
    Multi-State Management: Multiple state changes (e.g., node additions/removals/updates) may occur in quick succession, requiring a mechanism to manage these transitions effectively.
  • Leader-Replica Synchronization: Since replicas are no longer actively fetching updates, a robust mechanism is required to ensure the leader provides consistent and up-to-date state information to the replicas.
  • State Expiration and Validation: Replica nodes must be able to enforce expiration of old states to ensure the leader is not withholding updates.

Proposed Solution

To address this issue, the following approach is suggested:

  1. Tagging and Timestamping States:
  • Each state of the nodes list is tagged with a unique identifier and a timestamp to track its validity and version.
  1. Node List Query by Tag:
  • Enable nodes to query the node list using a specific tag, allowing them to retrieve the exact state associated with that tag.
  1. Leader-Only Updates:
  • Automatic updating of the node list should be restricted to the leader/sequencer node. Replica nodes will no longer perform periodic updates.
  1. Tag-Driven Synchronization:
  • Replica nodes should receive the tag corresponding to the state of the nodes list that the locking or finalization proof was generated against.
  • On receiving a finalization or locking request, replica nodes will:
    • Check if the tag is new.
    • Query the updated node list using the tag to retrieve the state specified by the leader.
    • Validate the timestamp of the retrieved state and, if valid, update their local node list to the suggested state.
  1. Leader’s Responsibility for Updates:
  • The leader node must periodically issue a new tag with a recent timestamp, even if no changes have been applied to the node list. This ensures replicas can track the leader’s active management of the network state.
  1. State Expiration and Disputes:
  • Replica nodes maintain an expiration time for each state. If the leader fails to provide a new tag before the expiration time, replicas will consider the state expired and dispute against the leader. This prevents the leader from hiding updates and ensures transparency and accountability in the network.

Benefits

Implementing this solution ensures:

  • Consistency: Replicas have a consistent and up-to-date view of the aggregated public key.
  • Transparency: State expiration mechanisms prevent the leader from withholding updates from replicas.
  • Reliability: Verification of locking and finalization proofs is robust even in dynamic network conditions.
  • Fault Detection: Expiration and dispute mechanisms detect inactive or malicious leaders.

Impact

This solution addresses the core challenges of maintaining a dynamic network where nodes frequently change while ensuring trust, transparency, and synchronization between the leader and replicas.

@abramsymons
Copy link
Collaborator Author

Update: New Subgraph Version for Monitoring Zellular AVs Deployed

A new version of the subgraph for monitoring Zellular AVs has been deployed with the following configuration:

indexerHints:
  prune: never

You can access it at the following endpoint:

https://api.studio.thegraph.com/query/95922/avs-subgraph/version/latest

Querying State by Block Number (Tag)

Block numbers can now be used as tags to query the specific state of operators at a particular block. For example, to get the state at block 2074515, use the following query:

query GetOperatorsByBlock {
  operators(block: { number: 2074515 }) {
    id
    socket
    stake
    blockNumber
    blockTimestamp
  }
}

```Querying the Latest State

To fetch the latest state of operators along with their block number (tag) and timestamp, use this query:

query GetLatestOperatorsState {
  operators {
    id
    socket
    stake
    blockNumber
    blockTimestamp
  }
}

Feel free to explore and use this subgraph for monitoring and debugging purposes. Let me know if there are any questions or issues!

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

No branches or pull requests

1 participant