Skip to content

Conversation

@randygrok
Copy link

Overview

This goes hand in hand with

evstack/ev-node#2785

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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, DA_SIGNING_ADDRESSES, to enable the specification of signing addresses for the Data Availability layer within the sequencer setup. This enhancement integrates the new variable across environment definitions and sequencer startup scripts, ensuring that the Rollkit DA component can be properly configured with the necessary signing addresses. Additionally, a minor improvement was made to a DA entrypoint script to enhance the robustness of configuration updates.

Highlights

  • DA_SIGNING_ADDRESSES Configuration: Introduced a new environment variable, DA_SIGNING_ADDRESSES, to allow specifying signing addresses for the Data Availability layer.
  • Sequencer Integration: Updated sequencer deployment configurations for both Celestia and local DA, as well as the sequencer entrypoint script, to consume and utilize the DA_SIGNING_ADDRESSES variable, passing it as a --rollkit.da.signing_addresses flag.
  • Configuration Script Robustness: Improved the entrypoint.da.sh script to more broadly check and update the TxWorkerAccounts setting in the light node configuration, making the update less dependent on its exact placement within the file.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

Comment on lines +79 to +86
# 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
Copy link
Contributor

Choose a reason for hiding this comment

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

high

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"
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

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.

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.

2 participants