Skip to content

Commit c751458

Browse files
committed
rename chain id to have message len as 112 bytes. pub key as 32 bytes.
1 parent d75fab8 commit c751458

File tree

6 files changed

+28
-10
lines changed

6 files changed

+28
-10
lines changed

config/centauri-local.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "centauri"
33
rpc_url = "http://127.0.0.1:26657/"
44
grpc_url = "http://127.0.0.1:9090/"
55
websocket_url = "ws://127.0.0.1:26657/websocket"
6-
chain_id = "centauri-testnet-1"
6+
chain_id = "centauri-1"
77
client_id = "07-tendermint-0"
88
connection_id = "connection-0"
99
account_prefix = "centauri"

hyperspace/cosmos/src/provider.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,16 @@ where
272272
let zk_input = update_header.get_zk_input(size);
273273

274274
match zk_input {
275-
Ok((_input, bitmask)) => {
275+
Ok((input, bitmask)) => {
276+
277+
for i in input.iter(){
278+
log::error!(target: "hyperspace", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
279+
log::error!(target: "hyperspace", "pub key : {:?}", i.0);
280+
log::error!(target: "hyperspace", "signature : {:?}", i.1);
281+
log::error!(target: "hyperspace", "message : {:?}", i.2);
282+
};
283+
284+
276285
let result = zk_prover.create_proof(CreateProofInput::new(
277286
vec![], vec![], vec![] //pass the input
278287
));

hyperspace/testsuite/tests/ethereum_cosmos.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ async fn setup_clients() -> (AnyChain, AnyChain, JoinHandle<()>) {
393393
rpc_url: args.chain_b.clone().parse().unwrap(),
394394
grpc_url: args.cosmos_grpc.clone().parse().unwrap(),
395395
websocket_url: args.cosmos_ws.clone().parse().unwrap(),
396-
chain_id: "centauri-testnet-1".to_string(),
396+
chain_id: "centauri-1".to_string(),
397397
client_id: None,
398398
connection_id: None,
399399
account_prefix: "centauri".to_string(),

light-clients/ics07-tendermint/src/client_message.rs

+13-4
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ use prost::Message;
3535
use serde::{Deserialize, Serialize};
3636
use std::collections::HashSet;
3737
use tendermint::{
38-
block::{signed_header::SignedHeader, Commit, CommitSig},
39-
validator::Set as ValidatorSet,
40-
vote::{SignedVote, ValidatorIndex},
41-
Vote,
38+
block::{signed_header::SignedHeader, Commit, CommitSig}, validator::Set as ValidatorSet, vote::{SignedVote, ValidatorIndex}, PublicKey, Vote
4239
};
4340
use tendermint_proto::Protobuf;
4441

@@ -182,6 +179,18 @@ impl Header {
182179
}
183180

184181
pub fn get_zk_input(&self, size: usize) -> Result<(Vec<(Vec<u8>, Vec<u8>, Vec<u8>)>, u64), Error> {
182+
//todo we need to take a pub key from the validator to get 32 bytes to create a zk input
183+
let v = &self.validator_set.validators();
184+
let p = v[0].pub_key;
185+
match p {
186+
PublicKey::Ed25519(e) => {
187+
println!("Ed25519");
188+
println!("{:?}", e.as_bytes());
189+
},
190+
_ => {}
191+
};
192+
193+
185194
#[derive(Clone)]
186195
struct ZKInput {
187196
pub_key: Vec<u8>,

rust-toolchain.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[toolchain]
2-
channel = "nightly"
3-
# channel = "nightly-2023-02-07"
2+
# channel = "nightly"
3+
channel = "nightly-2023-04-25"
44
targets = ["wasm32-unknown-unknown"]
55
profile = "minimal"

scripts/eth-bridge/centauri-testnode.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
KEY="mykey"
2-
CHAINID="centauri-testnet-1"
2+
CHAINID="centauri-1"
33
MONIKER="localtestnet"
44
KEYALGO="secp256k1"
55
KEYRING="test"

0 commit comments

Comments
 (0)