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

RollCall changes #1762

Closed
wants to merge 7 commits into from
Closed

RollCall changes #1762

wants to merge 7 commits into from

Conversation

rob-maron
Copy link
Contributor

@rob-maron rob-maron commented Jul 22, 2024

Closes EspressoSystems/HotShot#3455

This PR:

Adds a message handling framework to handle External HotShot events. These are messages that are "external" to HotShot but that HotShot subscribers may want to about. It's like an out-of-band communication layer and prevents us from having to use a separate network to disseminate the information.

Adds RollCall functionality. The frontend will use this to aggregate node identities, starting with the public API URL. On startup a node's RollCallInfo will be broadcast the network. Past that, we will have an external service occasionally sending these messages (e.g. when it restarts) and providing the data to the frontend.

Adds a Public API URL as an optional argument. If not supplied, we will not send a RollCall message.

@rob-maron rob-maron changed the title RollCall example changes RollCall changes Jul 22, 2024
@rob-maron rob-maron requested a review from Ayiga July 22, 2024 19:44
@rob-maron rob-maron marked this pull request as ready for review July 23, 2024 21:11
@Ayiga Ayiga mentioned this pull request Jul 24, 2024
@sveitser sveitser requested a review from imabdulbasit July 25, 2024 14:21
Copy link
Contributor

@imabdulbasit imabdulbasit left a comment

Choose a reason for hiding this comment

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

LGTM! just a minor comment.

}

_ => {
return Err(anyhow::anyhow!("Unknown external message type"));
Copy link
Contributor

Choose a reason for hiding this comment

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

we can use bail!() here

) -> Result<Self> {
// Create the outbound message queue
let (outbound_message_sender, outbound_message_receiver) =
async_compatibility_layer::channel::bounded(10);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the event handling will be quick, but should the channel capacity be increased just to be on the safe side?

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.

[Frontend] - Make changes to allow for sequencer RollCall
2 participants