Skip to content
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

Integration of Atlantic Service and HTTP Client Infrastructure #182

Merged
merged 49 commits into from
Nov 20, 2024
Merged
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
a1ccd2a
initialised atlantic service
byteZorvin Oct 9, 2024
1afa13b
feat: added l1 and l2 proving apis
byteZorvin Oct 10, 2024
09ac565
add header
byteZorvin Oct 10, 2024
55553f4
Merge branch 'main' into atlantic-integration
byteZorvin Oct 14, 2024
e887c73
feat:added testcases for atlantic service
byteZorvin Oct 15, 2024
e0f8781
chore: change to atlantic proving service
byteZorvin Oct 15, 2024
91cdc23
fix: change layout to 'starknet_with_keccak'
byteZorvin Oct 15, 2024
013bfe8
change layout to all_cairo for testing
byteZorvin Oct 16, 2024
0594c70
Merge branch 'main' into atlantic-integration
byteZorvin Oct 16, 2024
7a5bcaa
update gps verifier
byteZorvin Oct 16, 2024
dd53b05
chore: add program hash log
byteZorvin Oct 16, 2024
34889b7
fix: change program hash
byteZorvin Oct 16, 2024
e5b28be
ran formatter
byteZorvin Oct 16, 2024
02b0572
refactor init commit
apoorvsadana Oct 18, 2024
3a2ae80
broken http client
apoorvsadana Oct 18, 2024
287f448
refactor: http_client and prover services refactored
Nov 7, 2024
74c0c64
fix: build issue fixed with temp snos
Nov 7, 2024
da4ca88
merged: main
Nov 7, 2024
11fe253
chore: linting and formatting
Nov 7, 2024
c7fe17e
chore: todo added for later to change snos
Nov 7, 2024
76e66b2
refactor: atlantic test updated as pwe the new changes
Nov 7, 2024
185de15
chore: linting and removed print statements
Nov 7, 2024
d54ce74
refactor: prover-service renamed to prover-clients
Nov 7, 2024
4666168
changelog: updated
Nov 7, 2024
c9401cd
chore: formatting and linting
Nov 7, 2024
1a04d6e
fix: changing prover service to sharp
Nov 7, 2024
82bcef2
fix: adding proof layout to env file
Nov 7, 2024
2e72c73
fix: updated the prvoving zip
Nov 7, 2024
3bac79b
fix: program hash fixed and fact of the block registered
Nov 8, 2024
a254e8a
fix: sleep added after setting fact
Nov 8, 2024
c2308c5
refactor: toml files cleaning and http mock version update
Nov 9, 2024
135e83e
update: duplicate SNOS_PROOD_LAYOUT removed
Nov 9, 2024
30c13b3
changelog: updated
Nov 9, 2024
13af686
chore: linting
Nov 9, 2024
f227e72
fix: snos layout updated to dynamic
Nov 9, 2024
6aa726a
fix: linting and proof layout
Nov 9, 2024
639a918
refactor: added different layout name for snos and proving
Nov 9, 2024
684adab
fix: comments resolved, docker-compose deleted, request-builder updated
Nov 9, 2024
0df375d
changelog: updated
Nov 9, 2024
8fbedac
merged: main
Nov 9, 2024
606315f
resolved: comments and path updated in yaml for s3 download
Nov 9, 2024
a20ca26
refactor: replaced mock server with dummy url to create http client
Nov 9, 2024
f296a30
Merge branch 'main' into atlantic_refactor
Mohiiit Nov 12, 2024
a93afe0
fix: atlantic endpoint updated
Nov 14, 2024
751517d
refactor: atlantic test now use mock server
Nov 14, 2024
0d66cb2
refactor: main merged and refactored as per clap
Nov 20, 2024
234017b
fix: files added
Nov 20, 2024
4a6b03f
fix: env variable's name updated
Nov 20, 2024
3c7bb31
chores: removed extra print statement
Nov 20, 2024
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
Prev Previous commit
Next Next commit
merged: main
mohiiit committed Nov 7, 2024
commit da4ca88bdc3b56664b6b58b9ffaa09b51d0b1f20
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

