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

Commit

Permalink
Grammatical corrections in eth-types (#1708)
Browse files Browse the repository at this point in the history
Hello I am learning web3 programming, I went through some of the code
because I was told zk is fascinating (and it is). I found some little
errors in comments, nothing important. I hope you don't mind opening a
PR for such a little thing, I read the contributing file and didn't find
it being forbidden, but even if it is little I hope i'll help you even
just a bit in your research. Thank you for making that repo public. Have
a nice day.
  • Loading branch information
fakefraud authored Dec 18, 2023
1 parent ef14352 commit 734e430
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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

0 comments on commit 734e430

Please sign in to comment.