Skip to content

feat: L3 support #437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 111 commits into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
8949443
feat : l3 support init
ocdbytes Dec 18, 2024
abc808e
code : refactor
ocdbytes Dec 18, 2024
a49e209
feat : added tests for starknet client
ocdbytes Dec 20, 2024
0d6168e
changelog update
ocdbytes Dec 20, 2024
76bc944
Merge branch 'main' into l3-support
ocdbytes Dec 20, 2024
75229a4
fix : lint
ocdbytes Dec 20, 2024
661cd33
feat: added update state worker test for starknet client
ocdbytes Dec 20, 2024
62fb337
feat : added messaging implementation for l2 client & resolved commen…
ocdbytes Dec 26, 2024
d4aa988
feat : updated l2 messaging implementation
ocdbytes Dec 27, 2024
a4314be
feat : updated l2 messaging implementation
ocdbytes Dec 27, 2024
9dea223
feat : updated messaging logic
ocdbytes Dec 27, 2024
fafd2c3
clients refactoring done
ocdbytes Jan 6, 2025
aa7834e
refactor : tests
ocdbytes Jan 6, 2025
6c1ff95
fix : tests
ocdbytes Jan 7, 2025
26c9319
feat : updated streams and added tests for streams
ocdbytes Jan 14, 2025
2a19391
fix : changed event params in messaging contract
ocdbytes Jan 14, 2025
8abf999
refactor : removed external devnet.yaml file
ocdbytes Jan 14, 2025
749df1c
feat : removed expects
ocdbytes Jan 14, 2025
b63cf61
refactor crates structure
ocdbytes Jan 14, 2025
c837570
merge main
ocdbytes Jan 14, 2025
1d4d3a4
resolved comments
ocdbytes Jan 15, 2025
fffd9dd
refactor
ocdbytes Jan 17, 2025
71c5524
feat : added automock tests and resolved comments
ocdbytes Jan 21, 2025
62d1df3
merge : main
ocdbytes Jan 21, 2025
79ef5ab
refactor
ocdbytes Jan 21, 2025
8657da3
refactor code and comments resolved
ocdbytes Jan 22, 2025
7afd1a3
Merge branch 'main' into l3-support
Mohiiit Feb 1, 2025
c2ba583
refactor: eth settlement client test udpated to use same anvil instance
Mohiiit Feb 5, 2025
885ae41
refactor: test simplified
Mohiiit Feb 5, 2025
ab24677
fix(eth-settlement): error handling cases fixed
Mohiiit Feb 5, 2025
2349d33
refactor(eth-settlement): fold pattern used
Mohiiit Feb 5, 2025
545c5b5
refactor(eth-settlement): event stream tests removed code duplication
Mohiiit Feb 5, 2025
704ca2d
refactor(settlement-client): SettlementClientError introduced replaci…
Mohiiit Feb 5, 2025
8e17399
refactor(settlement-client): SettlmentClientError added for every any…
Mohiiit Feb 6, 2025
22e4586
fix(settlement-client): messagin tests working, new removed from Clie…
Mohiiit Feb 7, 2025
77ad470
refactor(settlement-client): clientTrait changed to settlementClientT…
Mohiiit Feb 7, 2025
a55eb4e
chore(settlment-client): resolving comments regarding automock and na…
Mohiiit Feb 7, 2025
156bd33
chore(settlement-client): comments resolved in starknet settlement cl…
Mohiiit Feb 11, 2025
911cb87
chore(settlement-client): starknet test working
Mohiiit Feb 12, 2025
949826c
chore(settlement-client): cargo.toml cleaned
Mohiiit Feb 12, 2025
46ece21
chore(github-workflow): workflow updated to use cached madara binary
Mohiiit Feb 12, 2025
4cc7b99
chore: linting and formatting
Mohiiit Feb 12, 2025
4d6ef19
fix(settlement-client): madara drop issue fixed, linting and formatting
Mohiiit Feb 12, 2025
2b9ace3
Merge branch 'main' into l3-support
Mohiiit Feb 13, 2025
5664430
Merge branch 'main' into l3-support
Mohiiit Feb 25, 2025
b96b091
refactor(settlement-client): introducing trait specific error type
Mohiiit Feb 25, 2025
bdadcda
refactor(settlement-client): introducing common error to the rest of …
Mohiiit Feb 25, 2025
4d3489e
refactor(settlement-client): updating the context and other error han…
Mohiiit Feb 26, 2025
aee128b
refactor(settlement-client): error handling resolved
Mohiiit Feb 26, 2025
75a5692
chore: merging main with l3-support
Mohiiit Feb 26, 2025
039a73b
chore: main merged
Mohiiit Feb 26, 2025
eb85f68
chore: rust-toolchain updated
Mohiiit Feb 26, 2025
ecf3f8c
refactor(settlement-client): tests refactored to drop db
Mohiiit Feb 27, 2025
95cadd3
fix(test)(settlement-client): messaging test fixed
Mohiiit Feb 27, 2025
734df0d
linting: toml filed linted
Mohiiit Feb 28, 2025
b7ddb02
refactor(settlement-client): errors improved
Mohiiit Feb 28, 2025
d4fd1a2
fix(l1-txn): l2<>l3 messages were breaking because of the conversion,…
Mohiiit Feb 28, 2025
9750d43
chore(linting): formatting and linting, fixing one test
Mohiiit Feb 28, 2025
a45da29
Merge branch 'main' into l3-support
Mohiiit Mar 7, 2025
01d8dac
chore: merge issue fixed
Mohiiit Mar 7, 2025
631ac3f
chore: linting and formatting
Mohiiit Mar 7, 2025
debe4f1
chore: linting and formatting
Mohiiit Mar 7, 2025
ac13640
fix: test fixed
Mohiiit Mar 7, 2025
2143b56
fix: tests fixed
Mohiiit Mar 10, 2025
ea5c455
fix: fixing the port issue in the starknet
Mohiiit Mar 10, 2025
8f0eb38
fix(settlement-client): messaging test fixed to handle sync
Mohiiit Mar 11, 2025
180848f
fix(eth-client): verified block number implementation works
Mohiiit Mar 11, 2025
b71fe90
chore: ignoring the failing test for now
Mohiiit Mar 11, 2025
2012d89
changelog(orch): added
Mohiiit Mar 12, 2025
9b05b4a
refactor: moved converter function to mp_convert and added some docs,…
Mohiiit Mar 17, 2025
e666be1
refactor(settlement-client): try-from implemented for L1toL2 message
Mohiiit Mar 17, 2025
5788026
docs(settlement-client): added for utils of starknet and bytecode of …
Mohiiit Mar 17, 2025
7b25571
renamed(settlement-client): get_initial_state -> get_current_core_con…
Mohiiit Mar 17, 2025
afe5413
chore(settlment-client): docs added and comments resolved
Mohiiit Mar 17, 2025
ae51d7f
chore(settlement-client): expect statements improved, dead code remov…
Mohiiit Mar 18, 2025
640898b
chore(starknet-settlement-client): port assignment logic improved
Mohiiit Mar 18, 2025
0a2053a
chore: comments resolved
Mohiiit Mar 18, 2025
8e13a30
chore(ethereum-settlement-client): block range moved to const, error …
Mohiiit Mar 18, 2025
abf0166
Merge branch 'main' into l3-support
Mohiiit Mar 18, 2025
caa0f81
revert: changes made in cairo-test-contracts
Mohiiit Mar 18, 2025
df826e8
chore(cli): serilization and deserialization added for madara settlem…
Mohiiit Mar 18, 2025
2c9de51
chore(linting): cargo toml linted
Mohiiit Mar 18, 2025
5fd143c
chore(settlement-client): linting and settlement layer added in config
Mohiiit Mar 18, 2025
ecb7dce
chore: ETH changed to Eth in config.json
Mohiiit Mar 18, 2025
9ca71d8
chore: comment resolved
Mohiiit Mar 19, 2025
a9b0821
chore: main merged
Mohiiit Mar 28, 2025
330538d
chore: updating the madara binary location
Mohiiit Mar 29, 2025
259c340
chore: released the port for usuage
Mohiiit Mar 29, 2025
5febda7
chore(starknet-settlement-client): unique db path given for each test
Mohiiit Mar 29, 2025
61bad9c
chore(starknet-settlement-client): update the gateway port and delete…
Mohiiit Mar 29, 2025
cc33bd8
chore(fix): starknet settlement utils fixed
Mohiiit Mar 29, 2025
ee4c5fe
chore(starknet-settlement-client): adding an offset to the port as pe…
Mohiiit Mar 31, 2025
dc41227
chore(starknet-settlement-client): linting and formatting
Mohiiit Mar 31, 2025
cd0a0a5
chore: main merged
Mohiiit Apr 1, 2025
edac0fb
chore(ethereum-settlement-client): tests udpated as per main
Mohiiit Apr 1, 2025
5c9de2f
Merge branch 'main' into l3-support
Mohiiit Apr 1, 2025
a02fa31
chore: main merge conflict solved
Mohiiit Apr 2, 2025
febd3b9
Merge remote-tracking branch 'origin/main' into l3-support
Mohiiit Apr 3, 2025
ed07b76
chore: main merged
Mohiiit Apr 4, 2025
76104f7
chore: cherry picked the changes from the l1 txn PR
Mohiiit Apr 8, 2025
227b2f8
chore: last cherry pick
Mohiiit Apr 8, 2025
87c9421
Merge remote-tracking branch 'origin/main' into l3-support
Mohiiit Apr 9, 2025
f623510
fix(starknet-settlement-client): cancellation logic updated as per la…
Mohiiit Apr 9, 2025
d800b75
fix(starknet-settlement-client): updated as per the latest piltover c…
Mohiiit Apr 9, 2025
ba991dc
chore: unused stuff removed
Mohiiit Apr 9, 2025
ce91620
fix(starknet-settlement-client): fixed as per piltover
Mohiiit Apr 10, 2025
5841945
chore(starknet-settlement-client): updating timeout for madara spawning
Mohiiit Apr 10, 2025
7702a67
fix(starknet-settlement-client): hashing updated and test added
Mohiiit Apr 10, 2025
8e7465f
feat(starknet-settlement-client): test updated with real data
Mohiiit Apr 10, 2025
72bfe53
feat(starknet-settlement-client): using more randomness in the port a…
Mohiiit Apr 10, 2025
f3c9199
Merge remote-tracking branch 'origin/main' into l3-support
Mohiiit Apr 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ jobs:
with:
version: nightly

