Skip to content

Commit 72a770b

Browse files
chore: remove outdated TODOs (#42)
## What ❔ <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- The `Why` has to be clear to non-Matter Labs entities running their own ZK Chain --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Is this a breaking change? - [ ] Yes - [ ] No ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted.
1 parent 130c204 commit 72a770b

File tree

7 files changed

+1
-19
lines changed

7 files changed

+1
-19
lines changed

basic_bootloader/src/bootloader/account_models/contract.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,6 @@ where
140140

141141
*resources = resources_after_main_tx;
142142

143-
// TODO: when to purge memory?
144-
// system.purge_return_memory();
145-
146143
let res = if reverted {
147144
ExecutionResult::Revert {
148145
output: returndata_region,

basic_bootloader/src/bootloader/account_models/eoa.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,6 @@ where
183183
// panic is not reachable, validated by the structure
184184
let from = transaction.from.read();
185185

186-
// TODO: setup metadata for next tx based on out convention and TX fields
187-
188186
let main_calldata = transaction.calldata();
189187

190188
assert!(callstack.len() == 0);

basic_bootloader/src/bootloader/constants.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ pub const ERC20_ALLOWANCE_SELECTOR: &[u8] = &[0xdd, 0x62, 0xed, 0x3e];
6363
pub const ERC20_APPROVE_SELECTOR: &[u8] = &[0x09, 0x5e, 0xa7, 0xb3];
6464

6565
// Value taken from system-contracts, to adjust.
66-
// TODO: make sure this covers cost for L1 log.
6766
pub const L1_TX_INTRINSIC_L2_GAS: usize = 11000;
6867

6968
// Includes storing the l1 tx log.

basic_bootloader/src/bootloader/process_transaction.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ where
191191
}
192192
r
193193
}
194-
// TODO: reconsider for L1 txs!
195194
// Out of native is converted to a top-level revert and
196195
// gas is exhausted.
197196
Err(FatalError::OutOfNativeResources) => {
@@ -398,8 +397,6 @@ where
398397
execution_result
399398
};
400399

401-
// TODO: notify result?
402-
403400
Ok(execution_result)
404401
}
405402

basic_bootloader/src/bootloader/runner.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,6 @@ where
568568
// Caller gave away all it's resources into deployment parameters, and in preparation function
569569
// we will charge for deployment, compute address and potentially increment nonce
570570

571-
// TODO frame was started here
572-
573571
let ee_type = match &caller_vm {
574572
Some(vm) => vm.ee_type(),
575573
None => self.initial_ee_version,
@@ -877,7 +875,6 @@ where
877875
})
878876
}
879877

880-
// TODO: all the gas computation in this function seems very EVM-specific.
881878
// It should be split into EVM and generic part.
882879
/// Run call preparation, which includes reading the callee parameters
883880
/// and charging for resources.
@@ -926,7 +923,6 @@ where
926923

927924
// Positive value cost and stipend
928925
let stipend = if !is_delegate && !call_request.nominal_token_value.is_zero() {
929-
// TODO: add native cost
930926
let positive_value_cost =
931927
S::Resources::from_ergs(Ergs(CALLVALUE * ERGS_PER_GAS));
932928
resources.charge(&positive_value_cost)?;

crypto/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ num-integer = { version = "0.1", default-features = false }
6060
proptest = "1.0.0"
6161
hex-literal = "0.4.1"
6262
ark-test-curves = { version = "0.5.0", features = ["secp256k1", "bls12_381_curve"] }
63+
rand_core = { version = "0.6.4", features = ["getrandom"] }
6364

6465
# addchain = { git = "https://github.com/VictorArcium/addchain" }
6566
# num-bigint = { version = "0.3" }
@@ -78,4 +79,3 @@ single_round_with_control = ["blake2s_u32/blake2_with_compression"]
7879
blake2s_tests = []
7980
secp256k1-static-context = []
8081
alloc = []
81-

evm_interpreter/src/native_resource_constants.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,11 @@
22
pub const ADD_NATIVE_COST: u64 = 140;
33
pub const MUL_NATIVE_COST: u64 = 400;
44
pub const SUB_NATIVE_COST: u64 = 140;
5-
//TODO: mean,median are ~500, need more precise computation?
65
pub const DIV_NATIVE_COST: u64 = 1500;
7-
//TODO: mean,median are ~600, need more precise computation?
86
pub const SDIV_NATIVE_COST: u64 = 1000;
9-
//TODO: mean,median are ~600, need more precise computation?
107
pub const MOD_NATIVE_COST: u64 = 1300;
118
pub const SMOD_NATIVE_COST: u64 = 800;
12-
//TODO: mean,median are ~600, need more precise computation?
139
pub const ADDMOD_NATIVE_COST: u64 = 1700;
14-
//TODO: mean,median are ~700, need more precise computation?
1510
pub const MULMOD_NATIVE_COST: u64 = 2300;
1611
pub const EXP_BASE_NATIVE_COST: u64 = 700;
1712
pub const EXP_PER_BYTE_NATIVE_COST: u64 = 5_000;

0 commit comments

Comments
 (0)