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

feat: upgrade rollkit-main #1479

Closed
wants to merge 88 commits into from
Closed

feat: upgrade rollkit-main #1479

wants to merge 88 commits into from

Conversation

jcstein
Copy link
Collaborator

@jcstein jcstein commented Feb 2, 2024

No description provided.

itsdevbear and others added 30 commits November 6, 2023 17:41
Minimal value add and added annoying overhead.



## Summary by CodeRabbit

- **Refactor**
	- Updated package import paths across the application from "pkg.berachain.dev" to "github.com/berachain".
- **Documentation**
	- Updated URLs for Codecov and pkg.go.dev badges in README.md.
- **Chores**
	- Adjusted source directory in proto_generate.sh script for correct proto files placement.
## Summary by CodeRabbit

The existing bullet-point list is still valid based on the provided instructions.
…#1300)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
	- Improved coin extraction logic to remove zero amounts and sort coins.
	- Enhanced coin validation process for better error handling.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Refactor**
	- Enhanced error recovery mechanism for better stability and reliability.
	- Improved error logging for easier troubleshooting and issue resolution.
There are some typos.


## Summary by CodeRabbit

- **Refactor**
  - Updated terminology for clarity in the codebase, including renaming interfaces and methods to better reflect their purpose.
  
- **Documentation**
  - Improved log messages for more accurate debugging information.
  - Removed duplicate comments to enhance code maintainability.
  - Updated comments to align with the renamed functions and variables for consistency.

- **Style**
  - Made minor adjustments to comments for consistency in naming conventions.
## Summary by CodeRabbit

- **Documentation**
	- Updated licensing terms to grant additional rights for using Polaris software with Rollkit for blockchain rollup activities, including modification and distribution under specific conditions.
this is bad but required


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved error handling for transaction processing, allowing for
smoother handling of non-Ethereum transactions.

- **Tests**
- Updated test cases to reflect new behavior in transaction processing,
ensuring non-Ethereum transactions are accepted without errors.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Ran `make test-hive`, all test cases passed. Closes berachain/pm#6


## Summary by CodeRabbit

- **New Features**
  - Enhanced smart contract interaction with additional output names for better clarity in read-only operations.
  
- **Tests**
  - Implemented new tests to ensure reliable contract read-only method functionality.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Refactor**
- Renamed a key function to better reflect its purpose in the blockchain
lifecycle management.
- Updated blockchain method to clarify that it now sets the newly
inserted block as the head of the chain.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Refactor**
  - Renamed internal transaction pool processing function for improved code clarity. (No impact on end-user functionality)
Pruning all type aliases from `go-ethereum`.
Closes berachain/pm#25

---------

Co-authored-by: Devon Bear <[email protected]>
Currently, run `make` will generate a `polard` binary under ./build/bin/, and run `polard --help` will show the wrong description

