Skip to content

Commit

Permalink
Polkadot staging update (#1270)
Browse files Browse the repository at this point in the history
* Add `AtLeast32BitUnsigned` for MessageLance::SourceChainBalance (#1207)

* Fix UI deployment. (#1211)

* Remove unused PoA<>Substrate bridge (#1210)

* Decouple the PoA bridge code from Rialto
* Remove Rialto PoA bridge code
* Remove relays/bin-ethereum code
* Remove relays/client-ethereum code
* Remove modules/ethereum code
* Remove modules/ethereum-contract-builtin code
* Remove PoA bridge documentation
* Remove primitives/ethereum-poa code
* Decouple Rialto from currency-exchange
* Fix building with runtime-benchmarks
* Fix should_encode_bridge_send_message_call test
    Because we removed some runtime modules/pallets, the
    substrate2substrate bridge pallet has a different index within
    the runtime so its calls have a different encoding.
    Update the test to use the new encoding.
* Update readme - no more PoA bridge
* Remove deployments/bridges/poa-rialto
    Also removes:
    - deployments/networks/eth-poa.yml
    - deployments/networks/OpenEthereum.Dockerfile
* Remove deployments/dev/poa-config
* Update deployments readme - no more PoA bridge
* Remove eth-related scripts
    Deletes:
    - deployments/networks/eth-poa.yml
    - scripts/run-openethereum-node.sh
* Remove poa-relay from gitlab-ci
* Dockerfiles to use substrate-relay as default
* Remove modules/currency-exchange code
* Remove primitives/currency-exchange code

Signed-off-by: acatangiu <adrian@parity.io>

* Remove unused `relays/headers` (#1216)

* Decouple `relays/client-substrate` from `headers_relay`
* Remove `blocks_in_state` from `SyncLoopMetrics`
    This metric was only relevant for PoA <> Substrate bridge.
* Move `sync_loop_metrics.rs` to `relays/finality`
* Remove unused `SyncLoopMetrics::update()`
* Hook up SyncLoopMetrics to finality_loop
* Delete now unused `relays/headers`

Signed-off-by: acatangiu <adrian@parity.io>

* remove abandoned exchange relay (#1217)

* Unify metric names (#1209)

* unify metric names

* refactor standalone metrics

* headers sync metrics

* post-merge fix

* fix compilation

* fmt

* fix dashboards

* fix local dashboards

* update Rococo/Wococo runtime version

* remove commented code

* fixed grumbles

* fmt

* fixed widget names

* Add CODEOWNERS file (#1219)

* fixed set_operational in GRANDPA pallet (#1226)

* Add mut support (#1232)

* update dependencies (#1229)

* Integrate BEEFY with Rialto & Millau runtimes (#1227)

* Add Beefy pallet to Rialto runtime

* Add Beefy gadget to Rialto node

* Add MMR pallet to Rialto runtime

* Add Beefy pallet to Millau runtime

* Add Beefy gadget to Millau node

* Add MMR pallet to Millau runtime

* Add pallet_beefy_mmr to Millau runtime

* Add pallet_beefy_mmr to Rialto runtime

* Implement MMR and BEEFY APIs in Rialto

* fix unit tests

- should_encode_bridge_send_message_call() tests for new
  runtime encoding resulted from newly added pallets.
- runtime size_of::<Call>() slightly increased from newly
  added pallets.

* fix grumbles

* tighten clippy allowances

* fix more grumbles

* Add MMR RPC to Rialto and Millau nodes

Also implement MmrApi in Millau runtime.

* rialto: use upstream polkadot_client::RuntimeApiCollection

* Fix storage parameter name computation (#1238)

* fixed storage_parameter_key

* added test for storage_parameter_key

* Enable Beefy debug logs in test deployment (#1237)

Signed-off-by: Adrian Catangiu <adrian@parity.io>

* Enable offchain indexing for Rialto/Millau nodes (#1239)

* Enable off-chain indexing for Rialto & Millau nodes

* cargo fmt --all

* cargo +nightly fmt --all

* fmt is weird.

* Update Rococo/Wococo version + prepare relay for Rococo<>Wococo bridge (#1241)

* update Rococo version + create relayers fund account

* start finality relay guards when complex relay is started

* Refactor finality relay helpers (#1220)

* refactor finality relay helper definitions

* add missing doc

* removed commented code

* fmt

* disable rustfmt for macro

* move best_finalized method const to relay chain def

* Expose prometheus BEEFY metrics and add them to grafana dashboard (#1242)

* deployments: expose node metrics

Signed-off-by: acatangiu <adrian@parity.io>

* deployments: add beefy grafana dashboard

Signed-off-by: acatangiu <adrian@parity.io>

* deployments: add beefy alarms

Signed-off-by: acatangiu <adrian@parity.io>

* Fix transactions mortality (#1196)

* added lost stall timeout fix

* use best_block.parent() to start mortal tx era

* fmt

* Revert "revert messages transactions mortality"

This reverts commit 7777635.

* post-merge build fix (#1243)

* Refactor message relay helpers (#1234)

* refactor message relay helpers

* single standalone_metrics function

* fixed tests

* clippy + fmt

* removed commented code

* add calls tracing

* fix spelling

* cargo fmt

* -commented code

* fix build again

* post-merge build fix

* clippy + fmt

* Use same endowed accounts set on dev/local chains (#1244)

* use same accounts set on dev/local chains

* run altruistic relayers in local demo scripts

* runtimes: fix call_size() test (#1245)

Signed-off-by: acatangiu <adrian@parity.io>

* Bump relay version to 1.0.0 (#1249)

* Add missing RPC APIs to rialto parachain node (#1250)

* add missing RPC APIs to rialto parachain node

* spellcheck

* decrease startup sleep to 5s for relays and to 120s for generators + remove curl (#1251)

* pin bridges-ci image (#1256)

* Change submit transaction spec_version and transaction_version query from chain (#1248)

* The `spec_version` and `transaction_version` query from chain

* fix compile

* Lint

* Custom spec_version and transaction_version

* runtime version params struct opt

* runtime version cli

* cli params

* Add missing types defined

* fix compile

* debug cli

* clippy

* clippy

* Query spec_version and transaction_version same times

* Fix vars

* Wrap option

* Wrap option

* Try fix ci

* Change follow suggestions

* remporary use pinned bridges-ci image in Dockerfile (#1258)

* move storage keys computation to primitivs (#1254)

* override conversion rate in estimate-message-fee RPC (#1189)

* read latest_generated_nonce directly from storage (#1260)

* bump rococo version (#1263)

Co-authored-by: fewensa <37804932+fewensa@users.noreply.github.com>
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Adrian Catangiu <31917973+acatangiu@users.noreply.github.com>
Co-authored-by: Sergejs Kostjucenko <85877331+sergejparity@users.noreply.github.com>
Co-authored-by: Antonio Dropulic <antonio@parity.io>
Co-authored-by: Adrian Catangiu <adrian@parity.io>
  • Loading branch information
7 people authored Dec 23, 2021
1 parent 1602249 commit f704a74
Show file tree
Hide file tree
Showing 118 changed files with 3,726 additions and 3,915 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ variables: &default-vars
GIT_DEPTH: 100
CARGO_INCREMENTAL: 0
ARCH: "x86_64"
CI_IMAGE: "paritytech/bridges-ci:staging"
CI_IMAGE: "paritytech/bridges-ci:e8a9ef25-20211215"
RUST_BACKTRACE: full

default:
Expand Down
21 changes: 17 additions & 4 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#
# See the `deployments/README.md` for all the available `PROJECT` values.

FROM paritytech/bridges-ci:latest as builder
FROM paritytech/bridges-ci:e8a9ef25-20211215 as builder
WORKDIR /parity-bridges-common

COPY . .
Expand Down
102 changes: 51 additions & 51 deletions bin/millau/node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,7 @@ impl Alternative {
testnet_genesis(
vec![get_authority_keys_from_seed("Alice")],
get_account_id_from_seed::<sr25519::Public>("Alice"),
vec![
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Alice"),
)),
],
endowed_accounts(),
true,
)
},
Expand All @@ -120,48 +112,7 @@ impl Alternative {
get_authority_keys_from_seed("Eve"),
],
get_account_id_from_seed::<sr25519::Public>("Alice"),
vec![
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_account_id_from_seed::<sr25519::Public>("Charlie"),
get_account_id_from_seed::<sr25519::Public>("Dave"),
get_account_id_from_seed::<sr25519::Public>("Eve"),
get_account_id_from_seed::<sr25519::Public>("Ferdie"),
get_account_id_from_seed::<sr25519::Public>("George"),
get_account_id_from_seed::<sr25519::Public>("Harry"),
get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),
get_account_id_from_seed::<sr25519::Public>("Dave//stash"),
get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
get_account_id_from_seed::<sr25519::Public>("George//stash"),
get_account_id_from_seed::<sr25519::Public>("Harry//stash"),
get_account_id_from_seed::<sr25519::Public>("RialtoMessagesOwner"),
get_account_id_from_seed::<sr25519::Public>("WithRialtoTokenSwap"),
pallet_bridge_messages::relayer_fund_account_id::<
bp_millau::AccountId,
bp_millau::AccountIdConverter,
>(),
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Alice"),
)),
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Bob"),
)),
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Charlie"),
)),
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Dave"),
)),
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Eve"),
)),
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Ferdie"),
)),
],
endowed_accounts(),
true,
)
},
Expand All @@ -175,6 +126,55 @@ impl Alternative {
}
}

/// We're using the same set of endowed accounts on all Millau chains (dev/local) to make
/// sure that all accounts, required for bridge to be functional (e.g. relayers fund account,
/// accounts used by relayers in our test deployments, accounts used for demonstration
/// purposes), are all available on these chains.
fn endowed_accounts() -> Vec<AccountId> {
vec![
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_account_id_from_seed::<sr25519::Public>("Charlie"),
get_account_id_from_seed::<sr25519::Public>("Dave"),
get_account_id_from_seed::<sr25519::Public>("Eve"),
get_account_id_from_seed::<sr25519::Public>("Ferdie"),
get_account_id_from_seed::<sr25519::Public>("George"),
get_account_id_from_seed::<sr25519::Public>("Harry"),
get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),
get_account_id_from_seed::<sr25519::Public>("Dave//stash"),
get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
get_account_id_from_seed::<sr25519::Public>("George//stash"),
get_account_id_from_seed::<sr25519::Public>("Harry//stash"),
get_account_id_from_seed::<sr25519::Public>("RialtoMessagesOwner"),
get_account_id_from_seed::<sr25519::Public>("WithRialtoTokenSwap"),
pallet_bridge_messages::relayer_fund_account_id::<
bp_millau::AccountId,
bp_millau::AccountIdConverter,
>(),
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Alice"),
)),
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Bob"),
)),
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Charlie"),
)),
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Dave"),
)),
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Eve"),
)),
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
get_account_id_from_seed::<sr25519::Public>("Ferdie"),
)),
]
}

fn session_keys(aura: AuraId, beefy: BeefyId, grandpa: GrandpaId) -> SessionKeys {
SessionKeys { aura, beefy, grandpa }
}
Expand Down
7 changes: 4 additions & 3 deletions bin/millau/node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ type FullClient =
type FullBackend = sc_service::TFullBackend<Block>;
type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>;

#[allow(clippy::type_complexity)]
pub fn new_partial(
config: &Configuration,
) -> Result<
Expand All @@ -89,7 +90,7 @@ pub fn new_partial(
ServiceError,
> {
if config.keystore_remote.is_some() {
return Err(ServiceError::Other(format!("Remote Keystores are not supported.")))
return Err(ServiceError::Other("Remote Keystores are not supported.".into()))
}

let telemetry = config
Expand All @@ -111,7 +112,7 @@ pub fn new_partial(

let (client, backend, keystore_container, task_manager) =
sc_service::new_full_parts::<Block, RuntimeApi, _>(
&config,
config,
telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),
executor,
)?;
Expand Down Expand Up @@ -178,7 +179,7 @@ pub fn new_partial(
})
}

fn remote_keystore(_url: &String) -> Result<Arc<LocalKeystore>, &'static str> {
fn remote_keystore(_url: &str) -> Result<Arc<LocalKeystore>, &'static str> {
// FIXME: here would the concrete keystore be built,
// must return a concrete type (NOT `LocalKeystore`) that
// implements `CryptoStore` and `SyncCryptoStore`
Expand Down
Loading

0 comments on commit f704a74

Please sign in to comment.