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

Approve multiple candidates with a single signature #1191

Merged
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
7230df4
merge from archived repo
sandreim Aug 25, 2023
d04c182
cargo lock
sandreim Aug 25, 2023
f4f0e70
Merge remote-tracking branch 'origin' into sandreim/the_v2_assignments
sandreim Aug 25, 2023
341c7af
Approve multiple candidates with a single signature
alexggh Aug 25, 2023
619fff2
Fix build warnings
alexggh Aug 27, 2023
5f1558d
Merge remote-tracking branch 'origin/master' into feature/approve_mul…
alexggh Aug 27, 2023
ed1d9d0
ci: fix worker binaries could not be found
alexggh Aug 28, 2023
7d7b82c
Add missing bits
alexggh Aug 28, 2023
7bc13d3
Build with network-protocol-staging
alexggh Aug 28, 2023
53f8556
Validate disconnect theory
alexggh Aug 28, 2023
442b1e4
Merge branch 'master' of github.com:paritytech/polkadot-sdk into sand…
sandreim Aug 28, 2023
5e004e1
Log errors when banning peers
alexggh Aug 28, 2023
9850b2f
fix zombienet test
sandreim Aug 28, 2023
f71eb31
Merge branch 'master' of github.com:paritytech/polkadot-sdk into sand…
sandreim Aug 29, 2023
46cfaf1
cargo lock
sandreim Aug 29, 2023
0086502
Merge branch 'master' of github.com:paritytech/polkadot-sdk into sand…
sandreim Aug 30, 2023
47beabd
superfluous
sandreim Aug 30, 2023
ee88408
Merge branch 'master' into sandreim/the_v2_assignments
sandreim Aug 31, 2023
3d3e37c
Separate approval
alexggh Aug 30, 2023
da61d98
Revert "Log errors when banning peers"
alexggh Sep 1, 2023
9c0375c
Merge remote-tracking branch 'origin/sandreim/the_v2_assignments' int…
alexggh Sep 1, 2023
f3fee24
Cleanup post migrating hacks when migrating from polkadot repo
alexggh Sep 1, 2023
6338d33
Fixup clippy
alexggh Sep 1, 2023
d4fb01a
Merge remote-tracking branch 'origin/master' into feature/approve_mul…
alexggh Sep 25, 2023
5832ad7
Merge remote-tracking branch 'origin/master' into sandreim/the_v2_ass…
alexggh Sep 26, 2023
989bbcc
Merge branch 'sandreim/the_v2_assignments' into feature/approve_multi…
alexggh Sep 26, 2023
7fdae09
Add host configuration v10 with approval_voting params
alexggh Sep 26, 2023
e70b113
Fixup failure of lint-markdown
alexggh Sep 26, 2023
85939bb
Fixup test-rustdoc job
alexggh Sep 26, 2023
a6df360
Merge branch 'sandreim/the_v2_assignments' into feature/approve_multi…
alexggh Sep 26, 2023
d42f373
Cosmetic fixes
alexggh Sep 27, 2023
6dd5173
pipeline/zombinet: fix 0006 test name
alexggh Sep 27, 2023
b54ee85
Merge branch 'sandreim/the_v2_assignments' into feature/approve_multi…
alexggh Sep 27, 2023
0bdc06e
fixup cargo fmt nightly
alexggh Sep 27, 2023
218748d
fixup clippy
alexggh Sep 27, 2023
0335cf1
Fixup markdownlint
alexggh Sep 28, 2023
0f0faf0
Fixup runtime-migration-westend
alexggh Sep 28, 2023
6eabb63
approval-voting: address round 1 of feedback
alexggh Sep 28, 2023
9dc4a93
approval-distribution: cosmetic improvements
alexggh Sep 28, 2023
566d7f5
Comment vstaging
alexggh Sep 29, 2023
460bab2
Revert "Comment vstaging"
alexggh Sep 29, 2023
85acb51
Add v3 protocol
alexggh Sep 29, 2023
6a1fb87
Merge remote-tracking branch 'origin/master' into sandreim/the_v2_ass…
alexggh Sep 29, 2023
56055c1
Fixup
alexggh Sep 30, 2023
477a4bb
Merge remote-tracking branch 'origin/master' into sandreim/the_v2_ass…
alexggh Oct 10, 2023
595000d
Merge remote-tracking branch 'origin/master' into sandreim/the_v2_ass…
alexggh Oct 10, 2023
5579719
Fix cargo fmt
alexggh Oct 11, 2023
03d92ce
Merge remote-tracking branch 'origin/master' into sandreim/the_v2_ass…
alexggh Oct 11, 2023
f68baea
Merge remote-tracking branch 'origin/sandreim/the_v2_assignments' int…
alexggh Oct 16, 2023
ee3b702
approval-distribution: fix unittests
alexggh Oct 16, 2023
0d2fbba
Approval voting fixup
alexggh Oct 16, 2023
e672c1d
Fixup runtime api post merge
alexggh Oct 16, 2023
b053f92
Merge remote-tracking branch 'origin/master' into sandreim/the_v2_ass…
alexggh Oct 17, 2023
cff7a3a
Merge remote-tracking branch 'origin/sandreim/the_v2_assignments' int…
alexggh Oct 17, 2023
deccd98
Fixup clippy
alexggh Oct 17, 2023
4d0e67e
Merge remote-tracking branch 'origin/sandreim/the_v2_assignments' int…
alexggh Oct 17, 2023
807308e
Merge remote-tracking branch 'origin/master' into sandreim/the_v2_ass…
alexggh Oct 17, 2023
cccf581
Merge remote-tracking branch 'origin/sandreim/the_v2_assignments' int…
alexggh Oct 17, 2023
cc5a8fe
Minor cleanups
alexggh Oct 17, 2023
e24d889
Add metric to see average delayed tick
alexggh Oct 17, 2023
eebde47
Fixup CI
alexggh Oct 17, 2023
f400d5a
ApprovalVotingParams sane default
alexggh Oct 17, 2023
0a952c0
Add zombienet to check approval coalescing
alexggh Oct 18, 2023
183ba64
Fix review typo
alexggh Oct 19, 2023
3fe8c0d
Remove file accidentally added which was removed from master
alexggh Oct 19, 2023
fc28618
Remove the need for CollationVersion::VStaging
alexggh Oct 19, 2023
056713b
Merge remote-tracking branch 'origin/master' into sandreim/the_v2_ass…
alexggh Oct 19, 2023
a8d234c
Addressed review comments
alexggh Oct 19, 2023
d728cf2
Make clippy happy
alexggh Oct 19, 2023
05ea75d
Build a test image with `network-protocol-staging`
alexggh Oct 19, 2023
261285f
Enable assignments
alexggh Oct 20, 2023
db9c3a9
Revert "Enable assignments v2 used for testing"
alexggh Oct 20, 2023
3893f16
Merge remote-tracking branch 'origin/master' into sandreim/the_v2_ass…
alexggh Oct 25, 2023
15eaa0a
Cleanup un-needed dependency to test-helpers
alexggh Oct 26, 2023
a7d6a6e
Merge remote-tracking branch 'origin/sandreim/the_v2_assignments' int…
alexggh Oct 26, 2023
be9dddd
Address review findings
alexggh Oct 26, 2023
2385fad
Address review findings
alexggh Oct 26, 2023
a2c0320
Add new approval_db version
alexggh Oct 27, 2023
c8eff61
Modify the way we are doing the sampling
alexggh Oct 31, 2023
64f2195
Fixup check_rejects_delay_bad_vrf
alexggh Oct 31, 2023
04798fa
Address some trivial review feedback
alexggh Oct 31, 2023
440c38b
Use VersionedMigration
alexggh Oct 31, 2023
569ebb7
Do not accept ValidDisputeStatementKind::ApprovalCheckingMultipleCand…
alexggh Oct 31, 2023
ac2271b
Make approval_voting_params session buferred
alexggh Nov 1, 2023
059ce03
Merge remote-tracking branch 'origin/master' into sandreim/the_v2_ass…
alexggh Nov 1, 2023
35cbc0e
Make clippy happy
alexggh Nov 1, 2023
a097f70
Merge remote-tracking branch 'origin/sandreim/the_v2_assignments' int…
alexggh Nov 1, 2023
3af9517
Address review feedback in relay_vrf_modulo_cores
alexggh Nov 3, 2023
1b84bb0
Address more review feedback
alexggh Nov 3, 2023
7a1c88c
Add few more tests
alexggh Nov 3, 2023
ec71215
Fix unittest
alexggh Nov 5, 2023
552e6fa
Add pr_doc
alexggh Nov 5, 2023
2625def
Build a test image with `network-protocol-staging`
alexggh Oct 19, 2023
43f5529
Build a test image with assignments enabled
alexggh Oct 20, 2023
590b59e
Cleanup un-needed structures
alexggh Nov 5, 2023
bd76cf6
Revert test configurations
alexggh Nov 5, 2023
20cb37a
Fix upgrade to latest zombienet version
alexggh Nov 6, 2023
311b573
Set correct log level
alexggh Nov 6, 2023
418b69c
Merge remote-tracking branch 'origin/sandreim/the_v2_assignments' int…
alexggh Nov 6, 2023
46f7f4d
Make zombient behave with latest cli
alexggh Nov 6, 2023
a2e6024
Fix ocasional no-shows in zombienets
alexggh Nov 6, 2023
1955b71
Merge remote-tracking branch 'origin/master' into feature/approve_mul…
alexggh Nov 7, 2023
cd81d38
Fixup comment
alexggh Nov 7, 2023
624bb5f
Fix genesis error in zombienet
alexggh Nov 7, 2023
b0faa09
Minor fixes
alexggh Nov 8, 2023
ee6b467
Merge remote-tracking branch 'origin/master' into feature/approve_mul…
alexggh Nov 22, 2023
1bda031
Merge remote-tracking branch 'origin/master' into feature/approve_mul…
alexggh Dec 5, 2023
c2a4d65
Merge remote-tracking branch 'origin/master' into feature/approve_mul…
alexggh Dec 7, 2023
5e78127
Revert a2e602444662bd0e2443219b438d609da62a995d
alexggh Dec 7, 2023
992e766
Address review feedback
alexggh Dec 7, 2023
1913b63
protocol: rename vstaging into v3
alexggh Dec 7, 2023
871e9cf
Remove network-protocol-staging
alexggh Dec 7, 2023
ec0a988
Merge remote-tracking branch 'origin/master' into feature/approve_mul…
alexggh Dec 8, 2023
a364b64
Rename zombienet
alexggh Dec 8, 2023
de7b5c0
Add migration v11 HostConfiguration, missed during rebasing
alexggh Dec 8, 2023
5cf522a
Fix network_protocol_versioning_subsystem_msg
alexggh Dec 8, 2023
83a7325
Fix GetApprovalSignatures
alexggh Dec 11, 2023
6af2910
Merge remote-tracking branch 'origin/master' into feature/approve_mul…
alexggh Dec 11, 2023
4d33c9d
Fix formatting issues
alexggh Dec 11, 2023
30950d2
Fixup cargo fmt
alexggh Dec 11, 2023
593b82a
Fix some logging messed during rebase
alexggh Dec 11, 2023
f8f03e5
Add prdoc
alexggh Dec 11, 2023
8099c16
Fixup 0002-upgrade-node failures
alexggh Dec 12, 2023
44f0210
Merge branch 'master' into alexaggh/feature/approve_multiple_candidat…
alexggh Dec 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .gitlab/pipeline/zombienet/polkadot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,22 @@ zombienet-polkadot-functional-0005-parachains-disputes-past-session:
--local-dir="${LOCAL_DIR}/functional"
--test="0005-parachains-disputes-past-session.zndsl"

