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

feat: Rollkit updated main #1482

Merged
merged 93 commits into from
Feb 6, 2024

Conversation

gupadhyaya
Copy link

No description provided.

itsdevbear and others added 30 commits November 6, 2023 17:41
…#1294)

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.
…berachain#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 -->
…chain#1303)

## 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 <itsdevbear@berachain.com>
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 (berachain#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 <58348113+ethisscam@users.noreply.github.com>
## 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.
itsdevbear and others added 13 commits January 20, 2024 00:53
<!-- 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 <po@berachain.com>
…in#1450)

## 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. (berachain#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 5, 2024

Important

Auto Review Skipped

Auto reviews are disabled on base/target branches other than the default branch. Please add the base/target branch pattern to the list of additional branches to be reviewed in the settings.

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.

Signed-off-by: Ganesha Upadhyaya <ganeshrvce@gmail.com>
@gupadhyaya gupadhyaya changed the title Rollkit updated main feat: Rollkit updated main Feb 6, 2024
@jcstein
Copy link
Collaborator

jcstein commented Feb 6, 2024

I am testing this meow

@jcstein
Copy link
Collaborator

jcstein commented Feb 6, 2024

testing setup

  1. running on celestia-da v0.12.10
docker run -d \
-e NODE_TYPE=light \
-e P2P_NETWORK=mocha \
-p 26650:26650 \
-p 26658:26658 \
-p 26659:26659 \
-v $HOME/.celestia-light-mocha-4/:/home/celestia/.celestia-light-mocha-4/ \
ghcr.io/rollkit/celestia-da:v0.12.10 \
celestia-da light start \
--p2p.network=mocha \
--da.grpc.namespace=0000506f6c6172697332 \
--da.grpc.listen=0.0.0.0:26650 \
--core.ip rpc-mocha.pops.one \
--gateway
  1. using feat: Rollkit updated main #1482
  2. with default 1s block times, following instructions from https://rollkit.dev/tutorials/polaris-evm#start-your-light-node
  3. posting to mocha's "Polaris2" namespace: https://mocha.celenium.io/namespace/0000000000000000000000000000000000000000506f6c6172697332

@jcstein
Copy link
Collaborator

jcstein commented Feb 6, 2024

testing update

Unfortunately, the chain crashed, due to an error seen on previous testing (before branch was updated):

3:47PM ERR failed to build payload err="invalid timestamp, parent 1707252473 given 1707252473" module=server
3:47PM INF exiting prepare proposal duration=3.421708 height=3149 module=polaris-proposal-provider timestamp=2024-02-06T15:47:53-05:00
3:47PM ERR failed to prepare proposal err="invalid timestamp, parent 1707252473 given 1707252473" height=3149 module=server
3:47PM INF entering process proposal height=3149 module=polaris-proposal-provider timestamp=2024-02-06T15:47:53-05:00
3:47PM INF exiting process proposal duration=1.003917 height=3149 module=polaris-proposal-provider timestamp=2024-02-06T15:47:53-05:00
3:47PM ERR failed to process proposal err="failed to find envelope in proposal" hash=FECD964A8D720D3E9BB272ED49C154D563ED876BCA112DC9DF6A8ED7603BF11D height=3149 module=server
panic: error while processing the proposal: <nil>

goroutine 421 [running]:
github.com/rollkit/rollkit/block.(*Manager).publishBlock(0x14000df1a40, {0x1063fac60, 0x14001b11e00?})
	github.com/rollkit/rollkit@v0.11.19/block/manager.go:732 +0xbd8
github.com/rollkit/rollkit/block.(*Manager).AggregationLoop(0x14000df1a40, {0x1063fac60, 0x14001b11e00}, 0x0)
	github.com/rollkit/rollkit@v0.11.19/block/manager.go:274 +0x1d0
github.com/rollkit/rollkit/node.(*FullNode).OnStart.func1()
	github.com/rollkit/rollkit@v0.11.19/node/full.go:379 +0x30
github.com/rollkit/rollkit/types.(*ThreadManage()
	github.com/rollkit/rollkit@v0.11.19/types/threadmanager.go:26 +0x58
created by github.com/rollkit/rollkit/types.(*ThreadManager).Go in goroutine 1
	github.com/rollkit/rollkit@v0.11.19/types/threadmanager.go:24 +0x7c
make: *** [start] Error 2

root issue

3:47PM ERR failed to build payload err="invalid timestamp, parent 1707252473 given 1707252473" module=server

logs

@jcstein
Copy link
Collaborator

jcstein commented Feb 6, 2024

Rollkit issues aside, I think this is okay to merge. Do you agree @gupadhyaya?

Copy link
Collaborator

@jcstein jcstein left a comment

Choose a reason for hiding this comment

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

LGTM based on it working aside from a rollkit issue. thank you for the heavy lift here @gupadhyaya.

@jcstein jcstein merged commit 83a2747 into berachain:rollkit-main Feb 6, 2024
7 of 12 checks passed
@gupadhyaya gupadhyaya deleted the rollkit-updated-main branch February 27, 2024 00:08
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.