Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
3d7d222
Initial network interface preparations
skunert Dec 21, 2021
b23547c
Implement get_storage_by_key
skunert Jan 4, 2022
cfaa211
Implement `validators` and `session_index_for_child`
skunert Jan 6, 2022
af362b4
Implement persisted_validation_data and candidate_pending_availability
skunert Jan 7, 2022
a8d80d5
Fix method name for persisted_validation_data and add encoded params
skunert Jan 7, 2022
482ecd4
Implement `retrieve_dmq_contents` and `retrieve_all_inbound_hrmp_chan…
skunert Jan 10, 2022
c03ba54
Implement `prove_read`
skunert Jan 10, 2022
b4ca285
Introduce separate RPC client, expose JsonRpSee errors
skunert Jan 10, 2022
f0d6c18
Simplify closure in call_remote_runtime_function
skunert Jan 10, 2022
d4dada5
Implement import stream, upgrade JsonRpSee
skunert Jan 12, 2022
dc5de78
Implement finality stream
skunert Jan 12, 2022
2675a7d
Remove unused method from interface
skunert Jan 12, 2022
f9a228d
Implement `is_major_syncing`
skunert Jan 12, 2022
7a89c73
Implement `wait_on_block`
skunert Jan 13, 2022
b92f204
Merge branch 'master' into network-interface-master
skunert Jan 13, 2022
532ba1d
Fix tests
skunert Jan 13, 2022
d49e25b
Unify error handling `ApiError`
skunert Jan 13, 2022
051068f
Replace WaitError with RelayChainError
skunert Jan 13, 2022
4b664a7
Wrap BlockChainError in RelayChainError
skunert Jan 13, 2022
40432e8
Unify error handling in relay chain intefaces
skunert Jan 17, 2022
5e03777
Fix return type of proof method
skunert Jan 17, 2022
d916d69
Improve error handling of new methods
skunert Jan 17, 2022
ee60f31
Improve error handling and move logging outside of interface
skunert Jan 18, 2022
0a1dd44
Clean up
skunert Jan 18, 2022
68fa074
Remove unwanted changes, clean up
skunert Jan 18, 2022
2764ea2
Remove unused import
skunert Jan 18, 2022
3be8d65
Add format for StatemachineError and remove nused From trait
skunert Jan 19, 2022
4c9b8ea
Use 'thiserror' crate to simplify error handling
skunert Jan 24, 2022
f2caf4b
Expose error for overseer, further simplify error handling
skunert Jan 24, 2022
7c95a65
Merge branch 'master' into relay-chain-interface-error-handling
skunert Jan 24, 2022
af4c50c
Reintroduce network interface
skunert Jan 19, 2022
f0212f9
Implement cli option
skunert Jan 20, 2022
c4fd3ae
Adjust call_state method to use hashes
skunert Jan 24, 2022
3a5e69b
Merge branch 'master' into skunert-network-interface
skunert Jan 28, 2022
2bf24bb
Disable PoV recovery when RPC is used
skunert Jan 28, 2022
3a4766b
Add integration test for network full node
skunert Feb 1, 2022
156f453
Use Hash instead of BlockId to ensure compatibility with RPC interface
skunert Feb 1, 2022
b2f5163
Fix cargo check warnings
skunert Feb 1, 2022
bf9293e
Implement retries
skunert Feb 3, 2022
cc8862f
Remove `expect` statements from code
skunert Feb 3, 2022
99535a0
Update jsonrpsee to 0.8.0 and make collator keys optional
skunert Feb 4, 2022
fcbd51e
Make cli arguments conflicting
skunert Feb 4, 2022
31e2ebf
Remove unused `block_status` method
skunert Feb 4, 2022
277a584
Add clippy fixes
skunert Feb 4, 2022
7af8820
Merge branch 'master' into skunert-network-interface
skunert Feb 7, 2022
8bd395d
Cargo fmt
skunert Feb 7, 2022
389777f
Validate relay chain rpc url
skunert Feb 7, 2022
53324c5
Clean up dependencies and add one more integration test
skunert Feb 7, 2022
470ce99
Clean up
skunert Feb 7, 2022
e39bc18
Clean up dependencies of relay-chain-network
skunert Feb 7, 2022
8bd74d5
Use hash instead of blockid for rpc methods
skunert Feb 7, 2022
a968c70
Fix tests
skunert Feb 7, 2022
332013b
Update client/cli/src/lib.rs
skunert Feb 8, 2022
f61cd81
Improve error message of cli validation
skunert Feb 8, 2022
ce0bd74
Add rpc client constructor
skunert Feb 8, 2022
2140165
Do not use debug formatting for errors
skunert Feb 9, 2022
2862b22
Merge branch 'master' into skunert-network-interface
skunert Feb 9, 2022
6c88d44
Improve logging for remote runtime methods
skunert Feb 17, 2022
1dc0e01
Merge branch 'master' into skunert-network-interface
skunert Feb 17, 2022
874dfb7
Only retry on transport problems
skunert Feb 21, 2022
28df792
Use PHash by value, rename test
skunert Feb 21, 2022
b6236a1
Improve tracing, return error on relay-chain-interface build
skunert Feb 21, 2022
c763d46
Fix naming, use generics instead of deserializing manually
skunert Feb 21, 2022
c502ae8
Rename RelayChainLocal and RelayChainNetwork
skunert Feb 21, 2022
43eb056
lock
skunert Feb 21, 2022
f15097c
Merge branch 'master' into skunert-network-interface
skunert Feb 21, 2022
ac455e9
Format
skunert Feb 21, 2022
69e5a38
Use impl trait for encodable runtime payload
skunert Feb 28, 2022
8d851cf
Only instantiate full node in tests when we need it
skunert Feb 28, 2022
f6965a2
Merge branch 'master' into skunert-network-interface
skunert Feb 28, 2022
f9aa4f0
Upgrade scale-codec to 3.0.0
skunert Mar 1, 2022
3587259
Improve expect log
skunert Mar 1, 2022
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
136 changes: 117 additions & 19 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ members = [
"client/pov-recovery",
"client/service",
"client/relay-chain-interface",
"client/relay-chain-local",
"client/relay-chain-inprocess-interface",
"client/relay-chain-rpc-interface",
"pallets/aura-ext",
"pallets/collator-selection",
"pallets/dmp-queue",
Expand Down
1 change: 1 addition & 0 deletions client/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ clap = { version = "3.1", features = ["derive"] }
# Substrate dependencies
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" }
url = "2.2.2"
37 changes: 36 additions & 1 deletion client/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#![warn(missing_docs)]

use clap::Parser;
use sc_cli;
use sc_service::{
config::{PrometheusConfig, TelemetryEndpoints},
BasePath, TransactionPoolOptions,
Expand All @@ -29,6 +28,7 @@ use std::{
io::{self, Write},
net::SocketAddr,
};
use url::Url;

/// The `purge-chain` command used to remove the whole chain: the parachain and the relay chain.
#[derive(Debug, Parser)]
Expand Down Expand Up @@ -119,6 +119,19 @@ impl sc_cli::CliConfiguration for PurgeChainCmd {
}
}

fn validate_relay_chain_url(arg: &str) -> Result<(), String> {
let url = Url::parse(arg).map_err(|e| e.to_string())?;

if url.scheme() == "ws" {
Ok(())
} else {
Err(format!(
"'{}' URL scheme not supported. Only websocket RPC is currently supported",
url.scheme()
))
}
}

/// The `run` command used to run a node.
#[derive(Debug, Parser)]
pub struct RunCmd {
Expand All @@ -131,6 +144,23 @@ pub struct RunCmd {
/// Note that this is the same as running with `--validator`.
#[clap(long, conflicts_with = "validator")]
pub collator: bool,

/// EXPERIMENTAL: Specify an URL to a relay chain full node to communicate with.
#[clap(
long,
parse(try_from_str),
validator = validate_relay_chain_url,
conflicts_with = "collator",
conflicts_with = "validator"
)]
pub relay_chain_rpc_url: Option<Url>,
}

/// Options only relevant for collator nodes
#[derive(Clone, Debug)]
pub struct CollatorOptions {
/// Location of relay chain full node
pub relay_chain_rpc_url: Option<Url>,
}

/// A non-redundant version of the `RunCmd` that sets the `validator` field when the
Expand All @@ -150,6 +180,11 @@ impl RunCmd {

NormalizedRunCmd { base: new_base }
}

/// Create [`CollatorOptions`] representing options only relevant to parachain collator nodes
pub fn collator_options(&self) -> CollatorOptions {
CollatorOptions { relay_chain_rpc_url: self.relay_chain_rpc_url.clone() }
}
}

impl sc_cli::CliConfiguration for NormalizedRunCmd {
Expand Down
Loading