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

Fix grammar errors in utilities documentation #5105

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

a1111198
Copy link

@a1111198 a1111198 commented Jul 5, 2024

This pull request addresses several grammar errors in the documentation of utilities.

Changes made:

  • "himself owner of" to "they are the owner of"
  • "an piece" to "a piece"
  • "however other signature algorithms" to "however, other signature algorithms"
  • "These are often generated via" to "These are often generated through"
  • "in that they use a different" to "in that they use different"
  • "these values don't exceed its size" to "these values don't exceed their size"
  • "each of this chunks" to "each of these chunks"
  • "However, this approach requires to load such struct" to "However, this approach requires loading such a struct"
  • "These properties of the storage allows for a technique known as" to "These properties of the storage allow for a technique known as"

I have ensured the changes adhere to the engineering guidelines and all tests and linters have been run successfully.

Copy link

changeset-bot bot commented Jul 5, 2024

⚠️ No Changeset found

Latest commit: 1e335ed

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Member

@ernestognw ernestognw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for your PR. Mostly looks good but I'd like to take the opportunity to update the reference to web3.js if you don't mind.

docs/modules/ROOT/pages/utilities.adoc Outdated Show resolved Hide resolved
a1111198 and others added 2 commits July 15, 2024 17:35
This commit updates the ECDSA documentation to reference the more current `ethers` and `viem` libraries for generating Ethereum account ECDSA signatures.

Changes made:
- Updated reference from `web3.eth.sign` to `signMessage` function in the ethers library and viem documentation.

These changes provide more relevant and up-to-date information for developers using the ECDSA functions.

I have ensured that the updated links point to the correct sections of the ethers and viem documentation.

Co-authored-by: Ernesto García <ernestognw@gmail.com>
ernestognw
ernestognw previously approved these changes Jul 16, 2024
Copy link
Member

@ernestognw ernestognw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ernestognw ernestognw changed the title Fix grammar errors in documentation Fix grammar errors in utilities documentation Jul 16, 2024
@ernestognw ernestognw requested a review from Amxx August 30, 2024 03:16
@@ -8,11 +8,11 @@ Here are some of the more popular ones.

=== Checking Signatures On-Chain

At a high level, signatures are a set of cryptographic algorithms that allow for a _signer_ to prove himself owner of a _private key_ used to authorize an piece of information (generally a transaction or `UserOperation`). Natively, the EVM supports the Elliptic Curve Digital Signature Algorithm (https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm[ECDSA]) using the secp256k1 curve, however other signature algorithms such as P256 and RSA are supported.
At a high level, signatures are a set of cryptographic algorithms that allow for a _signer_ to prove they are the owner of a _private key_ used to authorize a piece of information (generally a transaction or `UserOperation`). Natively, the EVM supports the Elliptic Curve Digital Signature Algorithm (https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm[ECDSA]) using the secp256k1 curve, however, other signature algorithms such as P256 and RSA are supported.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
At a high level, signatures are a set of cryptographic algorithms that allow for a _signer_ to prove they are the owner of a _private key_ used to authorize a piece of information (generally a transaction or `UserOperation`). Natively, the EVM supports the Elliptic Curve Digital Signature Algorithm (https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm[ECDSA]) using the secp256k1 curve, however, other signature algorithms such as P256 and RSA are supported.
At a high level, signatures are a set of cryptographic algorithms that allow for a _signer_ to prove they have access to the _private key_ used to authorize a piece of information (generally a transaction or `UserOperation`). Natively, the EVM supports the Elliptic Curve Digital Signature Algorithm (https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm[ECDSA]) using the secp256k1 curve, however, other signature algorithms such as P256 and RSA are supported.

@@ -34,7 +34,7 @@ WARNING: Getting signature verification right is not trivial: make sure you full

P256, also known as secp256r1, is one of the most used signature schemes. P256 signatures are standardized by the National Institute of Standards and Technology (NIST) and it's widely available in consumer hardware and software.

These signatures are different to regular Ethereum Signatures (secp256k1) in that they use a different elliptic curve to perform operations but have similar security guarantees.
These signatures are different to regular Ethereum Signatures (secp256k1) in that they use different elliptic curve to perform operations but have similar security guarantees.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "use a different elliptic curve" is correct here. You would drop the a if it was multiple curves.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
These signatures are different to regular Ethereum Signatures (secp256k1) in that they use different elliptic curve to perform operations but have similar security guarantees.
These signatures are different to regular Ethereum Signatures (secp256k1) in that they use different elliptic curves to perform operations but have similar security guarantees.


Commonly, developers pack values using structs that place values together so they fit better in storage. However, this approach requires to load such struct from either calldata or memory. Although sometimes necessary, it may be useful to pack values in a single slot and treat it as a packed value without involving calldata or memory.
Commonly, developers pack values using structs that place values together so they fit better in storage. However, this approach requires loading such a struct from either calldata or memory. Although sometimes necessary, it may be useful to pack values in a single slot and treat it as a packed value without involving calldata or memory.
Copy link
Collaborator

@Amxx Amxx Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets discuss the content here. Packing is done in storage. Memory and Calldata do not pack values.

What does it mean that packing "requires loading such a struct from either calldata or memory" ?

When you do packing, that is reading/writting to storage. This is a storage <> stack thing (sstore/sload). The packing is prepared on the stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants