Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

feat(backend): allow pre eip-155 txs #1346

Merged
merged 12 commits into from
Dec 11, 2023
Merged

feat(backend): allow pre eip-155 txs #1346

merged 12 commits into from
Dec 11, 2023

Conversation

itsdevbear
Copy link

@itsdevbear itsdevbear commented Dec 11, 2023

Summary by CodeRabbit

  • New Features

    • Introduced telemetry tracking for mining metrics, mempool status, and transaction broadcast outcomes.
    • Enabled configuration for allowing unprotected transactions in the system.
  • Improvements

    • Enhanced system performance monitoring with new telemetry constants and time recording.
  • Documentation

    • Added SPDX license headers across various files for compliance with licensing requirements.
  • Bug Fixes

    • Removed an unnecessary flag from the startup command in the test application.
  • Refactor

    • Streamlined telemetry code by introducing new constants and deferred calls for better maintainability.
  • Configuration

    • Adjusted application configuration to enable telemetry by default.

Copy link

coderabbitai bot commented Dec 11, 2023

Walkthrough

The recent updates across various components of the Cosmos ecosystem focus on enhancing telemetry and metrics collection. Time tracking and telemetry functions have been added to several key areas, including mining operations, transaction handling, and Ethereum Virtual Machine (EVM) processing. Additionally, there's a notable change in the configuration to allow unprotected transactions, reflecting a shift in how transactions are managed and secured.

Changes

Files Summary
.../miner/miner.go, .../miner/telemetry.go, .../txpool/handler.go, .../txpool/telemetry.go, .../snapmulti/store.go, .../snapmulti/telemetry.go, .../evm/keeper/processor.go, .../evm/plugins/precompile/plugin.go, .../evm/plugins/precompile/telemetry.go, .../evm/types/keys.go Added telemetry and time tracking functionality, including new constants for metrics and telemetry increments.
.../runtime/runtime.go, eth/eth.go, eth/polar/api_backend.go, eth/polar/backend.go Removed or modified fields and parameters to accommodate the configuration for unprotected transactions.
e2e/testapp/entrypoint.sh, e2e/testapp/polard/cmd/commands.go Adjusted test application setup, including telemetry configuration and command flag changes.

🐇✨
In Cosmos' vast and starry night,
Telemetry's glow, a coder's delight.
Time ticks in code, metrics align,
Unprotected txs, now benign.
🌌🚀📊

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 X ?


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

@itsdevbear itsdevbear changed the title feat(backedn): allow pre eip-155 txs feat(backend): allow pre eip-155 txs Dec 11, 2023
@itsdevbear itsdevbear changed the base branch from main to telemetry December 11, 2023 04:13
@itsdevbear itsdevbear added merge me daddy Trigger Beradozer to bulldoze the PR backport/v0.0.2-alpha labels Dec 11, 2023
Copy link

codecov bot commented Dec 11, 2023

Codecov Report

Merging #1346 (a16e417) into telemetry (d301b86) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           telemetry    #1346   +/-   ##
==========================================
  Coverage      48.63%   48.63%           
==========================================
  Files             84       84           
  Lines           4914     4914           
==========================================
  Hits            2390     2390           
  Misses          2347     2347           
  Partials         177      177           

@itsdevbear itsdevbear requested review from ocnc and calbera December 11, 2023 13:06
Base automatically changed from telemetry to main December 11, 2023 17:24
@mergify mergify bot merged commit c53168f into main Dec 11, 2023
@mergify mergify bot deleted the allow-unprotect branch December 11, 2023 17:24
mergify bot pushed a commit that referenced this pull request Dec 11, 2023
## Summary by CodeRabbit

- **New Features**
  - Introduced telemetry tracking for mining metrics, mempool status, and transaction broadcast outcomes.
  - Enabled configuration for allowing unprotected transactions in the system.

- **Improvements**
  - Enhanced system performance monitoring with new telemetry constants and time recording.

- **Documentation**
  - Added SPDX license headers across various files for compliance with licensing requirements.

- **Bug Fixes**
  - Removed an unnecessary flag from the startup command in the test application.

- **Refactor**
  - Streamlined telemetry code by introducing new constants and deferred calls for better maintainability.

- **Configuration**
  - Adjusted application configuration to enable telemetry by default.

(cherry picked from commit c53168f)
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: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between c45cc9d and f6eaa98.
Files selected for processing (1)
  • eth/eth.go (3 hunks)
Additional comments: 3
eth/eth.go (3)
  • 97-104: The addition of the allowUnprotectedTxs parameter to the New function is consistent with the PR's objective to process pre-EIP-155 transactions. Ensure that the parameter is well-documented and that its usage is consistent throughout the codebase.

  • 116-123: The newGethExecutionLayer function now correctly includes the allowUnprotectedTxs parameter, which is necessary for the backend to handle pre-EIP-155 transactions. Ensure that this parameter is being handled correctly within the function.

  • 134-137: The polar.New function is invoked with the allowUnprotectedTxs parameter. Verify that the polar.New function has been updated to accept this new parameter and that it is correctly handled within the polar package.

Comment on lines 97 to +100
// as parameters. It returns a pointer to the ExecutionLayer and an error if any.
func New(
client string, cfg any, host pcore.PolarisHostChain,
engine consensus.Engine, logHandler log.Handler,
engine consensus.Engine, allowUnprotectedTxs bool, logHandler log.Handler,
Copy link

Choose a reason for hiding this comment

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

The allowUnprotectedTxs parameter has been added to the New function without accompanying documentation or comments. It is important to document new parameters to explain their purpose and usage for future maintainability and clarity.

  client string, cfg any, host pcore.PolarisHostChain,
+ // allowUnprotectedTxs enables the processing of transactions without EIP-155 protection.
  engine consensus.Engine, allowUnprotectedTxs bool, logHandler log.Handler,

Committable suggestion

IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
// as parameters. It returns a pointer to the ExecutionLayer and an error if any.
func New(
client string, cfg any, host pcore.PolarisHostChain,
engine consensus.Engine, logHandler log.Handler,
engine consensus.Engine, allowUnprotectedTxs bool, logHandler log.Handler,
// as parameters. It returns a pointer to the ExecutionLayer and an error if any.
func New(
client string, cfg any, host pcore.PolarisHostChain,
// allowUnprotectedTxs enables the processing of transactions without EIP-155 protection.
engine consensus.Engine, allowUnprotectedTxs bool, logHandler log.Handler,

itsdevbear pushed a commit that referenced this pull request Dec 11, 2023
This is an automatic backport of pull request #1346 done by
[Mergify](https://mergify.com).


---


<details>
<summary>Mergify commands and options</summary>

<br />

More conditions and actions can be found in the
[documentation](https://docs.mergify.com/).

You can also trigger Mergify actions by commenting on this pull request:

- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport <destination>` will backport this PR on
`<destination>` branch

Additionally, on Mergify [dashboard](https://dashboard.mergify.com) you
can:

- look at your merge queues
- generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com
</details>

Co-authored-by: Devon Bear <itsdevbear@berachain.com>
@itsdevbear
Copy link
Author

This pr has not been deployed to the private testnet. Please use the dedicated repo to report issues as to not leak rpc information online.

thanks!

@berachain berachain deleted a comment from 0xCalibur Dec 13, 2023
@0xCalibur
Copy link

This pr has not been deployed to the private testnet. Please use the dedicated repo to report issues as to not leak rpc information online.

thanks!

I added you as a contributor to the repo. You should have received a notification about it. Please confirm.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/v0.0.2-alpha merge me daddy Trigger Beradozer to bulldoze the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants