Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Grammatical corrections in eth-types #1708

Merged
merged 4 commits into from
Dec 18, 2023
Merged
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
4 changes: 2 additions & 2 deletions eth-types/src/evm_types/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ impl Memory {
}

/// Reads an entire [`Word`] which starts at the provided [`MemoryAddress`]
/// `addr` and finnishes at `addr + 32`.
/// `addr` and finishes at `addr + 32`.
pub fn read_word(&self, addr: MemoryAddress) -> Word {
Word::from_big_endian(&self.read_chunk(addr, MemoryAddress::from(32)))
}
Expand Down Expand Up @@ -359,7 +359,7 @@ impl Memory {

/// Copy source data to memory. Used in (ext)codecopy/calldatacopy.
pub fn copy_from(&mut self, dst_offset: Word, src_offset: Word, length: Word, data: &[u8]) {
// Reference go-ethereum `opCallDataCopy` function for defails.
// Reference go-ethereum `opCallDataCopy` function for details.
// https://github.com/ethereum/go-ethereum/blob/bb4ac2d396de254898a5f44b1ea2086bfe5bd193/core/vm/instructions.go#L299

// `length` should be checked for overflow during gas cost calculation.
Expand Down
2 changes: 1 addition & 1 deletion eth-types/src/evm_types/opcode_ids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ impl OpcodeId {
let (min_stack_ptr, max_stack_ptr): (u32, u32) = match self {
// `min_stack_pointer` 0 means stack overflow never happen, for example, `OpcodeId::ADD`
// can only encounter underflow error, but never encounter overflow error.
// `max_stack_pointer` means max stack poniter for op code normally run. for example,
// `max_stack_pointer` means max stack pointer for op code normally run. for example,
// `OpcodeId::ADD` 's max stack pointer is 1022, when actual sp > 1022, will
// encounter underflow error.
OpcodeId::STOP => (0, 1024),
Expand Down
2 changes: 1 addition & 1 deletion eth-types/src/sign_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn sign(
let mut x_bytes = [0u8; 64];
x_bytes[..32].copy_from_slice(&x_repr[..]);

let sig_r = secp256k1::Fq::from_uniform_bytes(&x_bytes); // get x cordinate (E::Base) on E::Scalar
let sig_r = secp256k1::Fq::from_uniform_bytes(&x_bytes); // get x coordinate (E::Base) on E::Scalar
let sig_s = randomness_inv * (msg_hash + sig_r * sk);
(sig_r, sig_s)
}
Expand Down
Loading