Closed shleikes closed 2 months ago
The recent enhancements to the blockchain codebase significantly improve parsing capabilities and the message crafting process. Key updates include the introduction of new data structures for managing block requests, refined error handling, and the addition of dependencies for improved functionality. These changes streamline operations and enhance clarity, directly impacting how the system processes block data and constructs messages.
File(s) | Change Summary |
---|---|
cookbook/specs/near.json |
Added a new "parsers" field to enhance block finality parsing capabilities; minor formatting adjustment. |
go.mod |
Introduced new indirect dependencies (gojq , timefmt-go ); updated versions of existing dependencies (uniseg , sys ). |
protocol/chainlib/common.go , .../grpc.go , .../jsonRPC.go , .../rest.go , .../tendermintRPC.go |
Enhanced message crafting and parsing methods; new parameters for block requests; improved error handling and logging across chain parser implementations. |
protocol/parser/parser.go |
Introduced ParsedInput type to enhance parsing logic; added functions for generic parsing; improved error handling and logging. |
protocol/parser/parser_test.go |
Updated tests for ParseBlockFromParams to include new parameters; added comprehensive test cases to ensure robustness. |
scripts/protocgen.sh |
Changed the shebang line from #!/usr/bin/env /bin/sh to #!/bin/bash to leverage Bash-specific features. |
sequenceDiagram
participant User
participant GrpcChainParser
participant JsonRPCChainParser
participant ParsedInput
User->>GrpcChainParser: Request block
GrpcChainParser->>ParsedInput: Process input
ParsedInput->>GrpcChainParser: Return parsed data
GrpcChainParser->>User: Return crafted message
User->>JsonRPCChainParser: Request block
JsonRPCChainParser->>ParsedInput: Process input
ParsedInput->>JsonRPCChainParser: Return parsed data
JsonRPCChainParser->>User: Return crafted message
π° In fields of code, I hop and play,
With parsing joys that brighten the day.
New structures abound, oh what a delight!
Error logs gleam, all shiny and bright.
Crafting messages with hashes anew,
In the world of blocks, I'm sprightly and true! π
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?
2β159 testsβ +27βββ2β159 :white_check_mark: +27βββ25m 42s :stopwatch: -4s ββ143 suites Β±β0βββββββ0 :zzz: Β±β0β ββββ7 filesββ Β±β0βββββββ0 :x: Β±β0β
Results for commit 9424d328.βΒ± Comparison against base commit 6ba87237.
:recycle: This comment has been updated with latest results.
Description
Closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changemain
branchReviewers Checklist
All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.
I have...
Summary by CodeRabbit
New Features
parsers
field.ParsedInput
structure to manage block data more effectively and improve error handling.CompareRequestedBlockInBatch
function to allow more nuanced comparisons by processing multiple block states.Bug Fixes
Tests
ParseBlockFromParams
function to validate its behavior across various scenarios.Chores