zombienet-polkadot-functional-0006-parachains-max-tranche0:
extends:
- .zombienet-polkadot-common
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}/functional"
--test="0006-parachains-max-tranche0.zndsl"

zombienet-polkadot-functional-0007-approval-voting-coalescing:
extends:
- .zombienet-polkadot-common
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
--local-dir="${LOCAL_DIR}/functional"
--test="0007-approval-voting-coalescing.zndsl"

zombienet-polkadot-smoke-0001-parachains-smoke-test:
extends:
- .zombienet-polkadot-common
Expand Down
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use polkadot_overseer::RuntimeApiSubsystemClient;
use polkadot_primitives::{
async_backing::{AsyncBackingParams, BackingState},
slashing,
vstaging::ApprovalVotingParams,
};
use sc_authority_discovery::{AuthorityDiscovery, Error as AuthorityDiscoveryError};
use sp_api::{ApiError, RuntimeApiInfo};
Expand Down Expand Up @@ -364,6 +365,11 @@ impl RuntimeApiSubsystemClient for BlockChainRpcClient {
) -> Result<Option<BackingState>, ApiError> {
Ok(self.rpc_client.parachain_host_para_backing_state(at, para_id).await?)
}

/// Approval voting configuration parameters
async fn approval_voting_params(&self, at: Hash) -> Result<ApprovalVotingParams, ApiError> {
Ok(self.rpc_client.parachain_host_staging_approval_voting_params(at).await?)
}
}