# TODO : For now madara binary is stored in aws s3 bucket :
# After the proper release binaries are implemented
# We can directly use that and we can remove this
# temporary AWS implementation
- name: Download madara binary for l2 client testing
run: |
curl -L https://madara-test-binary.s3.us-west-1.amazonaws.com/madara-linux -o ./test-artifacts/madara
chmod +x ./test-artifacts/madara

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we downloading a madara binary for testing instead of running against a build of the code in the pr?

- name: Build and run tests
env:
ETH_FORK_URL: ${{ secrets.ETH_FORK_URL }}
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/rust-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,24 @@ jobs:
- uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Launch Anvil
run: anvil --fork-url $ANVIL_FORK_URL --fork-block-number $ANVIL_BLOCK_NUMBER &
env:
ANVIL_FORK_URL: "https://eth.merkle.io"
ANVIL_BLOCK_NUMBER: 20395662
- name: Wait for Anvil to be ready
run: |
while ! nc -z localhost 8545; do
sleep 1
done
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure this is necessary? If I remember the rust unit tests should start anvil anyway no?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't write this in a way where it could be an infinite loop, this would be difficult to debug. At a minimum, a log statement before this (to help when it goes wrong) would help.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi!. Also I'd suggest wrapping this entire logic into a bash script (in /scripts) for reusability and the sake of a cleaner CI

