Skip to content

Commit

Permalink
Merge branch 'main' into repro-verify-docker
Browse files Browse the repository at this point in the history
  • Loading branch information
rauljordan committed Jul 1, 2024
2 parents 8981de4 + 7d013b9 commit 4fe1ba2
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 8 deletions.
9 changes: 5 additions & 4 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Location:
prover/src/binary.rs:493:9, data: None)
```

To read more about what counts as valid vs. invalid user WASM programs, see [VALID_WASM](./VALID_WASM.md).
To read more about what counts as valid vs. invalid user WASM programs, see [VALID_WASM](./check/VALID_WASM.md).

If your program succeeds, you'll see the following message:

Expand Down Expand Up @@ -213,7 +213,7 @@ Brotli-compressed, Stylus program WASM binaries must fit within the **24Kb** [co
We recommend optimizing your Stylus program's sizes to smaller sizes, but keep in mind the safety tradeoffs of using some of the more advanced optimizations. However, some small programs when compiled to much smaller sizes can suffer performance penalties.
For a deep-dive into the different options for optimizing binary sizes using cargo stylus, see [OPTIMIZING_BINARIES.md](./OPTIMIZING_BINARIES.md).
For a deep-dive into the different options for optimizing binary sizes using cargo stylus, see [OPTIMIZING_BINARIES.md](./check/OPTIMIZING_BINARIES.md).
## License
Expand Down
2 changes: 1 addition & 1 deletion check/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ enum Apis {
#[derive(Args, Clone, Debug)]
struct CommonConfig {
/// Arbitrum RPC endpoint.
#[arg(short, long, default_value = "https://stylusv2.arbitrum.io/rpc")]
#[arg(short, long, default_value = "https://sepolia-rollup.arbitrum.io/rpc")]
endpoint: String,
/// Whether to use stable Rust.
#[arg(long)]
Expand Down
1 change: 1 addition & 0 deletions replay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ libc.workspace = true
libloading.workspace = true
parking_lot.workspace = true
rustc-host.workspace = true
serde = { version = "1.0.203", features = ["derive"] }
sneks.workspace = true
tokio.workspace = true
19 changes: 18 additions & 1 deletion replay/src/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ use ethers::{
types::{
GethDebugTracerType, GethDebugTracingOptions, GethTrace, Transaction, TransactionReceipt,
},
utils::__serde_json::Value,
utils::__serde_json::{from_value, Value},
};
use eyre::{bail, Result};
use serde::{Deserialize, Serialize};
use sneks::SimpleSnakeNames;
use std::{collections::VecDeque, mem};

Expand Down Expand Up @@ -44,6 +45,17 @@ impl Trace {
bail!("malformed tracing result")
};

if let Value::Array(arr) = json.clone() {
if arr.is_empty() {
bail!("No trace frames found, perhaps you are attempting to trace the program deployment transaction");
}
}

let maybe_activation_trace: Result<Vec<ActivationTraceFrame>, _> = from_value(json.clone());
if maybe_activation_trace.is_ok() {
bail!("Your tx was a program activation transaction. It has no trace frames");
}

let to = receipt.to.map(|x| Address::from(x.0));
let top_frame = TraceFrame::parse_frame(to, json.clone())?;

Expand All @@ -63,6 +75,11 @@ impl Trace {
}
}

#[derive(Serialize, Deserialize)]
pub struct ActivationTraceFrame {
address: Value,
}

#[derive(Clone, Debug)]
pub struct TraceFrame {
steps: Vec<Hostio>,
Expand Down

0 comments on commit 4fe1ba2

Please sign in to comment.