HOST=
PORT=
MAX_BLOCK_TO_PROCESS=
SNOS_PROOF_LAYOUT=

##### AWS CONFIG #####
5 changes: 2 additions & 3 deletions .env.test
Original file line number Diff line number Diff line change
@@ -76,15 +76,14 @@ PROVER_TYPE="herodotus" # ("herodotus" | "starkware")
DA_LAYER="ethereum"
SETTLEMENT_LAYER="ethereum" # Should be either `ethereum` or `starknet`
SETTLEMENT_RPC_URL="https://eth-sepolia.public.blastapi.io"
MADARA_RPC_URL="http://81.16.176.130:9545"
MADARA_RPC_URL=http://localhost:9944
GPS_VERIFIER_CONTRACT_ADDRESS="0x07ec0D28e50322Eb0C159B9090ecF3aeA8346DFe"
ETHEREUM_PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
L1_CORE_CONTRACT_ADDRESS="0xE2Bb56ee936fd6433DC0F6e7e3b8365C906AA057"

##### SNOS #####
## This is needed right now because Madara doesn't support getProof
RPC_FOR_SNOS="http://81.16.176.130:9545"

RPC_FOR_SNOS="http://localhost:9545"

##### STARKNET SETTLEMENT #####
STARKNET_PRIVATE_KEY=0x76f2ccdb23f29bc7b69278e947c01c6160a31cf02c19d06d0f6e5ab1d768b86
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## Added

- upgrade ETH L1 bridge for withdrawals to work
- added makefile and submodules
- Endpoints for triggering processing and verification jobs
- Added Atlantic proving service integration
- Add multiple queues for processing and verification based on job type
- added logs
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion crates/orchestrator/src/jobs/snos_job/mod.rs
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ pub mod fact_info;
pub mod fact_node;
pub mod fact_topology;

const COMPILED_OS: &[u8] = include_bytes!("../../../../../build/os_latest.json");
pub const COMPILED_OS: &[u8] = include_bytes!("../../../../../build/os_latest.json");

