Open DOBEN opened 2 months ago
Task description
Prerequisite: https://github.com/Concordium/concordium-rust-sdk/issues/209
Currently, the get_consensus_info() function returns the genesis hash. For ZK proof verification we need to convert the genesis hash into the type Network::Testnet/Network::Mainnet.
get_consensus_info()
Network::Testnet/Network::Mainnet
The manual conversion is awkward: https://github.com/Concordium/concordium-dapp-examples/blob/e34d1a55e92bb912695147f9561afe4af6af2620/compliant-reward-distribution/indexer-and-server/src/bin/server.rs#L142C5-L153C1
Suggestion to add a conversion helper function:
conversion
let network: Option<Network> = GENESIS_BLOCK_HASH.convert();
fn convert() -> Option<Network> { ... }
Task description
Prerequisite: https://github.com/Concordium/concordium-rust-sdk/issues/209
Currently, the
get_consensus_info()
function returns the genesis hash. For ZK proof verification we need to convert the genesis hash into the typeNetwork::Testnet/Network::Mainnet
.The manual conversion is awkward: https://github.com/Concordium/concordium-dapp-examples/blob/e34d1a55e92bb912695147f9561afe4af6af2620/compliant-reward-distribution/indexer-and-server/src/bin/server.rs#L142C5-L153C1
Suggestion to add a
conversion
helper function: