Skip to content

Commit

Permalink
fix: boojum integration nightly rust (#177)
Browse files Browse the repository at this point in the history
Co-authored-by: MexicanAce <[email protected]>
  • Loading branch information
AntonD3 and MexicanAce authored Oct 26, 2023
1 parent b929315 commit 1d1effa
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 33 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
tags:
- 'v*'
pull_request:
branches: [main]
branches: [boojum-integration]
workflow_dispatch:

jobs:
Expand All @@ -16,15 +16,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install latest nightly
uses: dtolnay/rust-toolchain@stable
- name: Install rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
toolchain: nightly-2023-07-21
components: rustfmt, clippy

- name: Rust Cache
uses: Swatinem/rust-cache@v2

- uses: actions/setup-node@v3
with:
node-version: 18.x
Expand All @@ -43,14 +40,11 @@ jobs:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable

- name: Rust Cache
uses: Swatinem/rust-cache@v2
toolchain: nightly-2023-07-21

- name: Build Code
run: make all
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Get latest version of stable Rust
run: rustup update stable
- name: Set version of nightly Rust
run: rustup default nightly-2023-07-21
- name: Install target
run: rustup target add ${{ matrix.arch }}
- uses: Swatinem/rust-cache@v2
Expand Down
17 changes: 7 additions & 10 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: run

on:
push:
branches: [main]
branches: [boojum-integration]
tags:
- 'v*'
pull_request:
branches: [main]
branches: [boojum-integration]
workflow_dispatch:
jobs:
test:
Expand All @@ -21,15 +21,12 @@ jobs:
uses: actions/checkout@v3

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly-2023-07-21

- name: Cache Rust Dependencies
uses: Swatinem/rust-cache@v2

- name: Install cargo-nextest
run: cargo +stable install cargo-nextest
run: cargo install cargo-nextest

- name: Run tests
run: cargo nextest run
2 changes: 1 addition & 1 deletion e2e-tests/test/zks-apis.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe("zks_estimateFee", function () {
const response: Fee = await provider.send("zks_estimateFee", [transaction]);

// Assert
expect(ethers.BigNumber.from(response.gas_limit)).to.eql(ethers.BigNumber.from("1230957"), "Unexpected gas_limit");
expect(ethers.BigNumber.from(response.gas_limit)).to.eql(ethers.BigNumber.from("1231992"), "Unexpected gas_limit");
expect(ethers.BigNumber.from(response.gas_per_pubdata_limit)).to.eql(
ethers.BigNumber.from("4080"),
"Unexpected gas_per_pubdata_limit"
Expand Down
9 changes: 2 additions & 7 deletions src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,14 +478,9 @@ impl<S: std::fmt::Debug + ForkSource> InMemoryNodeInner<S> {
let execution_mode = TxExecutionMode::EstimateFee;
let (mut batch_env, _) = self.create_l1_batch_env(storage.clone());
batch_env.l1_gas_price = l1_gas_price;
let impersonating = if self
let impersonating = self
.impersonated_accounts
.contains(&l2_tx.common_data.initiator_address)
{
true
} else {
false
};
.contains(&l2_tx.common_data.initiator_address);
let system_env = self.create_system_env(
self.system_contracts
.contracts_for_fee_estimate(impersonating)
Expand Down

0 comments on commit 1d1effa

Please sign in to comment.