8000 release: prepare v1.0.0-beta.0 by beer-1 · Pull Request #362 · initia-labs/initia · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

release: prepare v1.0.0-beta.0 #362

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

Merged
merged 3 commits into from
Mar 10, 2025
Merged

release: prepare v1.0.0-beta.0 #362

merged 3 commits into from
Mar 10, 2025

Conversation

beer-1
Copy link
Member
@beer-1 beer-1 commented Mar 10, 2025

Description

Closes: #XXXX


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

@beer-1 beer-1 self-assigned this Mar 10, 2025
@beer-1 beer-1 requested a review from a team as a code owner March 10, 2025 10:41
Copy link
coderabbitai bot commented Mar 10, 2025

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • go.mod is excluded by !**/*.mod

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

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

📝 Walkthrough

Walkthrough

This update adjusts several constants and keyring configurations within the application. The coin type constant in the core configuration has been modified, and the upgrade version identifier has been updated to reflect a beta release. Additionally, the keyring options for CLI commands have been refined by replacing a generic option with one specific to Ethereum Secp256k1, alongside a new function to override the default key type.

Changes

File(s) Change Summary
app/const.go Updated constant CoinType from 118 to 60.
app/upgrade.go Updated constant upgradeName from "0.7.3" to "v1.0.0-beta.0".
cmd/.../root.go Changed keyring configuration from cryptokeyring.Option() to cryptokeyring.EthSecp256k1Option() and replaced keys.Commands() with cryptokeyring.OverrideDefaultKeyType(keys.Commands()).
crypto/.../options.go Removed Option() function and added OverrideDefaultKeyType(cmd *cobra.Command) to set the default key type to eth_secp256k1.

Sequence Diagram(s)

sequenceDiagram
    participant CLI as "CLI"
    participant Root as "root.go"
    participant KR as "keyring/options.go"

    CLI->>Root: Initialize command
    Root->>KR: Apply EthSecp256k1 keyring option
    Root->>KR: Invoke OverrideDefaultKeyType on key commands
    KR-->>Root: Return command with updated default key type
    Root-->>CLI: CLI ready with new key configuration
Loading

Possibly related PRs

Poem

I'm a rabbit coding in the moonlight,
Hopping through constants with all my might.
Upgrading coins and keys on the run,
With EthSecp256k1 shining like the sun.
CLI trails are now set just right,
A happy hop in code, pure delight!
((\ ( -.-) o_(")(")


🪧 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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 using 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 generate docstrings to generate docstrings for this 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.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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.

Copy link
github-actions bot commented Mar 10, 2025

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 2 package(s) with unknown licenses.
See the Details below.

License Issues

go.mod

PackageVersionLicenseIssue Type
github.com/initia-labs/OPinit1.0.0-beta.1NullUnknown License
github.com/initia-labs/OPinit/api1.0.0-beta.1NullUnknown License
Denied Licenses: GPL-1.0-or-later, LGPL-2.0-or-later

OpenSSF Scorecard

PackageVersionScoreDetails
gomod/github.com/cosmos/iavl 1.2.5-0.20250306174232-6cfb3dac2c71 🟢 6.6
Details
CheckScoreReason
Security-Policy🟢 10security policy file detected
Maintained🟢 1014 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 10all changesets reviewed
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Packaging⚠️ -1packaging workflow not detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Vulnerabilities🟢 46 existing vulnerabilities detected
SAST🟢 10SAST tool is run on all commits
gomod/github.com/initia-labs/OPinit 1.0.0-beta.1 UnknownUnknown
gomod/github.com/initia-labs/OPinit/api 1.0.0-beta.1 UnknownUnknown

Scanned Files

  • go.mod

Copy link
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b025d30 and b7f0abf.

⛔ Files ignored due to path filters (2)
  • go.mod is excluded by !**/*.mod
  • go.sum is excluded by !**/*.sum, !**/*.sum
