-
Notifications
You must be signed in to change notification settings - Fork 236
feat: add DAKeyName flag #1820
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
feat: add DAKeyName flag #1820
Conversation
WalkthroughThe changes introduce a new command-line flag Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI
participant Config
participant Node
User->>CLI: Run command with --rollkit.da_keyname
CLI->>Config: Parse command-line flags
Config->>Node: Set DAKeyName
Node-->>User: Execute blob transaction with specified keyname
Assessment against linked issues
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1820 +/- ##
==========================================
- Coverage 43.83% 43.80% -0.03%
==========================================
Files 76 76
Lines 10028 10030 +2
==========================================
- Hits 4396 4394 -2
- Misses 4897 4901 +4
Partials 735 735 ☔ View full report in Codecov by Sentry. |
| "--rollkit.da_mempool_ttl", "10", | ||
| "--rollkit.da_namespace", "namespace", | ||
| "--rollkit.da_start_height", "100", | ||
| "--rollkit.da_keyring_keyname", "my_celes_key", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "--rollkit.da_keyring_keyname", "my_celes_key", | |
| "--rollkit.da_keyring_keyname", null, |
I'm starting to think that it would be good to leave the default value null so that it only is used when someone intentionally sets the keyname. otherwise, it may accidentally redirect from key_node_is_running_with to my_celes_key default, instead of just sending requests to key_node_is_running_with. this flag is only going to be useful for those using multiaccounts on one light node / da service
da/da.md
Outdated
| * `--rollkit.da_address`: url address of the DA service (default: "grpc://localhost:26650") | ||
| * `--rollkit.da_auth_token`: authentication token of the DA service | ||
| * `--rollkit.da_namespace`: namespace to use when submitting blobs to the DA service | ||
| * `--rollkit.da_keyring_keyname`: keyring.keyname used when submitting blobs to the DA service (default: my_celes_key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * `--rollkit.da_keyring_keyname`: keyring.keyname used when submitting blobs to the DA service (default: my_celes_key) | |
| * `--rollkit.da_keyring_keyname`: keyring.keyname used when submitting blobs to the DA service (default: null) |
| {"DAMempoolTTL", nodeConfig.DAMempoolTTL, uint64(10)}, | ||
| {"DANamespace", nodeConfig.DANamespace, "namespace"}, | ||
| {"DAStartHeight", nodeConfig.DAStartHeight, uint64(100)}, | ||
| {"DAKeyringKeyname", nodeConfig.DAKeyringKeyname, "my_celes_key"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| {"DAKeyringKeyname", nodeConfig.DAKeyringKeyname, "my_celes_key"}, | |
| {"DAKeyringKeyname", nodeConfig.DAKeyringKeyname, null}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- cmd/rollkit/commands/run_node_test.go (2 hunks)
- cmd/rollkit/docs/rollkit_start.md (1 hunks)
- config/config.go (4 hunks)
- da/da.md (1 hunks)
Additional context used
golangci-lint
config/config.go
66-66: File is not
goimports-ed with -local github.com/rollkit(goimports)
Additional comments not posted (8)
da/da.md (1)
12-12: LGTM!The addition of the new command-line option
--rollkit.da_keynameis clear and aligns with the PR objectives.cmd/rollkit/commands/run_node_test.go (2)
36-36: LGTM!The addition of the new flag
--rollkit.da_keynameto the list of flags in theTestParseFlagsfunction is clear and aligns with the PR objectives.
88-88: LGTM!The addition of the new test case for
DAKeyNameto the list of test cases in theTestParseFlagsfunction is clear and aligns with the PR objectives.cmd/rollkit/docs/rollkit_start.md (1)
39-39: LGTM!The addition of the new command-line option
--rollkit.da_keynameto the list of options for therollkit startcommand is clear and aligns with the PR objectives.config/config.go (4)
31-32: LGTM!The addition of the
FlagDAKeyNameconstant follows the existing pattern for defining flags.
66-67: LGTM!The addition of the
DAKeyNamefield in theNodeConfigstruct follows the existing pattern for defining configuration fields.Tools
golangci-lint
66-66: File is not
goimports-ed with -local github.com/rollkit(goimports)
134-134: LGTM!The update in the
GetViperConfigmethod to retrieve the value forDAKeyNamefollows the existing pattern for retrieving configuration values.
160-160: LGTM!The addition of the new command-line flag for
DAKeyNamein theAddFlagsfunction follows the existing pattern for adding flags.
tzdybal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have similar concerns as in evstack/go-da#89
Moreover, the option is added, but is never used actually passed anywhere (as go-da dep is not updated).
| {"DAMempoolTTL", nodeConfig.DAMempoolTTL, uint64(10)}, | ||
| {"DANamespace", nodeConfig.DANamespace, "namespace"}, | ||
| {"DAStartHeight", nodeConfig.DAStartHeight, uint64(100)}, | ||
| {"DAKeyName", nodeConfig.DAKeyName, "my_celes_key"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where credible neutrality? 😭
IMHO empty default (aka. user has to provide someting, or da implementation can provide da-specific default) is a better solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed! I commented this but I think since I changed it to KeyName it has dissapeared 😶🌫️
Should I use null here?
|
This will be replaced by more generic approach (ref: evstack/go-da#92) |
|
sounds good! i had to try at least :) |
Overview
This adds DAKeyringKeyname flag, opinionated to use default
my_celes_key(which may need changes), to match MultiAccounts on celestia-node which were released in v0.15.0. https://github.com/celestiaorg/celestia-node/releases/tag/v0.15.0 celestiaorg/celestia-node#3349Partially resolves #1821
Pairs with evstack/go-da#89
TODO
keyName KeyNameSummary by CodeRabbit
New Features
--rollkit.da_keynamefor specifying a keyring keyname during blob submissions.rollkit startcommand documentation to include the new flag for improved usability.Bug Fixes
DAKeyNameconfiguration parameter is correctly set, improving test coverage.Documentation
--rollkit.da_keynameoption in the Rollkit configuration documentation.