#[async_trait::async_trait]
Expand Down
16 changes: 15 additions & 1 deletion cumulus/client/relay-chain-rpc-interface/src/rpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ use parity_scale_codec::{Decode, Encode};
use cumulus_primitives_core::{
relay_chain::{
async_backing::{AsyncBackingParams, BackingState},
slashing, BlockNumber, CandidateCommitments, CandidateEvent, CandidateHash,
slashing,
vstaging::ApprovalVotingParams,
BlockNumber, CandidateCommitments, CandidateEvent, CandidateHash,
CommittedCandidateReceipt, CoreState, DisputeState, ExecutorParams, GroupRotationInfo,
Hash as RelayHash, Header as RelayHeader, InboundHrmpMessage, OccupiedCoreAssumption,
PvfCheckStatement, ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode,
Expand Down Expand Up @@ -615,6 +617,18 @@ impl RelayChainRpcClient {
}

#[allow(missing_docs)]
pub async fn parachain_host_staging_approval_voting_params(
&self,
at: RelayHash,
) -> Result<ApprovalVotingParams, RelayChainError> {
self.call_remote_runtime_function(
"ParachainHost_staging_approval_voting_params",
at,
None::<()>,
)
.await
}

pub async fn parachain_host_para_backing_state(
&self,
at: RelayHash,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub use pallet_xcm;
pub use xcm::prelude::{AccountId32, WeightLimit};

decl_test_relay_chains! {
#[api_version(8)]
#[api_version(9)]
pub struct Westend {
genesis = westend::genesis(),
on_init = (),
Expand All @@ -59,7 +59,7 @@ decl_test_relay_chains! {
AssetRate: westend_runtime::AssetRate,
}
},
#[api_version(8)]
#[api_version(9)]
pub struct Rococo {
genesis = rococo::genesis(),
on_init = (),
Expand All @@ -74,7 +74,7 @@ decl_test_relay_chains! {
Balances: rococo_runtime::Balances,
}
},
#[api_version(8)]
#[api_version(9)]
pub struct Wococo {
genesis = rococo::genesis(),
on_init = (),
Expand Down
2 changes: 2 additions & 0 deletions polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ jemalloc-allocator = [
"polkadot-node-core-pvf/jemalloc-allocator",
"polkadot-overseer/jemalloc-allocator",
]
network-protocol-staging = [ "polkadot-cli/network-protocol-staging" ]


# Enables timeout-based tests supposed to be run only in CI environment as they may be flaky
# when run locally depending on system load
Expand Down
2 changes: 2 additions & 0 deletions polkadot/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,5 @@ runtime-metrics = [
"polkadot-node-metrics/runtime-metrics",
"service/runtime-metrics",
]

network-protocol-staging = [ "service/network-protocol-staging" ]
6 changes: 6 additions & 0 deletions polkadot/node/core/approval-voting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ schnorrkel = "0.9.1"
kvdb = "0.13.0"
derive_more = "0.99.17"
thiserror = "1.0.48"
itertools = "0.10.5"

polkadot-node-subsystem = { path = "../../subsystem" }
polkadot-node-subsystem-util = { path = "../../subsystem-util" }
Expand All @@ -30,6 +31,9 @@ sp-consensus = { path = "../../../../substrate/primitives/consensus/common", def
sp-consensus-slots = { path = "../../../../substrate/primitives/consensus/slots", default-features = false }
sp-application-crypto = { path = "../../../../substrate/primitives/application-crypto", default-features = false, features = ["full_crypto"] }
sp-runtime = { path = "../../../../substrate/primitives/runtime", default-features = false }
# Needed for migration test helpers
test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../../primitives/test-helpers" }
rand_core = "0.5.1"

[dev-dependencies]
async-trait = "0.1.57"
Expand All @@ -43,3 +47,5 @@ polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" }
assert_matches = "1.4.0"
kvdb-memorydb = "0.13.0"
test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../../primitives/test-helpers" }
log = "0.4.17"
env_logger = "0.9.0"
Loading
Loading