Skip to content

Commit 2c19e16

Browse files
authored
Merge pull request #96 from weaveVM/dev
merge: dev to main
2 parents f4fbc06 + d96bd65 commit 2c19e16

File tree

6 files changed

+24
-24
lines changed

6 files changed

+24
-24
lines changed

.github/workflows/gcp-docker.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ jobs:
7575
push: false # Do not push in this step
7676
load: true # Load the image into Docker cache
7777
tags: |
78-
wevm:local
79-
us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.get-tag.outputs.short_ref }}
80-
us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.tag.outputs.tag }}
81-
cache-from: type=registry,ref=us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.tag.outputs.tag }}
82-
cache-to: type=registry,ref=us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.tag.outputs.tag }},mode=max
78+
wvm:local
79+
us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wvm:${{ steps.get-tag.outputs.short_ref }}
80+
us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wvm:${{ steps.tag.outputs.tag }}
81+
cache-from: type=registry,ref=us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wvm:${{ steps.tag.outputs.tag }}
82+
cache-to: type=registry,ref=us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wvm:${{ steps.tag.outputs.tag }},mode=max
8383

8484
# 8. Test Docker Image Using Local Tag
8585
- name: Test Docker
@@ -100,12 +100,12 @@ jobs:
100100
with:
101101
push: true # Enable pushing
102102
tags: |
103-
us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.get-tag.outputs.short_ref }}
104-
us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.tag.outputs.tag }}
105-
cache-from: type=registry,ref=us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.tag.outputs.tag }}
106-
cache-to: type=registry,ref=us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wevm:${{ steps.tag.outputs.tag }},mode=max
103+
us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wvm:${{ steps.get-tag.outputs.short_ref }}
104+
us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wvm:${{ steps.tag.outputs.tag }}
105+
cache-from: type=registry,ref=us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wvm:${{ steps.tag.outputs.tag }}
106+
cache-to: type=registry,ref=us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wvm:${{ steps.tag.outputs.tag }},mode=max
107107

108108
# 10. Clean Up Local Docker Tags (Optional)
109109
- name: Remove Local Tag
110110
if: always() # Run regardless of previous step outcomes
111-
run: docker rmi wevm:local || true
111+
run: docker rmi wvm:local || true

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ RUN cargo chef cook --profile $BUILD_PROFILE --features "$FEATURES" --recipe-pat
3434
COPY . .
3535
RUN cd /app/wvm-apps/wvm-exexed
3636
WORKDIR /app/wvm-apps/wvm-exexed
37-
RUN cargo build --profile $BUILD_PROFILE --features "$FEATURES" --locked --bin reth
37+
RUN cargo build --profile $BUILD_PROFILE --features "$FEATURES" --bin reth
3838

3939
# ARG is not resolved in COPY so we have to hack around it by copying the
4040
# binary to a temporary location

book/run/config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ max_blocks = 500000
125125
# The maximum number of state changes to keep in memory before the execution stage commits.
126126
max_changes = 5000000
127127
# The maximum cumulative amount of gas to process before the execution stage commits.
128-
max_cumulative_gas = 15000000000000 # WVM: 300_000_000 * 50_000_000
128+
max_cumulative_gas = 25000000000000 # WVM: 500_000_000 * 50_000_000
129129
# The maximum time spent on blocks processing before the execution stage commits.
130130
max_duration = '10m'
131131
```

crates/chainspec/src/constants.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use crate::spec::DepositContract;
22
use alloy_primitives::{address, b256};
33

44
/// Gas per transaction not creating a contract.
5-
/// WVM: Raised from 21k to 500_000k
6-
pub const MIN_TRANSACTION_GAS: u64 = 500_000u64;
5+
/// WVM: Raised from 21k to 500_000_000
6+
pub const MIN_TRANSACTION_GAS: u64 = 500_000_000u64;
77
/// Deposit contract address: `0x00000000219ab540356cbb839cbe05303d7705fa`
88
pub(crate) const MAINNET_DEPOSIT_CONTRACT: DepositContract = DepositContract::new(
99
address!("00000000219ab540356cbb839cbe05303d7705fa"),

crates/ethereum/evm/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl ConfigureEvmEnv for EthEvmConfig {
7474
transact_to: TxKind::Call(contract),
7575
// Explicitly set nonce to None so revm does not do any nonce checks
7676
nonce: None,
77-
// WVM: 300_000_000 gas limit
77+
// WVM: 500_000_000 gas limit
7878
gas_limit: *ETHEREUM_BLOCK_GAS_LIMIT,
7979
value: U256::ZERO,
8080
data,

crates/primitives-traits/src/constants/mod.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,8 @@ pub const BEACON_NONCE: u64 = 0u64;
4747
/// See <https://github.com/paradigmxyz/reth/issues/3233>.
4848
/// WVM: we set 300kk gas limit
4949
pub const ETHEREUM_BLOCK_GAS_LIMIT: LazyCell<u64> = LazyCell::new(|| {
50-
let env_gas_limit = std::env::var("ETHEREUM_BLOCK_GAS_LIMIT");
51-
if let Ok(gas_limit) = env_gas_limit {
52-
gas_limit.as_str().parse::<u64>().unwrap()
53-
} else {
54-
300_000_000
55-
}
56-
}); // WVM: 300_000_000 gas limit
50+
500_000_000
51+
}); // WVM: 500_000_000 gas limit
5752

5853
/// The minimum tx fee below which the txpool will reject the transaction.
5954
///
@@ -66,14 +61,19 @@ pub const ETHEREUM_BLOCK_GAS_LIMIT: LazyCell<u64> = LazyCell::new(|| {
6661
/// significant harm in leaving this setting as is.
6762
// pub const MIN_PROTOCOL_BASE_FEE: u64 = 7;
6863

69-
pub static MIN_PROTOCOL_BASE_FEE: LazyLock<AtomicU64> = LazyLock::new(|| AtomicU64::new(7));
64+
// WVM: min base fee 7 => 500k
65+
pub static MIN_PROTOCOL_BASE_FEE: LazyLock<AtomicU64> = LazyLock::new(|| AtomicU64::new(500_000u64));
7066

7167
pub(crate) static WVM_FEE_MANAGER: LazyLock<Arc<WvmFeeManager>> = LazyLock::new(|| {
7268
let fee = WvmFee::new(Some(Box::new(move |price| {
7369
let original_price = price as f64 / 1_000_000_000f64;
7470
let lowest_possible_gas_price_in_gwei =
7571
raw_calculate_lowest_possible_gas_price(original_price, *ETHEREUM_BLOCK_GAS_LIMIT);
76-
let to_wei = lowest_possible_gas_price_in_gwei * 1e9;
72+
let mut to_wei = lowest_possible_gas_price_in_gwei * 1e9;
73+
// WVM: minimum fee check
74+
if to_wei < 500_000f64 {
75+
to_wei = 500_000f64;
76+
}
7777
MIN_PROTOCOL_BASE_FEE.store(to_wei as u64, SeqCst);
7878
Ok(())
7979
})));

0 commit comments

Comments
 (0)