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

Set pubdata constants to 0 + add result files #24

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion core/lib/constants/src/fees/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub struct IntrinsicSystemGasConstants {

/// The amount of gas we need to pay for each non-zero pubdata byte.
/// Note that it is bigger than 16 to account for potential overhead
pub const L1_GAS_PER_PUBDATA_BYTE: u32 = 17;
pub const L1_GAS_PER_PUBDATA_BYTE: u32 = 0;

/// The amount of pubdata that is strictly guaranteed to be available for a block
pub const GUARANTEED_PUBDATA_IN_TX: u32 = 100000;
Expand Down
3 changes: 2 additions & 1 deletion core/lib/multivm/src/versions/vm_1_3_2/vm_with_bootloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ use crate::vm_1_3_2::{
// fill these values in the similar fasion as other overhead-related constants
pub const BLOCK_OVERHEAD_GAS: u32 = 1200000;
pub const BLOCK_OVERHEAD_L1_GAS: u32 = 1000000;
pub const BLOCK_OVERHEAD_PUBDATA: u32 = BLOCK_OVERHEAD_L1_GAS / L1_GAS_PER_PUBDATA_BYTE;
// pub const BLOCK_OVERHEAD_PUBDATA: u32 = BLOCK_OVERHEAD_L1_GAS / L1_GAS_PER_PUBDATA_BYTE;
pub const BLOCK_OVERHEAD_PUBDATA: u32 = 0;

pub const MAX_BLOCK_MULTIINSTANCE_GAS_LIMIT: u32 = 300_000_000;

Expand Down
3 changes: 2 additions & 1 deletion core/lib/multivm/src/versions/vm_latest/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ const INITIAL_BASE_PAGE: u32 = 8;
pub const BOOTLOADER_HEAP_PAGE: u32 = heap_page_from_base(MemoryPage(INITIAL_BASE_PAGE)).0;
pub const BLOCK_OVERHEAD_GAS: u32 = 1200000;
pub const BLOCK_OVERHEAD_L1_GAS: u32 = 1000000;
pub const BLOCK_OVERHEAD_PUBDATA: u32 = BLOCK_OVERHEAD_L1_GAS / L1_GAS_PER_PUBDATA_BYTE;
// pub const BLOCK_OVERHEAD_PUBDATA: u32 = BLOCK_OVERHEAD_L1_GAS / L1_GAS_PER_PUBDATA_BYTE;
pub const BLOCK_OVERHEAD_PUBDATA: u32 = 0;

/// VM Hooks are used for communication between bootloader and tracers.
/// The 'type' / 'opcode' is put into VM_HOOK_POSITION slot,
Expand Down
12 changes: 10 additions & 2 deletions core/lib/multivm/src/versions/vm_latest/oracles/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,17 @@ fn get_pubdata_price_bytes(initial_value: U256, final_value: U256, is_initial: b
compress_with_best_strategy(initial_value, final_value).len() as u32;

if is_initial {
(BYTES_PER_DERIVED_KEY as u32) + compressed_value_size
println!("is initial");
let pubdata_price_bytes = (BYTES_PER_DERIVED_KEY as u32) + compressed_value_size;
println!("pubdata_price_bytes: {}", pubdata_price_bytes);
pubdata_price_bytes
// (BYTES_PER_DERIVED_KEY as u32) + compressed_value_size
} else {
(BYTES_PER_ENUMERATION_INDEX as u32) + compressed_value_size
println!("is repeated");
let pubdata_price_bytes = (BYTES_PER_ENUMERATION_INDEX as u32) + compressed_value_size;
println!("pubdata_price_bytes: {}", pubdata_price_bytes);
pubdata_price_bytes
// (BYTES_PER_ENUMERATION_INDEX as u32) + compressed_value_size
}
}

Expand Down
3 changes: 2 additions & 1 deletion core/lib/multivm/src/versions/vm_m5/vm_with_bootloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ use crate::vm_m5::{
// fill these values in the similar fasion as other overhead-related constants
pub const BLOCK_OVERHEAD_GAS: u32 = 1200000;
pub const BLOCK_OVERHEAD_L1_GAS: u32 = 1000000;
pub const BLOCK_OVERHEAD_PUBDATA: u32 = BLOCK_OVERHEAD_L1_GAS / L1_GAS_PER_PUBDATA_BYTE;
// pub const BLOCK_OVERHEAD_PUBDATA: u32 = BLOCK_OVERHEAD_L1_GAS / L1_GAS_PER_PUBDATA_BYTE;
pub const BLOCK_OVERHEAD_PUBDATA: u32 = 0;

pub const MAX_BLOCK_MULTIINSTANCE_GAS_LIMIT: u32 = 300_000_000;

Expand Down
4 changes: 2 additions & 2 deletions core/lib/multivm/src/versions/vm_m6/vm_with_bootloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ use crate::vm_m6::{
// fill these values in the similar fasion as other overhead-related constants
pub const BLOCK_OVERHEAD_GAS: u32 = 1200000;
pub const BLOCK_OVERHEAD_L1_GAS: u32 = 1000000;
pub const BLOCK_OVERHEAD_PUBDATA: u32 = BLOCK_OVERHEAD_L1_GAS / L1_GAS_PER_PUBDATA_BYTE;

// pub const BLOCK_OVERHEAD_PUBDATA: u32 = BLOCK_OVERHEAD_L1_GAS / L1_GAS_PER_PUBDATA_BYTE;
pub const BLOCK_OVERHEAD_PUBDATA: u32 = 0;
pub const MAX_BLOCK_MULTIINSTANCE_GAS_LIMIT: u32 = 300_000_000;

/// `BlockContext` is a structure that contains parameters for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ const INITIAL_BASE_PAGE: u32 = 8;
pub const BOOTLOADER_HEAP_PAGE: u32 = heap_page_from_base(MemoryPage(INITIAL_BASE_PAGE)).0;
pub const BLOCK_OVERHEAD_GAS: u32 = 1200000;
pub const BLOCK_OVERHEAD_L1_GAS: u32 = 1000000;
pub const BLOCK_OVERHEAD_PUBDATA: u32 = BLOCK_OVERHEAD_L1_GAS / L1_GAS_PER_PUBDATA_BYTE;

// pub const BLOCK_OVERHEAD_PUBDATA: u32 = BLOCK_OVERHEAD_L1_GAS / L1_GAS_PER_PUBDATA_BYTE;
pub const BLOCK_OVERHEAD_PUBDATA: u32 = 0;
/// VM Hooks are used for communication between bootloader and tracers.
/// The 'type' / 'opcode' is put into VM_HOOK_POSITION slot,
/// and VM_HOOKS_PARAMS_COUNT parameters (each 32 bytes) are put in the slots before.
Expand Down
3 changes: 2 additions & 1 deletion core/lib/multivm/src/versions/vm_virtual_blocks/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ const INITIAL_BASE_PAGE: u32 = 8;
pub const BOOTLOADER_HEAP_PAGE: u32 = heap_page_from_base(MemoryPage(INITIAL_BASE_PAGE)).0;
pub(crate) const BLOCK_OVERHEAD_GAS: u32 = 1200000;
pub(crate) const BLOCK_OVERHEAD_L1_GAS: u32 = 1000000;
pub const BLOCK_OVERHEAD_PUBDATA: u32 = BLOCK_OVERHEAD_L1_GAS / L1_GAS_PER_PUBDATA_BYTE;
// pub const BLOCK_OVERHEAD_PUBDATA: u32 = BLOCK_OVERHEAD_L1_GAS / L1_GAS_PER_PUBDATA_BYTE;
pub const BLOCK_OVERHEAD_PUBDATA: u32 = 0;

/// VM Hooks are used for communication between bootloader and tracers.
/// The 'type' / 'opcode' is put into VM_HOOK_POSITION slot,
Expand Down
6 changes: 6 additions & 0 deletions core/tests/ts-integration/src/diff_output.txt

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions core/tests/ts-integration/src/diff_validium.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/tests/ts-integration/src/rollup_output.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/tests/ts-integration/src/validium_output.txt

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading