mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 13:21:01 +00:00
Use real weights to compute message delivery and dispatch fee (#598)
* message fee formula * update GetDelvieryConfirmationTransactionFee * include cost of transactions (i.e. not only dispatch cost) in delivery_and_dispatch_fee * endow relayers fund account * include db ops weight in max tx weight estimation * (in bytes) Co-authored-by: Hernando Castano <castano.ha@gmail.com>
This commit is contained in:
committed by
Bastian Köcher
parent
fd7f2a45d8
commit
0f56f18778
@@ -12,6 +12,7 @@ futures = { version = "0.3.5", features = ["compat"] }
|
||||
jsonrpc-core = "15.1.0"
|
||||
jsonrpc-core-client = "15.1.0"
|
||||
jsonrpc-derive = "15.1.0"
|
||||
log = "0.4.11"
|
||||
|
||||
# Bridge dependencies
|
||||
|
||||
|
||||
@@ -116,6 +116,7 @@ where
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let messages_count = if end >= begin { end - begin + 1 } else { 0 };
|
||||
Box::new(
|
||||
prove_keys_read(
|
||||
self.backend.clone(),
|
||||
@@ -126,7 +127,15 @@ where
|
||||
)
|
||||
.boxed()
|
||||
.compat()
|
||||
.map(serialize_storage_proof)
|
||||
.map(move |proof| {
|
||||
let serialized_proof = serialize_storage_proof(proof);
|
||||
log::trace!(
|
||||
"Generated proof of {} messages. Size: {}",
|
||||
messages_count,
|
||||
serialized_proof.len()
|
||||
);
|
||||
serialized_proof
|
||||
})
|
||||
.map_err(Into::into),
|
||||
)
|
||||
}
|
||||
@@ -145,7 +154,11 @@ where
|
||||
)
|
||||
.boxed()
|
||||
.compat()
|
||||
.map(serialize_storage_proof)
|
||||
.map(|proof| {
|
||||
let serialized_proof = serialize_storage_proof(proof);
|
||||
log::trace!("Generated message delivery proof. Size: {}", serialized_proof.len());
|
||||
serialized_proof
|
||||
})
|
||||
.map_err(Into::into),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user