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

Removes unused gaslimit flag #1680

Closed
wants to merge 1 commit into from
Closed

Removes unused gaslimit flag #1680

wants to merge 1 commit into from

Conversation

otherview
Copy link
Contributor

Why this change is needed

Flag is not used

What changes were made as part of this PR

Please provide a high level list of the changes made

PR checks pre-merging

Please indicate below by ticking the checkbox that you have read and performed the required
PR checks

  • PR checks reviewed and performed

Copy link

coderabbitai bot commented Dec 4, 2023

Walkthrough

The overall change across the codebase involves the removal of the GasLimit configuration and handling logic. This includes the elimination of GasLimit fields from various structs, the removal of related parameters from function signatures, and the deletion of associated initialization and assignment code. The changes suggest a significant refactoring or redesign in how gas limits are managed, potentially centralizing control or abstracting it away from these parts of the system.

Changes

File(s) Summary
go/config/enclave_config.go
go/enclave/container/cli.go
integration/simulation/devnetwork/node.go
integration/simulation/network/network_utils.go
Removed GasLimit field from structs and related initialization logic.
go/enclave/components/batch_executor.go
go/enclave/components/interfaces.go
go/enclave/nodetype/validator.go
Modified method signatures to remove gasLimit parameter and updated related logic.
go/enclave/components/rollup_compression.go Removed a line setting GasLimit for calldataRollupHeader, indicating a change in rollup compression gas limit handling.
go/enclave/enclave.go Removed BatchGasLimit parameter from NewEnclave function call.
go/enclave/nodetype/sequencer.go Removed reference to BatchGasLimit in createGenesisBatch method.

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

@otherview
Copy link
Contributor Author

@coderabbitai pause

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.

Review Status

Actionable comments generated: 4

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between fb50c7b and 6f9fef1.
Files selected for processing (10)
  • go/config/enclave_config.go (3 hunks)
  • go/enclave/components/batch_executor.go (1 hunks)
  • go/enclave/components/interfaces.go (1 hunks)
  • go/enclave/components/rollup_compression.go (1 hunks)
  • go/enclave/container/cli.go (3 hunks)
  • go/enclave/enclave.go (1 hunks)
  • go/enclave/nodetype/sequencer.go (1 hunks)
  • go/enclave/nodetype/validator.go (1 hunks)
  • integration/simulation/devnetwork/node.go (1 hunks)
  • integration/simulation/network/network_utils.go (1 hunks)
Additional comments: 12
go/config/enclave_config.go (2)
  • 6-11: > 💡 NOTE

Codebase verification is a beta feature.

The removal of the GasLimit field from the EnclaveConfig struct and associated changes have been confirmed. However, the import of "github.com/ethereum/go-ethereum/params" is still present in other parts of the codebase, indicating that it is still required and should not be removed.

  • 66-71: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [66-98]

The summary provided earlier mentions the removal of the GasLimit field from the EnclaveConfig struct, but the hunks do not show this change. Please verify if the summary is accurate or if the hunks provided are incomplete.

go/enclave/components/batch_executor.go (1)
  • 298-310: The removal of the gasLimit parameter from the CreateGenesisState method aligns with the PR objective to remove the unused gaslimit flag from the codebase.
go/enclave/components/interfaces.go (1)
  • 76-79: The change in the CreateGenesisState method signature is consistent with the PR objective of removing the unused gaslimit flag. Ensure that all implementations and calls to this interface method have been updated accordingly.
go/enclave/container/cli.go (3)
  • 40-43: The removal of the GasLimit field from the EnclaveConfigToml struct aligns with the PR objective to remove the unused gaslimit flag from the codebase.

  • 73-75: The addition of maxRollupSize and baseFee flags and the renaming of coinbaseAddress flag from gasLimit are not mentioned in the PR objective or the summary. Please verify if these changes are intended and if they should be documented in the PR summary.

  • 109-111: The assignment of values to cfg.MaxRollupSize, cfg.BaseFee, and cfg.GasPaymentAddress is not mentioned in the PR objective or the summary. Please verify if these changes are intended and if they should be documented in the PR summary.

go/enclave/enclave.go (1)
  • 222-226: The changes in the nodetype.SequencerSettings struct initialization within the NewEnclave function do not appear to be related to the PR objective of removing an unused gaslimit flag. Please verify that these changes are intended and relevant to the PR's goal.
go/enclave/nodetype/sequencer.go (1)
  • 138-143: The update to the createGenesisBatch method call is consistent with the PR objective to remove the gaslimit flag from the codebase.
go/enclave/nodetype/validator.go (1)
  • 135-139: The changes to the handleGenesis function correctly reflect the PR's objective to remove the gasLimit parameter, which is consistent with the broader goal of eliminating the unused gasLimit flag from the codebase.
integration/simulation/devnetwork/node.go (1)
  • 180-185: The removal of the GasLimit parameter from the createEnclaveContainer method aligns with the PR objective and the summary provided. This change is consistent and appears to be correctly implemented in the hunk.
integration/simulation/network/network_utils.go (1)
  • 94-97: The summary does not mention the addition of MaxBatchSize, MaxRollupSize, and BaseFee fields to the EnclaveConfig struct. These additions should be documented as they represent a change in the configuration and potential behavior of the enclave.

go/enclave/components/rollup_compression.go Show resolved Hide resolved
go/enclave/components/batch_executor.go Show resolved Hide resolved
go/enclave/components/batch_executor.go Show resolved Hide resolved
go/enclave/nodetype/sequencer.go Show resolved Hide resolved
@tudor-malene
Copy link
Collaborator

@otherview , status of this PR?

@otherview
Copy link
Contributor Author

Closed in pref of #1682

@otherview otherview closed this Dec 19, 2023
@otherview otherview deleted the pedro/remove_gaslimit branch December 19, 2023 13:52
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