# TODO : For now madara binary is stored in aws s3 bucket :
# After the proper release binaries are implemented
# We can directly use that and we can remove this
# temporary AWS implementation
- name: Download madara binary for l2 client testing
run: |
curl -L https://madara-test-binary.s3.us-west-1.amazonaws.com/madara-linux -o ./test-artifacts/madara
chmod +x ./test-artifacts/madara
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto


- name: Run unit tests
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@ tmp/
# Running madara with make and docker compose
.secrets
image.tar.gz

# madara test artifacts for testing l2 clients for appchains
test-artifacts/madara
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Next release

- fix(primitives): limit legacy class sizes
- feat : l3 support
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove it

- fix(block_production): dynamic block closing now adds special address with prev block hash
- fix(rpc): call, simulate, estimate rpcs executed on top of the block, not at the start of it
- fix(compilation): crate-level compilation
Expand Down
175 changes: 124 additions & 51 deletions Cargo.lock

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

9 changes: 4 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[workspace]
members = [
# madara
"crates/madara/client/db",
"crates/madara/client/exec",
"crates/madara/client/sync",
"crates/madara/client/eth",
"crates/madara/client/settlement_client",
"crates/madara/client/rpc",
"crates/madara/client/gateway/client",
"crates/madara/client/gateway/server",
Expand All @@ -31,11 +30,10 @@ members = [
resolver = "2"
# Everything except test-related packages, so that they are not compiled when doing `cargo build`.
default-members = [
# madara
"crates/madara/client/db",
"crates/madara/client/exec",
"crates/madara/client/sync",
"crates/madara/client/eth",
"crates/madara/client/settlement_client",
"crates/madara/client/gateway/client",
"crates/madara/client/gateway/server",
"crates/madara/client/rpc",
Expand Down Expand Up @@ -129,7 +127,7 @@ mc-rpc = { path = "crates/madara/client/rpc" }
mc-gateway-client = { path = "crates/madara/client/gateway/client" }
mc-gateway-server = { path = "crates/madara/client/gateway/server" }
mc-sync = { path = "crates/madara/client/sync" }
mc-eth = { path = "crates/madara/client/eth" }
mc-settlement-client = { path = "crates/madara/client/settlement_client" }
mc-mempool = { path = "crates/madara/client/mempool" }
mc-block-production = { path = "crates/madara/client/block_production" }
mc-block-import = { path = "crates/madara/client/block_import" }
Expand Down Expand Up @@ -222,6 +220,7 @@ dotenv = "0.15.0"
httpmock = "0.7.0"
tempfile = "3.10.1"
mockall = "0.13.0"
serial_test = "3.1.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

itertools = "0.13.0"
regex = "1.10.5"
bytes = "1.6.0"
Expand Down
Loading