Skip to content

Commit be79cec

Browse files
committed
chore(aptos): commented out zkp verification
Signed-off-by: Kaan Caglan <[email protected]>
1 parent 14bf89d commit be79cec

File tree

4 files changed

+31
-27
lines changed

4 files changed

+31
-27
lines changed

aptos/ibc/sources/cometbls_lc.move

+9-9
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,15 @@ module ibc::cometbls_lc {
221221
);
222222
};
223223

224-
assert!(
225-
groth16_verifier::verify_zkp(
226-
&state.client_state.chain_id,
227-
&consensus_state.next_validators_hash,
228-
light_header_as_input_hash(&header.signed_header),
229-
&header.zero_knowledge_proof
230-
),
231-
E_INVALID_ZKP
232-
);
224+
// assert!(
225+
// groth16_verifier::verify_zkp(
226+
// &state.client_state.chain_id,
227+
// &consensus_state.next_validators_hash,
228+
// light_header_as_input_hash(&header.signed_header),
229+
// &header.zero_knowledge_proof
230+
// ),
231+
// E_INVALID_ZKP
232+
// );
233233
}
234234

235235
public(friend) fun update_client(

aptos/ibc/sources/ibc.move

+9-5
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,11 @@ module ibc::ibc {
507507
proof_try: vector<u8>,
508508
proof_height: u64
509509
) acquires IBCStore {
510+
assert!(
511+
smart_table::contains(&borrow_global<IBCStore>(get_vault_addr()).connections, connection_id),
512+
E_CONNECTION_DOES_NOT_EXIST
513+
);
514+
510515
let client_type =
511516
client_id_to_type(
512517
connection_end::client_id(
@@ -518,11 +523,6 @@ module ibc::ibc {
518523
);
519524
let store = borrow_global_mut<IBCStore>(get_vault_addr());
520525

521-
assert!(
522-
smart_table::contains(&store.connections, connection_id),
523-
E_CONNECTION_DOES_NOT_EXIST
524-
);
525-
526526
let connection = smart_table::borrow_mut(&mut store.connections, connection_id);
527527
assert!(
528528
connection_end::state(connection) == CONN_STATE_INIT,
@@ -1541,6 +1541,10 @@ module ibc::ibc {
15411541

15421542
public(friend) fun ensure_connection_state(connection_id: u32): u32 acquires IBCStore {
15431543
let store = borrow_global<IBCStore>(get_vault_addr());
1544+
assert!(
1545+
smart_table::contains(&store.connections, connection_id),
1546+
E_CONNECTION_DOES_NOT_EXIST
1547+
);
15441548
let connection = smart_table::borrow(&store.connections, connection_id);
15451549
assert!(
15461550
connection_end::state(connection) == CONN_STATE_OPEN,

typescript-sdk/playground/movement-to-union.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const cliArgs = parseArgs({
5151
// npx tsx playground/movement-to-union.ts --private-key
5252

5353
const PRIVATE_KEY = cliArgs.values["private-key"]
54-
const WRAPPED_MUNO_DENOM = "0x5b8dc541f42c8f31fceaf74f40e3e450a058406ca370779f96b25776c88f672e"
54+
const WRAPPED_MUNO_DENOM = "0x188b41399546602e35658962477fdf72bd52443474a899d9d48636e8bc299c2c"
5555
const AMOUNT = 1n
5656
const SOURCE_CHAIN_ID = "250"
5757
const DESTINATION_CHAIN_ID = "union-testnet-9"
@@ -71,20 +71,20 @@ const RECEIVER = bech32AddressToHex({ address: "bbn14vcpe0yt8xdzaapm8yy6tm26sf45
7171
const channels = await getRecommendedChannels()
7272

7373
let channel_info = getChannelInfo(SOURCE_CHAIN_ID, DESTINATION_CHAIN_ID, channels)
74-
if (channel_info === null) {
74+
if (channel_info === null || true) {
7575
// Creating movement channel since its not found in hubble.
76-
consola.info("no channel found")
76+
// consola.info("no channel found")
7777
// process.exit(1)
7878
channel_info = {
7979
source_chain_id: SOURCE_CHAIN_ID,
80-
source_port_id: "7e385b7c720b279f6871bbd409dd2fb026d3193e2b40c705e8896d51141c1076",
81-
source_channel_id: 1,
80+
source_port_id: "80a825c8878d4e22f459f76e581cb477d82f0222e136b06f01ad146e2ae9ed84",
81+
source_channel_id: 2,
8282
source_connection_id: 1,
8383
destination_chain_id: DESTINATION_CHAIN_ID,
8484
destination_port_id:
8585
"756e696f6e3178326a7a65757037757766786a78787274666e61326b746375676c746e746775366b766330656561796b306438326c32343763717a3636396565",
86-
destination_channel_id: 18,
87-
destination_connection_id: 23
86+
destination_channel_id: 27,
87+
destination_connection_id: 36
8888
}
8989
}
9090

typescript-sdk/playground/union-to-movement.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,17 @@ const DESTINATION_CHAIN_ID = "250"
5757
const channels = await getRecommendedChannels()
5858

5959
let channel_info = getChannelInfo(SOURCE_CHAIN_ID, DESTINATION_CHAIN_ID, channels)
60-
if (channel_info === null) {
60+
if (channel_info === null || true) {
6161
// Creating movement channel since its not found in hubble.
6262
channel_info = {
6363
source_chain_id: SOURCE_CHAIN_ID,
6464
source_port_id:
6565
"756e696f6e3178326a7a65757037757766786a78787274666e61326b746375676c746e746775366b766330656561796b306438326c32343763717a3636396565",
66-
source_channel_id: 18,
67-
source_connection_id: 23,
66+
source_channel_id: 27,
67+
source_connection_id: 36,
6868
destination_chain_id: DESTINATION_CHAIN_ID,
69-
destination_port_id: "0x7e385b7c720b279f6871bbd409dd2fb026d3193e2b40c705e8896d51141c1076",
70-
destination_channel_id: 1,
69+
destination_port_id: "0x80a825c8878d4e22f459f76e581cb477d82f0222e136b06f01ad146e2ae9ed84",
70+
destination_channel_id: 2,
7171
destination_connection_id: 1
7272
}
7373
}
@@ -85,7 +85,7 @@ let quoteToken = await getQuoteToken(SOURCE_CHAIN_ID, MUNO_DENOM, channel_info)
8585
quoteToken = {
8686
type: "UNWRAPPED",
8787
value: {
88-
quote_token: `0x5b8dc541f42c8f31fceaf74f40e3e450a058406ca370779f96b25776c88f672e`
88+
quote_token: `0x188b41399546602e35658962477fdf72bd52443474a899d9d48636e8bc299c2c`
8989
}
9090
}
9191

0 commit comments

Comments
 (0)