#[derive(Error, Debug, PartialEq)]
pub enum SnosError {
1 change: 1 addition & 0 deletions crates/orchestrator/src/tests/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::net::SocketAddr;
use std::sync::Arc;

use axum::Router;
use cairo_vm::types::layout_name::LayoutName;
use da_client_interface::{DaClient, MockDaClient};
use httpmock::MockServer;
8 changes: 5 additions & 3 deletions crates/settlement-clients/ethereum/src/lib.rs
Original file line number Diff line number Diff line change
@@ -255,9 +255,11 @@ impl SettlementClient for EthereumSettlementClient {
let tx: TxEip4844 = TxEip4844 {
chain_id,
nonce,
gas_limit: 30_000_000,
max_fee_per_gas: (eip1559_est.max_fee_per_gas * 10).to_string().parse()?,
max_priority_fee_per_gas,
// we noticed Starknet uses the same limit on mainnet
// https://etherscan.io/tx/0x8a58b936faaefb63ee1371991337ae3b99d74cb3504d73868615bf21fa2f25a1
gas_limit: 5_500_000,
max_fee_per_gas: add_safety_margin(max_fee_per_gas, 5),
max_priority_fee_per_gas: add_safety_margin(max_priority_fee_per_gas, 5),
to: self.core_contract_client.contract_address(),
value: U256::from(0),
access_list: AccessList(vec![]),
7 changes: 1 addition & 6 deletions e2e-tests/tests.rs
Original file line number Diff line number Diff line change
@@ -46,9 +46,7 @@ struct Setup {

impl Setup {
/// Initialise a new setup
pub async fn new() -> Self {
color_eyre::install().expect("Unable to install color_eyre");

pub async fn new(l2_block_number: String) -> Self {
let mongo_db_instance = MongoDbServer::run().await;
println!("✅ Mongo DB setup completed");

@@ -130,7 +128,6 @@ async fn test_orchestrator_workflow(#[case] l2_block_number: String) {
// Fetching the env vars from the test env file as these will be used in
// setting up of the test and during orchestrator run too.
dotenvy::from_filename(".env.test").expect("Failed to load the .env file");
env_logger::init();

let mut setup_config = Setup::new(l2_block_number.clone()).await;
// Setup S3
@@ -155,8 +152,6 @@ async fn test_orchestrator_workflow(#[case] l2_block_number: String) {

println!("✅ Orchestrator setup completed.");

log::trace!("Trace.......General process job started for block");

// Run orchestrator
let mut orchestrator = Orchestrator::run(setup_config.envs());
orchestrator.wait_till_started().await;
2 changes: 1 addition & 1 deletion madara
2 changes: 1 addition & 1 deletion pathfinder
Submodule pathfinder updated 42 files
+16 −26 crates/common/src/error.rs
+0 −6 crates/common/src/receipt.rs
+2 −164 crates/common/src/state_update.rs
+14 −18 crates/executor/src/types.rs
+0 −2 crates/gateway-types/src/reply.rs
+0 −14 crates/make-stream/src/lib.rs
+4 −27 crates/merkle-tree/src/class.rs
+5 −53 crates/merkle-tree/src/contract.rs
+8 −9 crates/merkle-tree/src/contract_state.rs
+120 −207 crates/merkle-tree/src/tree.rs
+1 −1 crates/p2p/src/builder.rs
+42 −48 crates/p2p/src/client/conv.rs
+13 −52 crates/p2p/src/client/peer_agnostic.rs
+2 −12 crates/p2p/src/client/peer_agnostic/fixtures.rs
+0 −1 crates/p2p_proto/proto/class.proto
+0 −1 crates/p2p_proto/proto/transaction.proto
+5 −26 crates/p2p_proto/src/class.rs
+20 −25 crates/p2p_proto/src/transaction.rs
+2 −2 crates/pathfinder/examples/re_execute.rs
+1 −7 crates/pathfinder/src/p2p_network/sync_handlers.rs
+3 −3 crates/pathfinder/src/p2p_network/sync_handlers/tests.rs
+1 −0 crates/pathfinder/src/state.rs
+18 −7 crates/pathfinder/src/state/sync.rs
+4 −4 crates/pathfinder/src/sync.rs
+12 −7 crates/pathfinder/src/sync/checkpoint.rs
+0 −27 crates/pathfinder/src/sync/checkpoint/fixture.rs
+0 −4 crates/pathfinder/src/sync/error.rs
+8 −209 crates/pathfinder/src/sync/state_updates.rs
+6 −2 crates/pathfinder/src/sync/track.rs
+6 −23 crates/rpc/src/dto/fee.rs
+5 −11 crates/rpc/src/dto/receipt.rs
+5 −4 crates/rpc/src/lib.rs
+80 −120 crates/rpc/src/method/estimate_fee.rs
+8 −12 crates/rpc/src/method/estimate_message_fee.rs
+92 −76 crates/rpc/src/method/get_storage_proof.rs
+17 −33 crates/rpc/src/pathfinder/methods/get_proof.rs
+31 −46 crates/rpc/src/v06/method/estimate_fee.rs
+8 −12 crates/rpc/src/v06/method/estimate_message_fee.rs
+4 −4 crates/rpc/src/v06/method/simulate_transactions.rs
+0 −1 crates/rpc/src/v08.rs
+0 −1 crates/storage/src/connection/transaction.rs
+0 −1 crates/storage/src/test_utils.rs
You are viewing a condensed version of this merge commit. You can view the full changes here.