-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add DA_SIGNING_ADDRESSES support in configuration and scripts #21
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @randygrok, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new configuration option, Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request adds support for DA_SIGNING_ADDRESSES. The changes in the docker-compose files and the .env file are correct. However, I have a couple of points regarding the shell scripts.
In entrypoint.sequencer.sh, there's a minor inconsistency in the command-line flag naming that could be confusing. More importantly, in entrypoint.da.sh, a change was made to how TxWorkerAccounts is updated, making it global instead of scoped to the [State] section. This is a potentially risky change that could lead to misconfiguration, and it's inconsistent with the script's own logging and comments. I've left detailed comments on these points.
| # Check if TxWorkerAccounts exists anywhere in the config | ||
| if grep -q "^[[:space:]]*TxWorkerAccounts[[:space:]]*=" "$LIGHT_NODE_CONFIG_PATH"; then | ||
| # TxWorkerAccounts exists, check if it's set to 8 | ||
| CURRENT_VALUE=$(grep -A 20 "^\[State\]" "$LIGHT_NODE_CONFIG_PATH" | grep "^[[:space:]]*TxWorkerAccounts" | head -1 | sed 's/.*=[[:space:]]*//') | ||
| CURRENT_VALUE=$(grep "^[[:space:]]*TxWorkerAccounts[[:space:]]*=" "$LIGHT_NODE_CONFIG_PATH" | head -1 | sed 's/.*=[[:space:]]*//') | ||
| if [ "$CURRENT_VALUE" != "8" ]; then | ||
| log "CONFIG" "Updating TxWorkerAccounts from $CURRENT_VALUE to 8" | ||
| # Update the value to 8 (only under [State] section) | ||
| if ! sed -i '/^\[State\]/,/^\[/ s/^[[:space:]]*TxWorkerAccounts[[:space:]]*=.*/ TxWorkerAccounts = 8/' "$LIGHT_NODE_CONFIG_PATH"; then | ||
| # Update the value to 8 | ||
| if ! sed -i 's/^[[:space:]]*TxWorkerAccounts[[:space:]]*=.*/ TxWorkerAccounts = 8/' "$LIGHT_NODE_CONFIG_PATH"; then |
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.
The logic for checking and updating TxWorkerAccounts has been changed from being scoped to the [State] section to being global. This could lead to unintended side effects if TxWorkerAccounts is a valid configuration key in other sections of the config.toml file. The log messages and comments (e.g., line 77) still refer to the [State] section, which is now misleading.
The original implementation was safer in its intent, though the grep -A 20 was fragile. The logic should be reverted to be scoped to the [State] section, but using a more robust method. For example, you could use sed -n '/^\[State\]/,/^\[/p' "$FILE" | grep ... to check for the key within the section, and a similar sed command with a range to perform the update.
| fi | ||
|
|
||
| if [ -n "${DA_SIGNING_ADDRESSES:-}" ]; then | ||
| default_flags="$default_flags --rollkit.da.signing_addresses $DA_SIGNING_ADDRESSES" |
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.
The flag for signing addresses, --rollkit.da.signing_addresses, uses a different prefix (rollkit.da) compared to other DA-related flags in this script, which use evnode.da (e.g., --evnode.da.address on line 170). While this might be intentional, this inconsistency can be confusing for users configuring the service. If possible, it would be beneficial for maintainability to align the flag prefixes. If they must be different, a comment explaining why could be helpful.
Overview
This goes hand in hand with
evstack/ev-node#2785