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

Availability Cores Talk for PBA@UCB #632

Merged
merged 20 commits into from
Aug 3, 2023
Merged

Conversation

BradleyOlson64
Copy link
Contributor

@BradleyOlson64 BradleyOlson64 commented Jun 6, 2023

Ready for final review

@nuke-web3
Copy link

paritytech/polkadot#805 for your review targeting this PR 🙏 😁

nuke-web3 and others added 5 commits July 31, 2023 18:23
* fiixes img with closing `/>`, fmt, spelling

* mv files into 7-Polkadot mod

* fix `yarn build` for img paths

* fit code on screen better
Copy link

@nuke-web3 nuke-web3 left a comment

Choose a reason for hiding this comment

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

Trust this is good when you are ready! Let's just do a final bug check in #814 to fix in that PR if needed.

Copy link
Contributor

@Overkillus Overkillus left a comment

Choose a reason for hiding this comment

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

Overall I like the direction. Love the methaphor and would love it even more if it was expanded upon. Left a bunch of comments on specific slides


<img rounded style="width: 1500" src="../assets/exotic_core_scheduling.svg" />

Notes:
Copy link
Contributor

Choose a reason for hiding this comment

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

If you'll be going with the loading bay methaphor expand on it here. Say that a business can lease to carriages or maybe 1 carriage every other train. It works flawlessly with it so let's exploit it.


---

# How Cores Gate Each Step of the Parachains Protocol
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't you only explain how it gates/controls backing? I don't see how it connects to every step and I still don't see the connection to approval voting or disputes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have one slide explaining that since approval and disputes occur after inclusion they are implicitly gated. Gated in this case meaning that blocks will be approved or disputed in proportion to how much core time you buy and fill.


<pba-flex center>

1. Improved liveness
Copy link
Contributor

Choose a reason for hiding this comment

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

How would you defend this claim?

Ethereum doesn't have cores and has no liveness issues. What in our design requires cores for liveness? What do we get out of it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Feel like we HAVE TO mention sharded execution. Not everyone computes everything and cores are a medium a subdivision that allows for this division of labour.

Copy link
Contributor

@rphmeier rphmeier Aug 3, 2023

Choose a reason for hiding this comment

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

relevant https://github.com/Polkadot-Blockchain-Academy/pba-content/pull/632/files#r1282368554 - "predictability" is probably a better framing than liveness, agreed.

An Ethereum transaction will get in eventually, so it is live, though can get crowded out in the near-term. but guaranteeing predictable near-term access to resources and smoothing out short-term volatility is the main benefit here.

Copy link
Contributor

@rphmeier rphmeier Aug 3, 2023

Choose a reason for hiding this comment

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

recommend reworking this section for two benefits:

  • predictability (of parachain making progress in the near-term)
  • resource allocation (execution sharding division of labor)

Copy link
Contributor Author

@BradleyOlson64 BradleyOlson64 Aug 3, 2023

Choose a reason for hiding this comment

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

I take all points given about rephrasing.

Though I have a couple word use quibbles around the interpretation of "improved liveness":

  1. Improved - My use of improved is relative to a version of Polkadot with similar sharding but no mechanism to rotate backing groups. Though I suppose there are plenty of ways to rotate backing groups without cores.
  2. Liveness - It seems I draw a different boundary between liveness and latency than perhaps the industry does. How long does a chain need to be inactive before it can be termed a liveness issue?
    It seems to me that any unintentional degradation of 'time since last block' is a minor hit to liveness. The longer the 'time since last block' the worse the liveness issue is. So if we cut that time from 1 session to 100 blocks I feel like that improves our worst case liveness at least.


1. Improved liveness
1. Flexibility of market structure
1. Flexibility of allocation
Copy link
Contributor

Choose a reason for hiding this comment

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

Cores fundamentally limit our allocation flexibility. It limits the unit of allocation to 1 parablock per 1 relaychain every 6s for 2years in only a single market model with auctions. That is pretty much by definition a terrible allocation flexibility no?

Only with parathreads we solve part of the problem with the 2 years part but until we get the exotic scheduling our flexibility in other regards continues to be heavily constrained by the unit we have chosen. I cannot view it as a flexibility benefit. True flexibility is selling of totally arbitrary amounts of space/computation. Maybe a contentious topic...

Copy link
Contributor

Choose a reason for hiding this comment

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

Cores vs core allocation mechanisms is the distinction here. Slot auctions are a clearly bad core allocation mechanism, but this isn't baked into the definition of core itself.

We talked a lot in other lectures about how we can use cores more effectively with better allocation mechanisms.

Copy link
Contributor

@rphmeier rphmeier Aug 3, 2023

Choose a reason for hiding this comment

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

Some discussion on the "totally arbitrary" aspect: https://github.com/paritytech/polkadot/issues/7441 , at least a step towards that direction.

It's true, probably not better for flexibility overall.

If anything, I'd frame it as a "predictability" benefit. Cores allow us to build mechanisms that reserve future resources for particular processes, giving them better guarantees of continuity and less exposure to short-term volatility. We basically trade off flexibility for predictability.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a bit of a definition thing again. I'd define it as inflexible when short periods of exorbitant prices on Ethereum prevent average users from interacting in a reasonable way. Predictability can act as a kind of flexibility in preventing such scenarios.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also there is a bit of an apples and oranges comparison going on when we compare Polkadot, a sharded scalable network, to just Eth as an L1. If we include Eth L2s, then we could factor in reduced flexibility due to slow withdrawal periods de-facto partitioning the network.

@@ -0,0 +1,560 @@
---
title: Deep Dive, Availability Cores
Copy link
Contributor

Choose a reason for hiding this comment

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

Could be confusing as we've referred to Execution Cores a lot so far

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I’ll make a slide addressing the two names

```rust[1|3-7|4,9-13]
pub(crate) type ParathreadQueue<T> = StorageValue<_, ParathreadClaimQueue, ValueQuery>;

pub struct ParathreadClaimQueue {
Copy link
Contributor

@rphmeier rphmeier Aug 3, 2023

Choose a reason for hiding this comment

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

This is actually dead code from early 2020 that is being replaced, not sure it's worth going over

@BradleyOlson64 BradleyOlson64 merged commit c595003 into main Aug 3, 2023
@BradleyOlson64 BradleyOlson64 deleted the brad-execution-cores branch August 3, 2023 05:49
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.

4 participants