-
Notifications
You must be signed in to change notification settings - Fork 165
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
[1/n] feat(deposits): merkle tree machinery to support deposit inclusion verification #2265
base: main
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2265 +/- ##
==========================================
+ Coverage 31.11% 31.49% +0.37%
==========================================
Files 333 337 +4
Lines 15386 15757 +371
Branches 20 20
==========================================
+ Hits 4788 4962 +174
- Misses 10272 10445 +173
- Partials 326 350 +24
|
@@ -39,7 +39,7 @@ func (s *Service[ | |||
ctx context.Context, | |||
blockNum math.U64, | |||
) { | |||
if blockNum < s.eth1FollowDistance { | |||
if blockNum <= s.eth1FollowDistance { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: never necessary to fetch logs for block height 0
@@ -53,7 +53,7 @@ license-fix: | |||
|
|||
nilaway: | |||
@echo "--> Running nilaway" | |||
(go run go.uber.org/nilaway/cmd/nilaway -exclude-errors-in-files "geth-primitives/deposit/" -v ./...) || exit 1; | |||
(go run go.uber.org/nilaway/cmd/nilaway -exclude-pkgs "github.com/berachain/beacon-kit/storage/deposit/merkle" -exclude-errors-in-files "geth-primitives/deposit/" -v ./...) || exit 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not useful for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will revive in subsequent PR when deposit/merkle package is being used
a4c891d
to
6bf0482
Compare
leftDeposits, result := n.left.GetFinalized(result) | ||
rightDeposits, result := n.right.GetFinalized(result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is reusing the result
passed as param to GetFinalized
, and not creating a new shadow variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All node types' GetFinalized
are either appending to result
or returning result
itself. So effectively this is just in-place modification of result.
@@ -44,7 +44,7 @@ fi | |||
# Find all .go files in the project directory and its subdirectories, ignoring .pb.go and .pb_encoding.go files | |||
find "${ROOT_DIR}" -type f -name "*.go" ! -name "*.pb.go" ! -name "*.pb_encoding.go" | while read -r file; do | |||
echo "Processing $file..." | |||
golines --reformat-tags --shorten-comments --write-output --max-len=80 "$file" | |||
golines --reformat-tags --shorten-comments --write-output --max-len=140 "$file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fridrik01 I found the culprit. This was shortening lines whenever I ran make format
locally which runs this golines script
Deposits
HashTreeRoot()
is only used in sidecar verification currently).