📒 Files selected for processing (4)
  • app/const.go (1 hunks)
  • app/upgrade.go (1 hunks)
  • cmd/initiad/root.go (2 hunks)
  • crypto/keyring/options.go (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: Run test and upload codecov
  • GitHub Check: golangci-lint
  • GitHub Check: Run test and upload codecov
  • GitHub Check: golangci-lint
  • GitHub Check: Analyze (go)
🔇 Additional comments (5)
app/upgrade.go (1)

10-10: Version bump to v1.0.0-beta.0

This upgrade name change from the previous version to v1.0.0-beta.0 aligns with the PR's purpose of preparing for this release. Ensure that all necessary migrations and changes are included in this upgrade handler.

crypto/keyring/options.go (2)

3-8: Added cobra import for command overrides

The import of the cobra package is required for the new OverrideDefaultKeyType function.


37-54:

✅ Verification successful

New function to set eth_secp256k1 as default key type

This new function overrides the default key type for commands to use Ethereum Secp256k1. This is a user-facing change that affects how keys are generated by default.

Key observations:

  • The function iterates through all subcommands to find the key type flag
  • It sets the default value to eth_secp256k1
  • It panics if the flag value cannot be set, which is appropriate for initialization

🏁 Script executed:

#!/bin/bash
# Check for any usages of key types in the codebase that might be affected
echo "Checking existing key type references..."
rg "KeyType|key-type" --type go

Length of output: 4314


Override Default Key Type for Commands Confirmed

The implementation of OverrideDefaultKeyType in crypto/keyring/options.go properly iterates over the subcommands, identifies the key type flag, and updates its default value to eth_secp256k1 using hd.EthSecp256k1Type. Our repository scan confirms that this approach is consistent with other references (e.g., in crypto/ethsecp256k1/ethsecp256k1.go and crypto/hd/algorithm.go). Additionally, panicking on error during initialization is acceptable here to prevent misconfiguration.

  • File: crypto/keyring/options.go (Lines: 37-54)
  • Key update: Default key type is correctly updated for all subcommands.
  • Consistency: Confirmed by scanning for key type references across the codebase.

Approved as-is.

cmd/initiad/root.go (2)

92-92: Changed to use EthSecp256k1Option for keyring

Switched from a generic Option() to the specific EthSecp256k1Option(), which configures the keyring to prefer Ethereum-compatible keys. This aligns with the coin type change to 60.


196-196:

✅ Verification successful

Applied default key type override to key commands

Now wrapping the keys.Commands() with OverrideDefaultKeyType to ensure all key-related commands default to eth_secp256k1 key type, consistent with the other changes in this PR.


🏁 Script executed:

#!/bin/bash
# Let's check how this might affect existing keys commands
echo "Checking key commands that might be affected by the default key type change..."
./initiad keys --help 2>/dev/null || echo "Command not available in sandbox"

# Check if there are any references to the old key type that might need updating
echo "Checking for any hardcoded references to secp256k1 that might need updating..."
rg "secp256k1" --type go

Length of output: 22551


Default key type override correctly applied to key commands
The update at cmd/initiad/root.go:196 now wraps keys.Commands() with cryptokeyring.OverrideDefaultKeyType, ensuring that key-related commands use the eth_secp256k1 type by default. Our search for hardcoded references to secp256k1 indicates that remaining references—in particular within test files—are consistent with this change and do not require further updates.

Copy link
codecov bot commented Mar 10, 2025

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 41.14%. Comparing base (b025d30) to head (2433a4e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crypto/keyring/options.go 0.00% 10 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #362      +/-   ##
==========================================
- Coverage   41.15%   41.14%   -0.01%     
==========================================
  Files         269      269              
  Lines       25800    25805       +5     
==========================================
  Hits        10618    10618              
- Misses      13527    13532       +5     
  Partials     1655     1655              
Files with missing lines Coverage Δ
app/upgrade.go 50.00% <ø> (ø)
crypto/keyring/options.go 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@beer-1 beer-1 merged commit ad20224 into main Mar 10, 2025
11 of 12 checks passed
@beer-1 beer-1 deleted the release/v1.0 branch March 10, 2025 11:56
@coderabbitai coderabbitai bot mentioned this pull request Mar 21, 2025
11 tasks
@coderabbitai coderabbitai bot mentioned this pull request Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0