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

[DNM] Use rococo v7 metadata #706

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file added essentials/assets/rococo_metadata.scale
Binary file not shown.
4 changes: 2 additions & 2 deletions essentials/src/collector/candidate_record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ where
let mut state = serializer.serialize_struct("CandidateDescriptor", 9)?;
state.serialize_field("para_id", &self.para_id.0)?;
state.serialize_field("relay_parent", &self.relay_parent)?;
state.serialize_field("collator", &self.collator.0 .0)?;
state.serialize_field("collator", &self.collator.0)?;
state.serialize_field("persisted_validation_data_hash", &self.persisted_validation_data_hash)?;
state.serialize_field("pov_hash", &self.pov_hash)?;
state.serialize_field("erasure_root", &self.erasure_root)?;
state.serialize_field("signature", Bytes::new(&self.signature.0 .0))?;
state.serialize_field("signature", Bytes::new(&self.signature.0))?;
state.serialize_field("para_head", &self.para_head)?;
state.serialize_field("validation_code_hash", &self.validation_code_hash.0)?;
state.end()
Expand Down
4 changes: 2 additions & 2 deletions essentials/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with polkadot-introspector. If not, see <http://www.gnu.org/licenses/>.
//

#[subxt::subxt(runtime_metadata_path = "assets/polkadot_metadata.scale")]
#[subxt::subxt(runtime_metadata_path = "assets/rococo_metadata.scale")]
pub mod polkadot {}

pub use polkadot::runtime_types::polkadot_primitives::v6 as polkadot_primitives;
pub use polkadot::runtime_types::polkadot_primitives::v7 as polkadot_primitives;
2 changes: 1 addition & 1 deletion essentials/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use subxt::{
config::substrate::{BlakeTwo256, SubstrateHeader},
utils,
};
use subxt_runtime_types::polkadot_runtime as runtime;
use subxt_runtime_types::rococo_runtime as runtime;

pub type BlockNumber = u32;
pub type H256 = utils::H256;
Expand Down
7 changes: 3 additions & 4 deletions parachain-tracer/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ use polkadot_introspector_essentials::{
bounded_collections::bounded_vec::BoundedVec,
polkadot_core_primitives::CandidateHash,
polkadot_parachain_primitives::primitives::{HeadData, Id, ValidationCodeHash},
sp_core::sr25519::{Public, Signature},
sp_runtime::generic::{digest::Digest, header::Header},
},
polkadot_primitives::{
Expand Down Expand Up @@ -59,7 +58,7 @@ pub fn create_backed_candidate(para_id: u32) -> BackedCandidate<H256> {
descriptor: CandidateDescriptor {
para_id: Id(para_id),
relay_parent: H256::random(),
collator: collator_app::Public(Public([0; 32])),
collator: collator_app::Public([0; 32]),
persisted_validation_data_hash: Default::default(),
pov_hash: Default::default(),
erasure_root: Default::default(),
Expand Down Expand Up @@ -188,9 +187,9 @@ pub async fn storage_write<T: Encode>(
}

fn create_collator_signature() -> collator_app::Signature {
collator_app::Signature(Signature([0; 64]))
collator_app::Signature([0; 64])
}

fn create_validator_signature() -> validator_app::Signature {
validator_app::Signature(Signature([0; 64]))
validator_app::Signature([0; 64])
}
2 changes: 1 addition & 1 deletion whois/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ fn desired_node_id(node: &AddedNode, authority_key: AccountId32) -> bool {
}

fn get_authority_key(keys: SessionKeys) -> AccountId32 {
AccountId32::from(keys.grandpa.0 .0)
AccountId32::from(keys.grandpa.0)
}

fn clear_last_two_lines() {
Expand Down
Loading