Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

babe: introduce a request-answering mechanic #7833

Merged
merged 6 commits into from
Mar 4, 2021
Merged

Conversation

rphmeier
Copy link
Contributor

@rphmeier rphmeier commented Jan 5, 2021

For now, the only request type it answers is requesting the epoch that a child block will have.

@rphmeier rphmeier added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels Jan 5, 2021
@rphmeier
Copy link
Contributor Author

rphmeier commented Jan 5, 2021

I'm not totally sure I need this, given #7789, but maybe it's useful? Cheaper than going to runtime for sure. And breaks our reliance on state pruning, but in my use-case we also do other state requests, so this isn't the only place.

),

#[doc(hidden)]
__Nonexhaustive,
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

TIL

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Me too :)

Copy link
Contributor

@andresilva andresilva 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 we might be able to use this for BABE's RPC module, rather than exposing SharedEpochChanges.

)
.map_err(|e| Error::<B>::ForkTree(Box::new(e)))?
.ok_or_else(|| Error::<B>::FetchEpoch(parent_hash))?;

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

),

#[doc(hidden)]
__Nonexhaustive,
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL

@gnunicorn gnunicorn added the A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Mar 4, 2021
@gnunicorn
Copy link
Contributor

any progress on this?

@rphmeier
Copy link
Contributor Author

rphmeier commented Mar 4, 2021

@gnunicorn pretty sure it's ready

@bkchr bkchr merged commit fc2d2d3 into master Mar 4, 2021
@bkchr bkchr deleted the rh-babe-requests branch March 4, 2021 19:01
KalitaAlexey pushed a commit to KalitaAlexey/substrate that referenced this pull request Jul 9, 2021
* babe: introduce a request-answering mechanic

* gromble

* send method
jordy25519 pushed a commit to cennznet/substrate that referenced this pull request Sep 17, 2021
* babe: introduce a request-answering mechanic

* gromble

* send method
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants