Skip to content

Commit 05bc3de

Browse files
committed
chore: add comments
1 parent 73093a3 commit 05bc3de

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

rust/main/chains/hyperlane-aleo/src/config.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ impl ConnectionConf {
3131
) -> Self {
3232
if let Some(consensus_heights) = consensus_heights {
3333
// Set the consensus heights in the environment.
34+
// ZK proof generation is done differently for different chains and relies on these heights. These are hardcoded in the Aleo VM for all known networks, like testnet and mainnet.
35+
// However, when we want to run the relayer with a local chain, that network is unknown and we need to set the correct heights there as well; this is the only way to set the heights.
3436
#[allow(unsafe_code)]
3537
unsafe {
3638
// SAFETY:

rust/main/chains/hyperlane-aleo/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use snarkvm_console_account::Field;
88
// The Aleo VM types all inherit a generic Network type, but that Type is not relevant for many structs of Aleo and is supposed to be more of an additional information for the internal VM processing.
99
// They need this, because they generate ZK Proofs differently for different networks but the actual data of these types are the same across all Networks.
1010
// We pass CurrentNetwork into a lot of types, because we don't have to generate ZK Proofs in almost every situation - except when submitting a TX. There is one exception to this and that is when parsing/handling with Blocks.
11-
// The Block type verifies its validity on creation and that changes based on the Network type, thats why we have to pass the correct Type when dealing with blocks.
11+
// The Block type verifies its validity on creation and that changes based on the Network type, that's why we have to pass the correct Type when dealing with blocks.
1212
pub(crate) type CurrentNetwork = MainnetV0;
1313
/// TxID Type
1414
pub(crate) type TxID = AleoID<Field<TestnetV0>, { hrp2!("at") }>;

0 commit comments

Comments
 (0)