Skip to content

wip: Speculative Availability#7

Draft
timwu20 wants to merge 11 commits intotim/speculative-availability-basefrom
tim/speculative-availability
Draft

wip: Speculative Availability#7
timwu20 wants to merge 11 commits intotim/speculative-availability-basefrom
tim/speculative-availability

Conversation

@timwu20
Copy link

@timwu20 timwu20 commented Nov 12, 2025

Re-implementation of paritytech#9444 to better understand fetching logic and backable candidate retrieval. Contains a hack in av-store to store the metadata of a chunk when receiving a store chunk request. Early requests were silently failing, since the RunningTask.store_chunk method does not return a result and the error was not logged out correctly.

@timwu20 timwu20 changed the base branch from master to tim/speculative-availability-base November 12, 2025 15:16
@timwu20 timwu20 force-pushed the tim/speculative-availability branch from 1161b08 to e7b41d4 Compare November 18, 2025 03:54
Comment on lines 557 to 563
// Get the block number for the relay_parent to update rotation_info.now
let (tx, rx) = oneshot::channel();
sender.send_message(ChainApiMessage::BlockHeader(relay_parent, tx)).await;
let header = rx.await.map_err(|_| Error::NoSuchPoV)?.map_err(|_| Error::NoSuchPoV)?;
let block_number = header.map(|h| h.number).unwrap_or(0); // Default to 0 if not found, but should be found

rotation_info.now = block_number.into(); // Update now to the relay_parent's block number

Choose a reason for hiding this comment

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

Why?

Copy link
Author

Choose a reason for hiding this comment

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

you need to manually update the rotation_info.now to update the state of GroupRotationInfo

@timwu20 timwu20 force-pushed the tim/speculative-availability branch from 8e30cb2 to 9057be9 Compare December 4, 2025 04:07
@axaysagathiya
Copy link

Hi @timwu20,
If you would like to continue with paritytech#9444, it is almost ready; need to fix the benchmark by providing dummy for availability cores runtime method to allow early fetch.

@timwu20 timwu20 force-pushed the tim/speculative-availability branch from 794ef2b to 9d0d2cf Compare December 5, 2025 19:10
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