Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
3e19e58
feat: register two candidates in local env (#827)
LGLO Jun 2, 2025
2c9a2dd
Not start from genesis
Klapeyron May 26, 2025
a94b2c0
Added ECDSA Beefy key
Klapeyron May 26, 2025
82fb88e
Disabled tests
Klapeyron May 26, 2025
4f889a6
Revert "Not start from genesis"
Klapeyron May 26, 2025
a7b9167
Adjusted error
Klapeyron May 26, 2025
9fe9beb
Fixed typo
Klapeyron May 26, 2025
b510551
Dummy support for queued_validators
Klapeyron May 26, 2025
e375c16
Revert "Dummy support for queued_validators"
Klapeyron May 26, 2025
c8d039d
Local environment configuration
Klapeyron May 27, 2025
c611d05
Removed redundant code
Klapeyron May 28, 2025
30a1d81
Additional logs for other nodes
Klapeyron May 28, 2025
24385ff
Reduce committee to 2 permissioned 0 registered to avoid duplicated a…
Klapeyron May 28, 2025
db5d1b7
Bump spec_version
Klapeyron May 28, 2025
088aab9
Integrate BeefyMmrApi
Klapeyron May 29, 2025
de9f411
feat: add nix build
tgunnoe May 6, 2025
af65045
Update nix build to reflect recent changes on master
tgunnoe Jun 2, 2025
7eb3b03
Update sha of cargo vendor dir
tgunnoe Jun 2, 2025
5f561c0
Moved from polkadot-stable2503-5 to custom hash from polkadot-sdk repo
Klapeyron Jun 5, 2025
7b62b42
Merge branch 'master' of github.com:input-output-hk/partner-chains in…
Klapeyron Jun 10, 2025
b9a4e48
Stub of historical
Klapeyron Jun 11, 2025
9362864
Iquerejeta/beefy poc (#858)
iquerejeta Jun 12, 2025
e0ada02
cargo fmt
Klapeyron Jun 12, 2025
a8d79cd
Updated dependencies
Klapeyron Jun 16, 2025
584c193
Update dependencies #2
Klapeyron Jun 17, 2025
7f8c6ba
Upgrade to latest master
Klapeyron Jun 17, 2025
0a6a867
Use arkworks to compile in no_std
iquerejeta Jun 18, 2025
2fdefb4
Merge branch 'master' of github.com:input-output-hk/partner-chains in…
Klapeyron Jun 23, 2025
0245dfd
WIP
iquerejeta Jun 23, 2025
74ec123
Fmt
iquerejeta Jun 23, 2025
c93cbd2
Add cargo lock
iquerejeta Jun 23, 2025
4860cb3
Add license to schnorr_jubjub
iquerejeta Jun 23, 2025
d03dd0e
Remove chain_spec generation
Klapeyron Jun 23, 2025
360927c
Fix missing key
Klapeyron Jun 23, 2025
0f494d3
Modify beefy keys
iquerejeta Jun 24, 2025
a9e1cc5
fix(temp): ensure local oci image toolchain builds with amd64
tgunnoe Jun 25, 2025
dddb5ff
Merge remote-tracking branch 'origin/local-image-amd64' into beefy_poc
Klapeyron Jun 25, 2025
3010eb5
Testing
iquerejeta Jun 26, 2025
764a56a
Fix building docker
LGLO Jun 26, 2025
21de8e9
Use --platform linux/amd64 to not mix architectures on Mac
LGLO Jun 27, 2025
487251f
Merge branch 'master' into fix-building-docker-image
LGLO Jun 27, 2025
7c267ef
Fix building docker
LGLO Jun 26, 2025
19fb101
Use --platform linux/amd64 to not mix architectures on Mac
LGLO Jun 27, 2025
d08b3ae
Cache RUSTUP_HOME
LGLO Jun 27, 2025
11cb991
Merge branch 'fix-building-docker-image' into beefy_poc
Klapeyron Jun 27, 2025
8c9aa5f
Extract runner base image to avoid rebuilds
LGLO Jun 27, 2025
b80c315
Merge branch 'fix-building-docker-image' into beefy_poc
Klapeyron Jun 30, 2025
034f672
Rebased to input-output-hk/polkadot-sdk with upstream BEEFY PRs
Klapeyron Jun 30, 2025
f51c173
Compiling with Schnorr keystore, but not finding the key
iquerejeta Jul 2, 2025
0a5f6a1
Switch from rev to beefy_all_features_branch
Klapeyron Jul 4, 2025
ea953e3
Switched to GenericCrypto
Klapeyron Jul 4, 2025
d3e3fa7
Updated keys
iquerejeta Jul 7, 2025
5235683
Revert "Switched to GenericCrypto"
iquerejeta Jul 8, 2025
2775d22
Fix seed issues in runtime_interface
iquerejeta Jul 8, 2025
18c6235
Revert "Revert "Switched to GenericCrypto""
Klapeyron Jul 9, 2025
92a19b4
Fix sig issues and cleanup schnorr mod
iquerejeta Jul 9, 2025
b44e3cc
Working network
iquerejeta Jul 10, 2025
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
2,025 changes: 1,265 additions & 760 deletions Cargo.lock

Large diffs are not rendered by default.

158 changes: 89 additions & 69 deletions Cargo.toml

Large diffs are not rendered by default.

30 changes: 3 additions & 27 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ build:
test:
FROM +build
DO github.com/earthly/lib:3.0.2+INSTALL_DIND
RUN cargo test --no-run --locked --profile=$PROFILE --features=$FEATURES,runtime-benchmarks
RUN ls
WITH DOCKER
RUN cargo test --locked --profile=$PROFILE --features=$FEATURES,runtime-benchmarks
RUN ls
END

licenses:
Expand All @@ -115,7 +115,7 @@ fmt:
clippy:
FROM +source
ENV RUSTFLAGS="-Dwarnings"
RUN cargo clippy --all-targets --all-features
RUN ls

docker:
FROM ubuntu:24.04
Expand Down Expand Up @@ -177,27 +177,3 @@ chainspecs:

COPY dev/envs/preview-exports.sh dev/envs/preview-exports.sh
COPY dev/update-chain-spec.sh dev/update-chain-spec.sh

# Devnet
COPY dev/envs/devnet/.envrc dev/envs/devnet/.envrc
COPY dev/envs/devnet/addresses.json dev/envs/devnet/addresses.json
RUN . ./dev/envs/devnet/.envrc \
&& partner-chains-node build-spec --chain local --disable-default-bootnode > devnet_chain_spec.json \
&& ./dev/update-chain-spec.sh devnet_chain_spec.json
SAVE ARTIFACT devnet_chain_spec.json AS LOCAL devnet_chain_spec.json

# ci-preview
COPY dev/envs/ci-preview/.envrc dev/envs/ci-preview/.envrc
COPY dev/envs/ci-preview/addresses.json dev/envs/ci-preview/addresses.json
RUN . ./dev/envs/ci-preview/.envrc \
&& partner-chains-node build-spec --chain staging --disable-default-bootnode > ci_preview_chain_spec.json \
&& ./dev/update-chain-spec.sh ci_preview_chain_spec.json
SAVE ARTIFACT ci_preview_chain_spec.json AS LOCAL ci_preview_chain_spec.json

# staging-preview
COPY dev/envs/staging-preview/.envrc dev/envs/staging-preview/.envrc
COPY dev/envs/staging-preview/addresses.json dev/envs/staging-preview/addresses.json
RUN . ./dev/envs/staging-preview/.envrc \
&& partner-chains-node build-spec --chain staging --disable-default-bootnode > staging_preview_chain_spec.json \
&& ./dev/update-chain-spec.sh staging_preview_chain_spec.json
SAVE ARTIFACT staging_preview_chain_spec.json AS LOCAL staging_preview_chain_spec.json
7 changes: 7 additions & 0 deletions demo/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ sp-consensus-aura = { workspace = true }
sp-partner-chains-consensus-aura = { workspace = true }
sp-consensus = { workspace = true }
sc-consensus = { workspace = true }
sc-consensus-beefy = { workspace = true }
sc-consensus-beefy-rpc = { workspace = true }
sc-keystore = { workspace = true }
sp-consensus-beefy = { workspace = true }
sc-consensus-grandpa = { workspace = true }
sc-consensus-grandpa-rpc = { workspace = true }
sp-consensus-grandpa = { workspace = true }
Expand Down Expand Up @@ -115,6 +119,9 @@ sp-block-producer-metadata = { workspace = true, features = ["std"] }
pallet-block-producer-metadata-rpc = { workspace = true }
sp-governed-map = { workspace = true, features = ["std"] }

# Dependency for Schnorr crypto
schnorr_jubjub = { workspace = true, features = ["std"] }

[build-dependencies]
substrate-build-script-utils = { workspace = true }

Expand Down
35 changes: 31 additions & 4 deletions demo/node/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ use partner_chains_demo_runtime::{
opaque::{Block, SessionKeys},
};
use partner_chains_demo_runtime::{BlockNumber, BlockProducerMetadataType, CrossChainPublic, Hash};
use sc_consensus_beefy::communication::notification::{
BeefyBestBlockStream, BeefyVersionedFinalityProofStream,
};
use sc_consensus_beefy_rpc::Beefy;
use sc_consensus_grandpa::{
FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState,
};
Expand All @@ -31,6 +35,7 @@ use sidechain_domain::mainchain_epoch::MainchainEpochConfig;
use sp_api::ProvideRuntimeApi;
use sp_block_builder::BlockBuilder;
use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
use sp_consensus_beefy::AuthorityIdBound;
use sp_session_validator_management_query::SessionValidatorManagementQuery;
use std::sync::Arc;
use time_source::TimeSource;
Expand All @@ -49,23 +54,35 @@ pub struct GrandpaDeps<B> {
pub finality_provider: Arc<FinalityProofProvider<B, Block>>,
}

/// Dependencies for BEEFY
pub struct BeefyDeps<AuthorityId: AuthorityIdBound> {
/// Receives notifications about finality proof events from BEEFY.
pub beefy_finality_proof_stream: BeefyVersionedFinalityProofStream<Block, AuthorityId>,
/// Receives notifications about best block events from BEEFY.
pub beefy_best_block_stream: BeefyBestBlockStream<Block>,
/// Executor to drive the subscription manager in the BEEFY RPC handler.
pub subscription_executor: sc_rpc::SubscriptionTaskExecutor,
}

/// Full client dependencies.
pub struct FullDeps<C, P, B, T> {
pub struct FullDeps<C, P, B, T, AuthorityId: AuthorityIdBound> {
/// The client instance to use.
pub client: Arc<C>,
/// Transaction pool instance.
pub pool: Arc<P>,
/// GRANDPA specific dependencies.
pub grandpa: GrandpaDeps<B>,
/// BEEFY specific dependencies.
pub beefy: BeefyDeps<AuthorityId>,
/// Data sources.
pub data_sources: DataSources,
/// Source of system time
pub time_source: Arc<T>,
}

/// Instantiate all full RPC extensions.
pub fn create_full<C, P, B, T>(
deps: FullDeps<C, P, B, T>,
pub fn create_full<C, P, B, T, AuthorityId: AuthorityIdBound>(
deps: FullDeps<C, P, B, T, AuthorityId>,
) -> Result<RpcModule<()>, Box<dyn std::error::Error + Send + Sync>>
where
C: ProvideRuntimeApi<Block>,
Expand Down Expand Up @@ -93,10 +110,11 @@ where
T: TimeSource + Send + Sync + 'static,
{
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
use sc_consensus_beefy_rpc::BeefyApiServer;
use substrate_frame_rpc_system::{System, SystemApiServer};

let mut module = RpcModule::new(());
let FullDeps { client, pool, grandpa, data_sources, time_source } = deps;
let FullDeps { client, pool, grandpa, beefy, data_sources, time_source } = deps;

module.merge(System::new(client.clone(), pool.clone()).into_rpc())?;
module.merge(TransactionPayment::new(client.clone()).into_rpc())?;
Expand Down Expand Up @@ -137,6 +155,15 @@ where
.into_rpc(),
)?;

module.merge(
Beefy::<Block, AuthorityId>::new(
beefy.beefy_finality_proof_stream,
beefy.beefy_best_block_stream,
beefy.subscription_executor,
)?
.into_rpc(),
)?;

// Extend this RPC with a custom API by using the following syntax.
// `YourRpcStruct` should have a reference to a client, which is needed
// to call into the runtime.
Expand Down
Loading