Skip to content

Conversation

@pls148
Copy link
Contributor

@pls148 pls148 commented Oct 29, 2025

Adds an endpoint for da-stake-table/:epoch and da-stake-table/current

Copy link
Contributor

@ss-es ss-es left a comment

Choose a reason for hiding this comment

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

I think the da stake table by epoch endpoint should be simplified (just naively query the membership coordinator, without a cur_epoch guard or catchup). looks good to me otherwise

Comment on lines 303 to 316
let highest_epoch = self
.consensus()
.await
.read()
.await
.cur_epoch()
.await
.map(|e| e + 1);
if epoch > highest_epoch {
return Err(anyhow::anyhow!(
"requested DA stake table for epoch {epoch:?} is beyond the current epoch + 1 \
{highest_epoch:?}"
));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

for the DA stake table by epoch, I think this is not necessary. we can just query for the future DA stake table (and actually, it would be useful to not block requests far in the future, since we can use this to see that the upgrade took effect and the DA change was correctly applied)

Comment on lines 317 to 324
let mem = self
.consensus()
.await
.read()
.await
.membership_coordinator
.stake_table_for_epoch(epoch)
.await?;
Copy link
Contributor

Choose a reason for hiding this comment

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

this is not necessary, we don't need to trigger catchup and should just query the membership coordinator directly

@pls148 pls148 force-pushed the ps/da-stake-table-endpoint branch 2 times, most recently from 0e71788 to 30613ee Compare October 30, 2025 22:40
@pls148 pls148 force-pushed the ps/da-stake-table-endpoint branch from 30613ee to 95ae5d3 Compare October 30, 2025 23:24
Copy link
Contributor

@ss-es ss-es left a comment

Choose a reason for hiding this comment

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

looks good to me

@pls148 pls148 merged commit 2a7e7cb into main Oct 31, 2025
111 of 119 checks passed
@pls148 pls148 deleted the ps/da-stake-table-endpoint branch October 31, 2025 19:57
bfish713 pushed a commit that referenced this pull request Nov 14, 2025
* DA stake table endpoint

* fixes

* remove redundant attribute
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.

3 participants