Skip to content

Commit

Permalink
fix: debug the operator
Browse files Browse the repository at this point in the history
  • Loading branch information
eigmax committed Apr 23, 2024
1 parent e22de84 commit 0108305
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ rm -rf /tmp/chain
reth init --datadir /tmp/chain --chain testdata/chain.json
RUST_LOG="debug,evm=trace,consensus::auto=trace,consensus::engine=trace,rpc::eth=trace" reth node -d --chain testdata/chain.json --datadir /tmp/chain --auto-mine --http --http.port 8546 --http.api debug,eth,net,trace,web3,rpc
RUST_LOG="rpc::eth=trace" ZETH_DB_PATH=/tmp/chain ZETH_OPERATOR_DB=/tmp/operator PROVER_ADDR=localhost:50061 ZETH_L1_ADDR=http://localhost:8546 HOST=0.0.0.0:8182 cargo run -r
RUST_LOG="rpc::eth=trace" ZETH_DB_PATH=/tmp/chain ZETH_OPERATOR_DB=/tmp/operator PROVER_ADDR=localhost:50061 ZETH_L2_ADDR=http://localhost:8546 HOST=0.0.0.0:8182 cargo run -r
```


Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ where
async fn main() -> eyre::Result<()> {
env_logger::init();
let db_path = std::env::var("ZETH_OPERATOR_DB")?;
let l1addr = std::env::var("ZETH_L1_ADDR")?;
let l1addr = std::env::var("ZETH_L2_ADDR")?;
let prover_addr = std::env::var("PROVER_ADDR").unwrap_or("http://127.0.0.1:50061".to_string());
let mut op = operator::Operator::new(&db_path, &l1addr, &prover_addr);

Expand Down
5 changes: 2 additions & 3 deletions src/prover/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ enum ProveStep {
impl fmt::Display for ProveStep {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
ProveStep::Start => write!(f, "♥ stark"),
ProveStep::Start => write!(f, "♥ Start"),
ProveStep::Batch(no) => write!(f, "♦ Batch: {}", no),
ProveStep::Aggregate(s, e) => write!(f, "♠ Agg: {} -> {}", s, e),
ProveStep::Final(r) => write!(f, "♣ Final: {:?}", r),
Expand Down Expand Up @@ -222,8 +222,7 @@ impl ProverChannel {
gen_final_proof_response
.final_proof
.unwrap()
.encode(&mut final_proof)
.unwrap();
.encode(&mut final_proof)?;
self.final_proof_sender.send(final_proof).await?;
ProveStep::End
} else {
Expand Down

0 comments on commit 0108305

Please sign in to comment.