chore: update crates.io publish plan and fix dependencies
- Update CRATES_PUBLISH_PLAN.md with Level 0-2 completion status - Fix binary-merkle-tree and related dependencies - Add runtime_logger_tests.rs - Update various Cargo.toml files
This commit is contained in:
@@ -14,7 +14,7 @@ workspace = true
|
||||
|
||||
[dependencies]
|
||||
array-bytes = { optional = true, workspace = true, default-features = true }
|
||||
binary-merkle-tree = { workspace = true }
|
||||
pez-binary-merkle-tree = { workspace = true }
|
||||
codec = { features = ["derive"], workspace = true }
|
||||
log = { workspace = true }
|
||||
pezframe-benchmarking = { optional = true, workspace = true }
|
||||
@@ -41,7 +41,7 @@ pezsp-staking = { workspace = true, default-features = true }
|
||||
default = ["std"]
|
||||
std = [
|
||||
"array-bytes",
|
||||
"binary-merkle-tree/std",
|
||||
"pez-binary-merkle-tree/std",
|
||||
"codec/std",
|
||||
"log/std",
|
||||
"pezframe-benchmarking/std",
|
||||
@@ -71,7 +71,7 @@ try-runtime = [
|
||||
"pezsp-runtime/try-runtime",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"binary-merkle-tree/runtime-benchmarks",
|
||||
"pez-binary-merkle-tree/runtime-benchmarks",
|
||||
"pezframe-benchmarking/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezframe-system/runtime-benchmarks",
|
||||
|
||||
@@ -356,7 +356,7 @@ impl<T: Config> Pezpallet<T> {
|
||||
len,
|
||||
);
|
||||
}
|
||||
let keyset_commitment = binary_merkle_tree::merkle_root::<
|
||||
let keyset_commitment = pez_binary_merkle_tree::merkle_root::<
|
||||
<T as pezpallet_mmr::Config>::Hashing,
|
||||
_,
|
||||
>(beefy_addresses)
|
||||
|
||||
@@ -140,7 +140,7 @@ impl BeefyDataProvider<Vec<u8>> for DummyDataProvider {
|
||||
fn extra_data() -> Vec<u8> {
|
||||
let mut col = vec![(15, vec![1, 2, 3]), (5, vec![4, 5, 6])];
|
||||
col.sort();
|
||||
binary_merkle_tree::merkle_root::<<Test as pezpallet_mmr::Config>::Hashing, _>(
|
||||
pez_binary_merkle_tree::merkle_root::<<Test as pezpallet_mmr::Config>::Hashing, _>(
|
||||
col.into_iter().map(|pair| pair.encode()),
|
||||
)
|
||||
.as_ref()
|
||||
|
||||
@@ -24,7 +24,7 @@ serde_derive = { optional = true, workspace = true }
|
||||
serde_json = { features = ["alloc"], workspace = true }
|
||||
smallvec = { workspace = true, default-features = true }
|
||||
|
||||
binary-merkle-tree = { workspace = true }
|
||||
pez-binary-merkle-tree = { workspace = true }
|
||||
pezsp-api = { workspace = true }
|
||||
pezsp-application-crypto = { workspace = true }
|
||||
pezsp-arithmetic = { workspace = true }
|
||||
@@ -135,7 +135,7 @@ bizinikiwi-wasm-builder = { workspace = true, default-features = true }
|
||||
default = ["std"]
|
||||
no_std = []
|
||||
std = [
|
||||
"binary-merkle-tree/std",
|
||||
"pez-binary-merkle-tree/std",
|
||||
"bitvec/std",
|
||||
"codec/std",
|
||||
"log/std",
|
||||
@@ -230,7 +230,7 @@ std = [
|
||||
"xcm/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"binary-merkle-tree/runtime-benchmarks",
|
||||
"pez-binary-merkle-tree/runtime-benchmarks",
|
||||
"bizinikiwi-wasm-builder/runtime-benchmarks",
|
||||
"pezframe-benchmarking/runtime-benchmarks",
|
||||
"pezframe-election-provider-support/runtime-benchmarks",
|
||||
|
||||
@@ -504,7 +504,7 @@ impl BeefyDataProvider<H256> for ParaHeadsRootProvider {
|
||||
fn extra_data() -> H256 {
|
||||
let para_heads: Vec<(u32, Vec<u8>)> =
|
||||
teyrchains_paras::Pezpallet::<Runtime>::sorted_para_heads();
|
||||
binary_merkle_tree::merkle_root::<mmr::Hashing, _>(
|
||||
pez_binary_merkle_tree::merkle_root::<mmr::Hashing, _>(
|
||||
para_heads.into_iter().map(|pair| pair.encode()),
|
||||
)
|
||||
.into()
|
||||
|
||||
@@ -18,7 +18,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
array-bytes = { workspace = true }
|
||||
binary-merkle-tree = { workspace = true }
|
||||
pez-binary-merkle-tree = { workspace = true }
|
||||
bitflags = { workspace = true }
|
||||
codec = { features = ["derive", "max-encoded-len"], workspace = true }
|
||||
docify = { workspace = true }
|
||||
@@ -63,7 +63,7 @@ pretty_assertions = { workspace = true }
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"binary-merkle-tree/std",
|
||||
"pez-binary-merkle-tree/std",
|
||||
"codec/std",
|
||||
"environmental/std",
|
||||
"frame-metadata/std",
|
||||
@@ -91,7 +91,7 @@ std = [
|
||||
"serde_json/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"binary-merkle-tree/runtime-benchmarks",
|
||||
"pez-binary-merkle-tree/runtime-benchmarks",
|
||||
"pezframe-support-procedural/runtime-benchmarks",
|
||||
"pezframe-system/runtime-benchmarks",
|
||||
"pezsp-api/runtime-benchmarks",
|
||||
|
||||
@@ -45,7 +45,7 @@ impl<H: Hasher> VerifyExistenceProof for BinaryMerkleTreeProver<H>
|
||||
where
|
||||
H::Out: Decode + Encode,
|
||||
{
|
||||
type Proof = binary_merkle_tree::MerkleProof<H::Out, Vec<u8>>;
|
||||
type Proof = pez_binary_merkle_tree::MerkleProof<H::Out, Vec<u8>>;
|
||||
type Hash = H::Out;
|
||||
|
||||
fn verify_proof(proof: Self::Proof, root: &Self::Hash) -> Result<Vec<u8>, DispatchError> {
|
||||
@@ -53,7 +53,7 @@ where
|
||||
return Err(TrieError::RootMismatch.into());
|
||||
}
|
||||
|
||||
if binary_merkle_tree::verify_proof::<H, _, _>(
|
||||
if pez_binary_merkle_tree::verify_proof::<H, _, _>(
|
||||
&proof.root,
|
||||
proof.proof,
|
||||
proof.number_of_leaves,
|
||||
@@ -68,7 +68,7 @@ where
|
||||
}
|
||||
|
||||
impl<H: Hasher> ProofToHashes for BinaryMerkleTreeProver<H> {
|
||||
type Proof = binary_merkle_tree::MerkleProof<H::Out, Vec<u8>>;
|
||||
type Proof = pez_binary_merkle_tree::MerkleProof<H::Out, Vec<u8>>;
|
||||
|
||||
// This base 2 merkle trie includes a `proof` field which is a `Vec<Hash>`.
|
||||
// The length of this vector tells us the depth of the proof, and how many
|
||||
@@ -128,8 +128,8 @@ mod tests {
|
||||
};
|
||||
|
||||
#[test]
|
||||
fn verify_binary_merkle_tree_prover_works() {
|
||||
let proof = binary_merkle_tree::merkle_proof::<BlakeTwo256, _, _>(
|
||||
fn verify_pez_binary_merkle_tree_prover_works() {
|
||||
let proof = pez_binary_merkle_tree::merkle_proof::<BlakeTwo256, _, _>(
|
||||
vec![b"hey".encode(), b"yes".encode()],
|
||||
1,
|
||||
);
|
||||
@@ -208,7 +208,7 @@ mod tests {
|
||||
fn proof_to_hashes_binary() {
|
||||
let mut i: u32 = 1;
|
||||
while i < 10_000_000 {
|
||||
let proof = binary_merkle_tree::merkle_proof::<BlakeTwo256, _, _>(
|
||||
let proof = pez_binary_merkle_tree::merkle_proof::<BlakeTwo256, _, _>(
|
||||
(0..i).map(|i| u128::from(i).encode()),
|
||||
0,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user