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

Integrate BEEFY with Rialto & Millau runtimes #1227

Merged
merged 16 commits into from
Nov 30, 2021

Conversation

acatangiu
Copy link
Collaborator

@acatangiu acatangiu commented Nov 26, 2021

Fixes paritytech/grandpa-bridge-gadget#342

  • Added Beefy pallet to Rialto runtime
  • Added Beefy gadget to Rialto node
  • Added MMR pallet to Rialto runtime
  • Added Beefy pallet to Millau runtime
  • Added Beefy gadget to Millau node
  • Added MMR pallet to Millau runtime
  • Added pallet_beefy_mmr to Millau runtime
  • Added pallet_beefy_mmr to Rialto runtime
  • Implemented MMR and BEEFY APIs in Rialto

@acatangiu acatangiu self-assigned this Nov 26, 2021
Copy link
Contributor

@svyatonik svyatonik left a comment

Choose a reason for hiding this comment

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

Looks good to me (given couple of optional grumbles). But it'd be better if @adoerr could also check this :)

In addition (probably in follow-up PR) I also suggest to add tracing for BEEFY pallets and gadget to our test deployment nodes (here and here). Right now we don't even see if BEEFY is broken on our nodes + this may help us find some interesting long-running issues (given that we run errors-grep for nodes logs).

bin/millau/node/src/service.rs Show resolved Hide resolved
@@ -1143,7 +1228,7 @@ mod tests {

#[test]
fn call_size() {
const MAX_CALL_SIZE: usize = 230; // value from polkadot-runtime tests
const MAX_CALL_SIZE: usize = 232; // slightly bigger than polkadot-runtime tests
Copy link
Contributor

Choose a reason for hiding this comment

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

I know that BEEFY has not yet reached the Polkadot or Kusama runtimes => it is safe to ignore this limit here. Bt I suggest to add an issue to BEEFY tracker to box large call arguments and revert this change when it's done. Otherwise we'll need to have some justification of why 232 is better than 230 when BEEFY reach Polkadot/Kusama :)

Meanwhile could you, please, return 230 here and replace blanket check with checks specific to pallets that are/will be included there soon(ish):

		assert!(core::mem::size_of::<pallet_bridge_grandpa::Call<Runtime>>() <= MAX_CALL_SIZE);
		assert!(core::mem::size_of::<pallet_bridge_messages::Call<Runtime>>() <= MAX_CALL_SIZE);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@tomusdrw tomusdrw left a comment

Choose a reason for hiding this comment

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

Looks good! Left couple of things that would be good to address.

bin/millau/node/Cargo.toml Outdated Show resolved Hide resolved
bin/millau/node/src/chain_spec.rs Show resolved Hide resolved
bin/millau/runtime/src/lib.rs Outdated Show resolved Hide resolved
bin/rialto/node/Cargo.toml Outdated Show resolved Hide resolved
bin/rialto/node/src/service.rs Outdated Show resolved Hide resolved
bin/rialto/node/src/service.rs Outdated Show resolved Hide resolved
bin/rialto/runtime/src/lib.rs Outdated Show resolved Hide resolved
bin/millau/runtime/src/lib.rs Show resolved Hide resolved
bin/millau/node/src/service.rs Show resolved Hide resolved
bin/rialto/node/src/service.rs Show resolved Hide resolved
@tomusdrw tomusdrw enabled auto-merge (squash) November 30, 2021 15:38
Signed-off-by: acatangiu <adrian@parity.io>
@tomusdrw
Copy link
Contributor

@acatangiu seems that #1229 introduced some conflicts, would you mind updating to latest master?

@tomusdrw tomusdrw merged commit 816ddd2 into paritytech:master Nov 30, 2021
tomusdrw pushed a commit that referenced this pull request Dec 1, 2021
* 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
acatangiu added a commit that referenced this pull request Dec 23, 2021
* 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>
@acatangiu acatangiu deleted the beefy-rialto-millau branch March 25, 2022 09:13
svyatonik pushed a commit that referenced this pull request Jul 17, 2023
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.91 to 1.0.92.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](dtolnay/syn@1.0.91...1.0.92)

---
updated-dependencies:
- dependency-name: syn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
serban300 pushed a commit to serban300/parity-bridges-common that referenced this pull request Mar 27, 2024
* 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
serban300 pushed a commit to serban300/parity-bridges-common that referenced this pull request Apr 8, 2024
* 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
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.

Integrate BEEFY with Rialto & Millau runtimes
4 participants