-
Notifications
You must be signed in to change notification settings - Fork 711
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
Better approval voting paramters #640
Comments
IMO increasing tick from 500ms to 1s would help in reducing the amount of higher tranches kicking in because higher ToF of approval distribution messages. However as we scale up, the ToF increases as well so we would need to bump it even higher, which would eventually increase the approval checking lag. We should implement the other improvements needed to process these messages faster and lower the ToF. |
We have roughly We want " We should rerun the simulator more carefully and finally do closed form analysis, but We'll adopt sampling without replacement for the new relay vrf tranche zero scheme, roughly like
In this way, We'd now be sampling without replacement so we're seeing hypergeometric distributions from validators perspective. Now a validator has
Now validators are independent Bernoulli trials from the cores' perspectives, so the core observes a Binomial distribution of checkers, and thus expects
I didn't expect this all worked out so simply.. Assume We'll likely keep the standard deviation We could set |
If we are adjusting the approval-checking parameters, we should also take into account a modification that I think will be useful: allowing for dynamic amounts of parachains to be included within a block. The motivation is that we may want to allow more parachain blocks to be backed than the number of cores. This is desirable in the case that:
Especially when we look forward to features like parachains sharing cores, but also just with asynchronous backing, it seems reasonable to allow "missed" blocks to be made up for later, as long as it doesn't overwhelm the relay chain runtime. |
These parameters would mostly not change if we include more or fewer parachains. We'd still choose |
Mostly in reply to @burdges post above:
With regards to the nDelayTranches formula:
shouldn't it be:
You state that the want the width to be between 2 and 3 and suggest:
What's the justification between this (2,3) range? Our implementers guide suggests that we operate between 1 and 2:
Is this constraint no longer relevant? If so why?
Due to the way That also means we cannot simply set it to -1 with
From what I know
Think it's a good change that gives us more direct control, but considering how later on you focus on changing E around:
wouldn't setting E directly be a nicer approach? I feel like controlling E directly makes the most sense as what we care about is the actual size of those tranches. Then we directly control tranche sizes with:
I'll also piggyback and ask what is the rationale behind
All the math checks out 👍 + Graph visualising the different sigmas Jeff used above: |
Yes oops.
We've discussed smaller I picked 2.25 as half way between 1.5 and 3, but then I ran the simulator using it and others. I felt like it left low enough extinction odds.
I wrote " .. " around the -1 because I meant remove Yes. It's nice to compute We could adjust the VRF output code for non-integer We should also consider a We could compute
|
I definitely think we should allow for relayVrfModuloSamples to be non-integer. We know that in most circumstances we'll be aiming for values of around 3-6 so the extra precision will be very useful. For instance with What is the purpose of setting For some potential
With regards to the Firstly, the I assume we should maintain Of course having The above logic can be significantly altered if someone sees a different approach for setting |
Yeah sure, non-integer
We'd enforce Yes, we should assume Of course the |
* added logging and updated metadata * separated tests which bootstrap the bridge * tested with v0.9.23 * add channel variables to example * revert example envrc
This issue has been mentioned on Polkadot Forum. There might be relevant details there: |
This issue has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/the-new-polkadot-community-testnet/4956/22 |
This issue has been mentioned on Polkadot Forum. There might be relevant details there: |
* Move justification module to header-chain primitives crate * Get justification module compiling in new location * Get justification module tests compiling * Use justification code from `header-chain` crate Mostly compiles, having issues with std/test feature flags across crates. * Move some code around * Move justification tests to integration testing crate * Add `test-utils` crate * Remove tests and test-helper module from justification code * Use `test-utils` in Substrate bridge pallet tests * Remove `sp-keyring` related code from `pallet-substrate-bridge` * Remove `helpers` module from `pallet-substrate-bridge` * Add some documentation * Add more documentation * Fix typo Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: Tomasz Drwięga <[email protected]>
* Move justification module to header-chain primitives crate * Get justification module compiling in new location * Get justification module tests compiling * Use justification code from `header-chain` crate Mostly compiles, having issues with std/test feature flags across crates. * Move some code around * Move justification tests to integration testing crate * Add `test-utils` crate * Remove tests and test-helper module from justification code * Use `test-utils` in Substrate bridge pallet tests * Remove `sp-keyring` related code from `pallet-substrate-bridge` * Remove `helpers` module from `pallet-substrate-bridge` * Add some documentation * Add more documentation * Fix typo Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: Tomasz Drwięga <[email protected]>
* Move justification module to header-chain primitives crate * Get justification module compiling in new location * Get justification module tests compiling * Use justification code from `header-chain` crate Mostly compiles, having issues with std/test feature flags across crates. * Move some code around * Move justification tests to integration testing crate * Add `test-utils` crate * Remove tests and test-helper module from justification code * Use `test-utils` in Substrate bridge pallet tests * Remove `sp-keyring` related code from `pallet-substrate-bridge` * Remove `helpers` module from `pallet-substrate-bridge` * Add some documentation * Add more documentation * Fix typo Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: Tomasz Drwięga <[email protected]>
* Move justification module to header-chain primitives crate * Get justification module compiling in new location * Get justification module tests compiling * Use justification code from `header-chain` crate Mostly compiles, having issues with std/test feature flags across crates. * Move some code around * Move justification tests to integration testing crate * Add `test-utils` crate * Remove tests and test-helper module from justification code * Use `test-utils` in Substrate bridge pallet tests * Remove `sp-keyring` related code from `pallet-substrate-bridge` * Remove `helpers` module from `pallet-substrate-bridge` * Add some documentation * Add more documentation * Fix typo Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: Tomasz Drwięga <[email protected]>
* Move justification module to header-chain primitives crate * Get justification module compiling in new location * Get justification module tests compiling * Use justification code from `header-chain` crate Mostly compiles, having issues with std/test feature flags across crates. * Move some code around * Move justification tests to integration testing crate * Add `test-utils` crate * Remove tests and test-helper module from justification code * Use `test-utils` in Substrate bridge pallet tests * Remove `sp-keyring` related code from `pallet-substrate-bridge` * Remove `helpers` module from `pallet-substrate-bridge` * Add some documentation * Add more documentation * Fix typo Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: Tomasz Drwięga <[email protected]>
* Move justification module to header-chain primitives crate * Get justification module compiling in new location * Get justification module tests compiling * Use justification code from `header-chain` crate Mostly compiles, having issues with std/test feature flags across crates. * Move some code around * Move justification tests to integration testing crate * Add `test-utils` crate * Remove tests and test-helper module from justification code * Use `test-utils` in Substrate bridge pallet tests * Remove `sp-keyring` related code from `pallet-substrate-bridge` * Remove `helpers` module from `pallet-substrate-bridge` * Add some documentation * Add more documentation * Fix typo Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: Tomasz Drwięga <[email protected]>
* Move justification module to header-chain primitives crate * Get justification module compiling in new location * Get justification module tests compiling * Use justification code from `header-chain` crate Mostly compiles, having issues with std/test feature flags across crates. * Move some code around * Move justification tests to integration testing crate * Add `test-utils` crate * Remove tests and test-helper module from justification code * Use `test-utils` in Substrate bridge pallet tests * Remove `sp-keyring` related code from `pallet-substrate-bridge` * Remove `helpers` module from `pallet-substrate-bridge` * Add some documentation * Add more documentation * Fix typo Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: Tomasz Drwięga <[email protected]>
* Move justification module to header-chain primitives crate * Get justification module compiling in new location * Get justification module tests compiling * Use justification code from `header-chain` crate Mostly compiles, having issues with std/test feature flags across crates. * Move some code around * Move justification tests to integration testing crate * Add `test-utils` crate * Remove tests and test-helper module from justification code * Use `test-utils` in Substrate bridge pallet tests * Remove `sp-keyring` related code from `pallet-substrate-bridge` * Remove `helpers` module from `pallet-substrate-bridge` * Add some documentation * Add more documentation * Fix typo Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: Tomasz Drwięga <[email protected]>
* Move justification module to header-chain primitives crate * Get justification module compiling in new location * Get justification module tests compiling * Use justification code from `header-chain` crate Mostly compiles, having issues with std/test feature flags across crates. * Move some code around * Move justification tests to integration testing crate * Add `test-utils` crate * Remove tests and test-helper module from justification code * Use `test-utils` in Substrate bridge pallet tests * Remove `sp-keyring` related code from `pallet-substrate-bridge` * Remove `helpers` module from `pallet-substrate-bridge` * Add some documentation * Add more documentation * Fix typo Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: Tomasz Drwięga <[email protected]>
* Move justification module to header-chain primitives crate * Get justification module compiling in new location * Get justification module tests compiling * Use justification code from `header-chain` crate Mostly compiles, having issues with std/test feature flags across crates. * Move some code around * Move justification tests to integration testing crate * Add `test-utils` crate * Remove tests and test-helper module from justification code * Use `test-utils` in Substrate bridge pallet tests * Remove `sp-keyring` related code from `pallet-substrate-bridge` * Remove `helpers` module from `pallet-substrate-bridge` * Add some documentation * Add more documentation * Fix typo Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: Tomasz Drwięga <[email protected]>
* Move justification module to header-chain primitives crate * Get justification module compiling in new location * Get justification module tests compiling * Use justification code from `header-chain` crate Mostly compiles, having issues with std/test feature flags across crates. * Move some code around * Move justification tests to integration testing crate * Add `test-utils` crate * Remove tests and test-helper module from justification code * Use `test-utils` in Substrate bridge pallet tests * Remove `sp-keyring` related code from `pallet-substrate-bridge` * Remove `helpers` module from `pallet-substrate-bridge` * Add some documentation * Add more documentation * Fix typo Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: Tomasz Drwięga <[email protected]>
* Move justification module to header-chain primitives crate * Get justification module compiling in new location * Get justification module tests compiling * Use justification code from `header-chain` crate Mostly compiles, having issues with std/test feature flags across crates. * Move some code around * Move justification tests to integration testing crate * Add `test-utils` crate * Remove tests and test-helper module from justification code * Use `test-utils` in Substrate bridge pallet tests * Remove `sp-keyring` related code from `pallet-substrate-bridge` * Remove `helpers` module from `pallet-substrate-bridge` * Add some documentation * Add more documentation * Fix typo Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: Tomasz Drwięga <[email protected]>
* Move justification module to header-chain primitives crate * Get justification module compiling in new location * Get justification module tests compiling * Use justification code from `header-chain` crate Mostly compiles, having issues with std/test feature flags across crates. * Move some code around * Move justification tests to integration testing crate * Add `test-utils` crate * Remove tests and test-helper module from justification code * Use `test-utils` in Substrate bridge pallet tests * Remove `sp-keyring` related code from `pallet-substrate-bridge` * Remove `helpers` module from `pallet-substrate-bridge` * Add some documentation * Add more documentation * Fix typo Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: Tomasz Drwięga <[email protected]>
This issue has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/rfc-should-we-launch-a-thousand-cores-program/7604/4 |
Existing
relayVrfModuloSamples
don't make too much senseCurrent approval related values on Polkadot:
relayVrfModuloSamples should be way less. With 200 valdiators and 40 parachains it should be around 6.
Existing parameters don't make too much sense
What is a good number for
relayVrfModuloSamples
depends on the number of validators and parachains. This parameter would need to be adjusted on any change in those numbers. It would be better to makerelayVrfModuloSamples
a function of those parameters and a different paramer to fine tune this relationship.Further tuning
For our threat model it should be sufficient to have around 30 approvals in expectation. Therefore it might be sensible to reduce the number of
neededApprovals
a bit to avoid higher tranches kicking in too often to cover for variation. This might be helping in reducing load on approval voting. Other strategies like increasing the tick value should be done first though.Tasks
relayVrfModuloSamples
to something more sensible.maxValidators
or the number of cores we also adjustrelayVrfModuloSamples
accordingly.relayVrfModuloSamples
config with a tuning knob and derive the actual value based on that and the number of validators and parachains/cores.@Sophia-Gold
@burdges - expected variance would be interesting.
@sandreim
The text was updated successfully, but these errors were encountered: