diff --git a/bins/revme/src/cmd/bytecode.rs b/bins/revme/src/cmd/bytecode.rs index 5f2ee694a4..52bdcb75c2 100644 --- a/bins/revme/src/cmd/bytecode.rs +++ b/bins/revme/src/cmd/bytecode.rs @@ -27,13 +27,14 @@ impl Cmd { return; } if bytes[0] == 0xEF { - let Ok(eof) = Eof::decode(bytes) else { - eprintln!("Invalid EOF bytecode"); - return; - }; - println!("Decode: {:#?}", eof); - let res = validate_eof_inner(&eof, None); - println!("Validation: {:#?}", res); + match Eof::decode(bytes) { + Ok(eof) => { + println!("Decoding: {:#?}", eof); + let res = validate_eof_inner(&eof, None); + println!("Validation: {:#?}", res); + } + Err(e) => eprintln!("Decoding Error: {:#?}", e), + } } else { print_eof_code(&bytes) } diff --git a/crates/interpreter/src/gas/calc.rs b/crates/interpreter/src/gas/calc.rs index 5e33c43fbf..2895bd28a5 100644 --- a/crates/interpreter/src/gas/calc.rs +++ b/crates/interpreter/src/gas/calc.rs @@ -287,7 +287,7 @@ pub const fn selfdestruct_cost(spec_id: SpecId, res: SelfDestructResult) -> u64 /// * Account access gas. after berlin it can be cold or warm. /// * Transfer value gas. If value is transferred and balance of target account is updated. /// * If account is not existing and needs to be created. After Spurious dragon -/// this is only accounted if value is transferred. +/// this is only accounted if value is transferred. #[inline] pub const fn call_cost( spec_id: SpecId, diff --git a/crates/precompile/src/bls12_381/pairing.rs b/crates/precompile/src/bls12_381/pairing.rs index e0c50dd834..a786a8b7dc 100644 --- a/crates/precompile/src/bls12_381/pairing.rs +++ b/crates/precompile/src/bls12_381/pairing.rs @@ -26,10 +26,12 @@ const INPUT_LENGTH: usize = 384; /// following structure: /// * 128 bytes of G1 point encoding /// * 256 bytes of G2 point encoding +/// /// Each point is expected to be in the subgroup of order q. /// Output is 32 bytes where first 31 bytes are equal to 0x00 and the last byte /// is 0x01 if pairing result is equal to the multiplicative identity in a pairing /// target field and 0x00 otherwise. +/// /// See also: pub(super) fn pairing(input: &Bytes, gas_limit: u64) -> PrecompileResult { let input_len = input.len(); diff --git a/crates/precompile/src/bls12_381/utils.rs b/crates/precompile/src/bls12_381/utils.rs index a2ed3cd885..b576fcc53f 100644 --- a/crates/precompile/src/bls12_381/utils.rs +++ b/crates/precompile/src/bls12_381/utils.rs @@ -56,11 +56,11 @@ pub(super) fn remove_padding(input: &[u8]) -> Result<&[u8; FP_LENGTH], Precompil /// /// From [EIP-2537](https://eips.ethereum.org/EIPS/eip-2537): /// * A scalar for the multiplication operation is encoded as 32 bytes by performing BigEndian -/// encoding of the corresponding (unsigned) integer. +/// encoding of the corresponding (unsigned) integer. /// /// We do not check that the scalar is a canonical Fr element, because the EIP specifies: /// * The corresponding integer is not required to be less than or equal than main subgroup order -/// `q`. +/// `q`. pub(super) fn extract_scalar_input(input: &[u8]) -> Result { if input.len() != SCALAR_LENGTH { return Err(PrecompileError::Other(format!( diff --git a/crates/revm/src/db/states/state.rs b/crates/revm/src/db/states/state.rs index b3f358914f..196565bb66 100644 --- a/crates/revm/src/db/states/state.rs +++ b/crates/revm/src/db/states/state.rs @@ -204,7 +204,7 @@ impl State { /// NOTE: If either: /// * The [State] has not been built with [StateBuilder::with_bundle_update], or /// * The [State] has a [TransitionState] set to `None` when - /// [State::merge_transitions] is called, + /// [State::merge_transitions] is called, /// /// this will panic. pub fn take_bundle(&mut self) -> BundleState {