![image](https://github.com/berachain/polaris/assets/30857671/dee6f749-4757-42ee-a11a-bc8b979b470a)

This pr fix this

![image](https://github.com/berachain/polaris/assets/30857671/97558c36-1375-4a6a-84d3-ef6beb9a54d4)




## Summary by CodeRabbit

- **Refactor**
  - Updated the command-line interface naming and description to reflect the Polaris node daemon and interaction capabilities.
…precompile (#1341)

- Related to issue of calling view functions which have underlying cosmos behavior that makes state changes
- Add query method for delegator-validator rewards



## Summary by CodeRabbit

- **New Features**
  - Introduced new functions for retrieving delegator rewards within the smart contract.

- **Documentation**
  - Updated comments to clarify the use of `CacheContext` in view methods due to writes performed by the Cosmos SDK distribution module's querier.
minor typo fix in comments, nothing crucial

have a nice sunday

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Documentation**
	- Corrected typos in comments for improved clarity and understanding.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
The comments of setWithdrawAddress and delegate functions are wrong. I
fix them with comments from Distribution.sol and Staking.sol

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Users can now set a specific address to receive delegation rewards in
the `DistributionWrapper` contract.
- Enhanced the `delegate` function to allow users to delegate tokens
directly to a validator.

- **Documentation**
- Corrected spelling errors in the documentation comments for the
`IDistributionModule` interface.

- **Refactor**
- Updated function descriptions and comments for clarity in the
`DistributionWrapper` contract.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: tianqi <[email protected]>
## Summary by CodeRabbit

- **New Features**
  - Integrated telemetry across various modules to enhance performance monitoring.
  - Added new search and state retrieval functionalities to the EVM backend.
  - Improved transaction broadcasting with metric tracking for mempool fullness and broadcast failures.

- **Bug Fixes**
  - Corrected a typographical error in the `entrypoint.sh` script argument.

- **Documentation**
  - Updated licensing information and added new telemetry-related constants in multiple files.

- **Refactor**
  - Enhanced existing methods with telemetry for better insight into block building and gas usage.
  - Modified the `initAppConfig` function to enable telemetry by default.

- **Style**
  - Standardized telemetry metric keys across different modules for consistency.

- **Tests**
  - No visible changes to end-users regarding tests.

- **Chores**
  - No visible changes to end-users regarding chores.

- **Revert**
  - No reverts in this release.
## 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.
GoodDaisy and others added 27 commits January 16, 2024 15:13
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Documentation**
	- Corrected spelling errors for enhanced clarity in documentation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
In my view the berachain testnet experienced unreliability due to
upstream issues in Comet.

* cometbft/cometbft#1940

While I cannot be sure, I think that some of the results that I got in
recent benchmarks of goleveldb actually represent clear bugs that could
under certain circumstances be used to halt chains.

* cometbft/cometbft-db#115

So here's the thinking:

1) drop goleveldb for pebble by literally specifying pebble statically
in the code
2) reduce max_bytes to 1mb
3) increase the size of the validator set and distribute VP evenly
4) torture the network, including torturing RPCs

Co-authored-by: Devon Bear <[email protected]>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced new configuration settings for miners, including
`ExtraData` and `GasFloor`.
  - Added transaction removal capabilities in the transaction pool.

- **Enhancements**
- Updated the EVMKeeper interface to support enhanced transaction pool
management.
- Improved transaction insertion logic to accommodate new caching
mechanisms.

- **Bug Fixes**
  - Fixed an issue with the RPC transaction fee cap configuration.

- **Build System**
- Included `pebbledb` support in build tags for enhanced database
functionality.

- **Refactor**
- Simplified configuration by removing the default configuration
function.
- Enhanced the transaction pool with direct embedding of Ethereum's
`TxPool` and new fields for better management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Cal Bera <[email protected]>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved transaction message processing by ensuring at exactly one
message is present before unwrapping the payload.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced telemetry for transaction ejection, broadcasting, and mempool
metrics.
- **Refactor**
- Improved code clarity and monitoring capabilities for transaction
handling.
- **Documentation**
- Updated comments for better understanding of transaction broadcasting
functions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Devon Bear <[email protected]>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced the WriteGenesisBlock function for initializing the
blockchain with the genesis block.

- **Refactor**
  - Modified block insertion logic to enhance error handling.
- Updated methods for block insertion and head setting for improved
blockchain stability.
  - Disabled block caching to streamline block processing.

- **Bug Fixes**
- Fixed the latest query context setting to ensure accurate transaction
tracking.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Devon Bear <[email protected]>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Refactor**
- Simplified the ejection conditions in the transaction pool based on
gas price limits.
- **Chores**
- Enhanced logging within the transaction pool for better debugging and
monitoring.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced transaction validation process for improved network
reliability.
- Introduced new telemetry metrics to monitor transaction pool
performance.

- **Improvements**
- Improved handling of pending block states to enhance client
compatibility.

- **Refactor**
- Streamlined transaction pool interaction with consensus algorithm
telemetry.

- **Documentation**
- Updated inline documentation to reflect new methods and functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Po Bera <[email protected]>
## Bug:
The function incorrectly returns nil when the Git commit length is not
equal to 40, potentially causing unclear failures.

## Fix:
Correct the error handling to return a specific error when the commit
length check fails.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Updated configuration validation to ensure the git commit length is
correctly verified.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
…re-gossiped from a peer instantly. (#1472)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
	- Improved transaction handling efficiency in the network.
- **Performance Improvements**
	- Enhanced cache management for better performance.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Copy link

coderabbitai bot commented Feb 2, 2024

Important

Auto Review Skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository.

To trigger a single review, invoke the @coderabbitai review command.

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?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@jcstein jcstein closed this Feb 2, 2024
@markair77
Copy link

_ No description provided. _

@coderabbitai review
was this used prior to closure?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.