Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip

wip
  • Loading branch information
benluelo committed Aug 15, 2024
1 parent 5362add commit 45da996
Show file tree
Hide file tree
Showing 208 changed files with 20,723 additions and 10,440 deletions.
970 changes: 808 additions & 162 deletions Cargo.lock

Large diffs are not rendered by default.

93 changes: 51 additions & 42 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ members = [
"hubble",

"lib/beacon-api",
"lib/block-message",
"lib/chain-utils",
"lib/cometbft-rpc",
"lib/gnark-key-parser",
Expand All @@ -34,7 +33,6 @@ members = [
"lib/poseidon-rs",
"lib/queue-msg",
"lib/queue-msg-macro",
"lib/relay-message",
"lib/scroll-api",
"lib/scroll-codec",
"lib/scroll-codec/fetch-test-vectors",
Expand All @@ -44,7 +42,6 @@ members = [
"lib/ssz/tests-generator",
"lib/ssz-derive",
"lib/unionlabs",
"lib/voyager-message",
"lib/zktrie-rs",

"lib/arbitrum-verifier",
Expand All @@ -69,12 +66,27 @@ members = [

"ucli",
"unionvisor",
"voyager",
"near/near-ibc",
"near/near-light-client",
"near/dummy-ibc-app",
"near/near-ibc-tests",

"voyager",
"voyager/modules/chain/cosmos-sdk",
"voyager/modules/chain/ethereum",

"voyager/modules/client/cometbls",
"voyager/modules/client/ethereum",

"voyager/modules/consensus/cometbls",
"voyager/modules/consensus/ethereum",

"voyager/modules/transaction/cosmos-sdk",
"voyager/modules/transaction/ethereum",

"voyager/plugins/packet-filter",
"voyager/plugins/transaction-batch",

"drip",
]

Expand All @@ -94,44 +106,41 @@ opt-level = 3
strip = true

[workspace.dependencies]
arbitrum-verifier = { path = "lib/arbitrum-verifier", default-features = false }
beacon-api = { path = "lib/beacon-api", default-features = false }
block-message = { path = "lib/block-message", default-features = false }
chain-utils = { path = "lib/chain-utils", default-features = false }
cometbft-rpc = { path = "lib/cometbft-rpc", default-features = false }
cometbls-groth16-verifier = { path = "lib/cometbls-groth16-verifier", default-features = false }
contracts = { path = "generated/rust/contracts", default-features = false }
ethereum-light-client = { path = "light-clients/ethereum-light-client", default-features = false }
ethereum-verifier = { path = "lib/ethereum-verifier", default-features = false }
evm-in-cosmos-light-client = { path = "light-clients/evm-in-cosmos-light-client", default-features = false }
gnark-key-parser = { path = "lib/gnark-key-parser", default-features = false }
gnark-mimc = { path = "lib/gnark-mimc", default-features = false }
ibc-vm-rs = { path = "lib/ibc-vm-rs", default-features = false }
ics008-wasm-client = { path = "lib/ics-008-wasm-client", default-features = false }
ics23 = { path = "lib/ics23", default-features = false }
linea-verifier = { path = "lib/linea-verifier", default-features = false }
linea-zktrie = { path = "lib/linea-zktrie", default-features = false }
macros = { path = "lib/macros", default-features = false }
pg-queue = { path = "lib/pg-queue", default-features = false }
poseidon-rs = { path = "lib/poseidon-rs", default-features = false }
protos = { path = "generated/rust/protos", default-features = false }
queue-msg = { path = "lib/queue-msg", default-features = false }
queue-msg-macro = { path = "lib/queue-msg-macro", default-features = false }
relay-message = { path = "lib/relay-message", default-features = false }
scroll-api = { path = "lib/scroll-api", default-features = false }
scroll-codec = { path = "lib/scroll-codec", default-features = false }
scroll-rpc = { path = "lib/scroll-rpc", default-features = false }
scroll-verifier = { path = "lib/scroll-verifier", default-features = false }
serde-utils = { path = "lib/serde-utils", default-features = false }
ssz = { path = "lib/ssz", default-features = false }
ssz-derive = { path = "lib/ssz-derive", default-features = false }
tendermint-light-client = { path = "light-clients/tendermint-light-client", default-features = false }
tendermint-verifier = { path = "lib/tendermint-verifier", default-features = false }
token-factory-api = { path = "cosmwasm/token-factory-api", default-features = false }
ucs01-relay-api = { path = "cosmwasm/ucs01-relay-api", default-features = false }
unionlabs = { path = "lib/unionlabs", default-features = false }
voyager-message = { path = "lib/voyager-message", default-features = false }
zktrie = { path = "lib/zktrie-rs", default-features = false }
arbitrum-verifier = { path = "lib/arbitrum-verifier", default-features = false }
beacon-api = { path = "lib/beacon-api", default-features = false }
chain-utils = { path = "lib/chain-utils", default-features = false }
cometbft-rpc = { path = "lib/cometbft-rpc", default-features = false }
cometbls-groth16-verifier = { path = "lib/cometbls-groth16-verifier", default-features = false }
contracts = { path = "generated/rust/contracts", default-features = false }
ethereum-light-client = { path = "light-clients/ethereum-light-client", default-features = false }
ethereum-verifier = { path = "lib/ethereum-verifier", default-features = false }
gnark-key-parser = { path = "lib/gnark-key-parser", default-features = false }
gnark-mimc = { path = "lib/gnark-mimc", default-features = false }
ibc-vm-rs = { path = "lib/ibc-vm-rs", default-features = false }
ics008-wasm-client = { path = "lib/ics-008-wasm-client", default-features = false }
ics23 = { path = "lib/ics23", default-features = false }
linea-verifier = { path = "lib/linea-verifier", default-features = false }
linea-zktrie = { path = "lib/linea-zktrie", default-features = false }
macros = { path = "lib/macros", default-features = false }
pg-queue = { path = "lib/pg-queue", default-features = false }
poseidon-rs = { path = "lib/poseidon-rs", default-features = false }
protos = { path = "generated/rust/protos", default-features = false }
queue-msg = { path = "lib/queue-msg", default-features = false }
queue-msg-macro = { path = "lib/queue-msg-macro", default-features = false }
scroll-api = { path = "lib/scroll-api", default-features = false }
scroll-codec = { path = "lib/scroll-codec", default-features = false }
scroll-rpc = { path = "lib/scroll-rpc", default-features = false }
scroll-verifier = { path = "lib/scroll-verifier", default-features = false }
serde-utils = { path = "lib/serde-utils", default-features = false }
ssz = { path = "lib/ssz", default-features = false }
ssz-derive = { path = "lib/ssz-derive", default-features = false }
tendermint-light-client = { path = "light-clients/tendermint-light-client", default-features = false }
tendermint-verifier = { path = "lib/tendermint-verifier", default-features = false }
token-factory-api = { path = "cosmwasm/token-factory-api", default-features = false }
ucs01-relay-api = { path = "cosmwasm/ucs01-relay-api", default-features = false }
unionlabs = { path = "lib/unionlabs", default-features = false }
voyager-message = { path = "lib/voyager-message", default-features = false }
zktrie = { path = "lib/zktrie-rs", default-features = false }

# external dependencies
milagro_bls = { git = "https://github.com/Snowfork/milagro_bls", rev = "bc2b5b5e8d48b7e2e1bfaa56dc2d93e13cb32095", default-features = false }
Expand Down
107 changes: 107 additions & 0 deletions example.jq
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
if ."@type" == "data" then
."@value" as $data |

if $data."@type" == "ibc_event" then
$data."@value".chain_id as $chain_id |
$data."@value".event."@type" as $event_type |
$data."@value".event."@value" as $event |

if $event_type == "send_packet" then
(
($chain_id | test(".*"))
and (
($event.packet_src_port | test("^wasm.union1m87a5scxnnk83wfwapxlufzm58qe2v65985exff70z95a2yr86yq7hl08h$"))
or ($event.packet_dst_port | test("^wasm.union1m87a5scxnnk83wfwapxlufzm58qe2v65985exff70z95a2yr86yq7hl08h$"))
)
and (
($event.packet_src_channel | test(".*"))
or ($event.packet_dst_channel | test(".*"))
)
and ($event.connection_id | test(".*"))
)
elif $event_type == "recv_packet" then
(
($chain_id | test(".*"))
and (
($event.packet_src_port | test("^wasm.union1m87a5scxnnk83wfwapxlufzm58qe2v65985exff70z95a2yr86yq7hl08h$"))
or ($event.packet_dst_port | test("^wasm.union1m87a5scxnnk83wfwapxlufzm58qe2v65985exff70z95a2yr86yq7hl08h$"))
)
and (
($event.packet_src_channel | test(".*"))
or ($event.packet_dst_channel | test(".*"))
)
and ($event.connection_id | test(".*"))
)
elif $event_type == "write_acknowledgement" then
(
($chain_id | test(".*"))
and (
($event.packet_src_port | test("^wasm.union1m87a5scxnnk83wfwapxlufzm58qe2v65985exff70z95a2yr86yq7hl08h$"))
or ($event.packet_dst_port | test("^wasm.union1m87a5scxnnk83wfwapxlufzm58qe2v65985exff70z95a2yr86yq7hl08h$"))
)
and (
($event.packet_src_channel | test(".*"))
or ($event.packet_dst_channel | test(".*"))
)
and ($event.connection_id | test(".*"))
)

elif $event_type == "channel_open_init" then
(
($chain_id | test(".*"))
and (
($event.port_id | test(".*"))
or ($event.counterparty_port_id | test(".*"))
)
and ($event.connection_id | test(".*"))
)
elif $event_type == "channel_open_try" then
(
($chain_id | test(".*"))
and (
($event.port_id | test(".*"))
or ($event.counterparty_port_id | test(".*"))
)
and ($event.connection_id | test(".*"))
)
elif $event_type == "channel_open_ack" then
(
($chain_id | test(".*"))
and (
($event.port_id | test(".*"))
or ($event.counterparty_port_id | test(".*"))
)
and ($event.connection_id | test(".*"))
)

elif $event_type == "connection_open_init" then
(
($chain_id | test(".*"))
and (
($event.client_id | test(".*"))
or ($event.counterparty_client_id | test(".*"))
)
)
elif $event_type == "connection_open_try" then
(
($chain_id | test(".*"))
and (
($event.client_id | test(".*"))
or ($event.counterparty_client_id | test(".*"))
)
)
elif $event_type == "connection_open_ack" then
(
($chain_id | test(".*"))
and (
($event.client_id | test(".*"))
or ($event.counterparty_client_id | test(".*"))
)
)
end
else
false
end
else
false
end
20 changes: 9 additions & 11 deletions fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,24 @@ workspace = true
cargo-fuzz = true

[dependencies]
block-message = { workspace = true }
voyager-message = { workspace = true }
libfuzzer-sys = "0.4"
queue-msg = { workspace = true }
relay-message = { workspace = true }
unionlabs = { workspace = true }
unionlabs = { workspace = true }

[features]
arbitrary = [
"queue-msg/arbitrary",
"unionlabs/fuzzing",
"relay-message/arbitrary",
"block-message/arbitrary",
"voyager-message/arbitrary",
]

[[bin]]
doc = false
name = "voyager_message_roundtrip"
path = "../lib/relay-message/fuzz_targets/serde_roundtrip.rs"
required-features = ["arbitrary"]
test = false
# [[bin]]
# doc = false
# name = "voyager_message_roundtrip"
# path = "../lib/relay-message/fuzz_targets/serde_roundtrip.rs"
# required-features = ["arbitrary"]
# test = false

[[bin]]
doc = false
Expand Down
10 changes: 10 additions & 0 deletions generated/rust/contracts/src/ibc_channel_handshake.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions generated/rust/contracts/src/ibc_client.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions generated/rust/contracts/src/ibc_connection.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions generated/rust/contracts/src/ibc_packet.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions generated/rust/protos/src/cosmos.base.abci.v1beta1.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 45da996

Please sign in to comment.