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

imp(types): Add crypto and encoding packages #20

Merged
merged 15 commits into from
Aug 5, 2024
Merged

Conversation

MalteHerrmann
Copy link
Collaborator

@MalteHerrmann MalteHerrmann commented Aug 2, 2024

This PR moves the crypto package to the evmOS repository.
The PR has to be merged after #19.

Summary by CodeRabbit

  • New Features

    • Introduced functionality for handling cryptographic operations and key management within the evmOS environment.
    • Added support for new encoding and crypto packages to enhance security and data handling.
  • Bug Fixes

    • Updated capitalization in comments for consistency with the evmOS branding across various files.
  • Documentation

    • Updated the CHANGELOG to reflect recent improvements and additions.
  • Tests

    • Introduced benchmark and unit tests for new cryptographic functionalities and HD wallet operations.

@MalteHerrmann MalteHerrmann requested a review from a team as a code owner August 2, 2024 20:35
@MalteHerrmann MalteHerrmann requested review from hanchon and GAtom22 and removed request for a team August 2, 2024 20:35
Copy link

coderabbitai bot commented Aug 2, 2024

Important

Review skipped

Auto reviews are limited to specific labels.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The recent updates enhance the evmOS framework by refining naming conventions, introducing new cryptographic functionalities, and improving encoding capabilities. Notable additions include support for secp256k1 keys, hierarchical deterministic wallets, and robust testing for various components. Comment improvements and dependency updates further streamline the codebase, ensuring clarity and reinforcing project alignment with current standards.

Changes

Files Change Summary
.github/workflows/*.yml, Makefile Updated comments changing "Evmos" to "evmOS" for consistency.
CHANGELOG.md Added entries for new crypto and encoding packages, plus wallet types and Protobufs, enhancing security and type system support.
crypto/codec/*.go, crypto/ethsecp256k1/*.go, crypto/hd/*.go, crypto/keyring/*.go Introduced new files and functions for cryptographic operations, including key generation, serialization, and HD wallets.
crypto/ethsecp256k1/*.go New benchmark tests added for key generation and signature verification.
go.mod Added new dependencies for updated functionalities: btcsuite/btcd, btcsuite/btcd/btcutil, and tyler-smith/go-bip39.
utils/*.go Modified import paths for ethsecp256k1 to reflect new module structure.
ethereum/eip712/*.go Updated import paths and comments to replace "Ethermint" with "evmOS".

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Wallet
    participant KeyManager
    participant Codec

    User->>Wallet: Generate New Wallet
    Wallet->>KeyManager: Request Key Pair
    KeyManager->>Wallet: Return Key Pair
    Wallet->>Codec: Register Key Pair
    Codec-->>Wallet: Key Pair Registered
    Wallet-->>User: New Wallet Generated
Loading

🐇 In the meadow, changes bloom,
evmOS shines, dispelling gloom.
Keys now dance, wallets sing,
With cryptography, bright futures bring!
Through comments and code, we leap and bound,
In this joyful code, new wonders found! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the types label Aug 2, 2024
@MalteHerrmann MalteHerrmann changed the title imp(types): Add crypto package imp(types): Add crypto and encoding packages Aug 2, 2024
crypto/codec/codec.go Outdated Show resolved Hide resolved
encoding/config.go Outdated Show resolved Hide resolved
Copy link

@0xstepit 0xstepit left a comment

Choose a reason for hiding this comment

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

Did you branch out of PR 19? 😅 this contains also code for the wallet

@github-actions github-actions bot added the proto label Aug 5, 2024
crypto/codec/codec.go Outdated Show resolved Hide resolved
encoding/config.go Outdated Show resolved Hide resolved
@MalteHerrmann
Copy link
Collaborator Author

Did you branch out of PR 19? 😅 this contains also code for the wallet

I base these PR sequentially on each other and point to main for this PR but it was supposed to be to the parent PR :D now that PR is merged to main it's fine

@MalteHerrmann MalteHerrmann merged commit cff4d2a into main Aug 5, 2024
18 of 25 checks passed
@MalteHerrmann MalteHerrmann deleted the add-crypto branch August 5, 2024 12:16
@MalteHerrmann MalteHerrmann restored the add-crypto branch August 5, 2024 12:36
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.

2 participants