Closed sideninja closed 2 weeks ago
The pull request introduces modifications across multiple files, enhancing gRPC client functionality and simplifying dependency management. Key changes include updating the setupCrossSporkClient
function to support larger message sizes, redefining the newRemoteLedger
function to accept a pre-established client, and updating the go.mod
file to reflect a new version of the flow-go-sdk
dependency. These adjustments aim to improve data handling and streamline client management.
Files | Change Summary |
---|---|
bootstrap/bootstrap.go |
Modified setupCrossSporkClient to include a new parameter for maximum receive message size (1 GB) in the gRPC client creation process. |
go.mod , tests/go.mod |
Updated version of github.com/onflow/flow-go-sdk from v1.0.0-preview.54 to v1.0.0-preview.56 . |
services/requester/remote_state.go |
Changed newRemoteLedger function to accept an executiondata.ExecutionDataAPIClient instead of a host string, simplifying connection management. |
services/requester/remote_state_test.go |
Refactored tests to directly create a gRPC client and retrieve the latest block header, removing the getPreviewnetLatestHeight function and streamlining ledger initialization. |
remote_state.go
include a modification to the newRemoteLedger
function, which is directly related to the changes made in the main PR's newRemoteLedger
function.🐰 In the code where the bunnies hop,
New changes come, and we can't stop!
With larger messages, we now can play,
A smoother ledger for every day.
Dependencies updated, all in a row,
Hooray for the changes, let the data flow! 🌟
[!TIP]
OpenAI O1 model for chat
- We have deployed OpenAI's latest O1 model for chat. - OpenAI claims that this model has superior reasoning capabilities than their GPT-4o model. - Please share any feedback with us in the [discussions post](https://discord.com/channels/1134356397673414807/1283929536186155099).
services/requester/remote_state_test.go (3)
Line range hint `21-45`: **Skipping review.** This test function is not directly affected by the changes made in this PR. The function relies on the `newPreviewnetLedger` function, which has been modified and will be reviewed separately. --- `57-63`: **LGTM!** The changes made to the `Benchmark_RemoteLedger_GetBalance` function improve the efficiency and clarity of the code by: 1. Consolidating the logic for establishing the gRPC connection and retrieving the latest block height into a more streamlined process. 2. Simplifying the control flow and reducing the number of steps required to obtain the latest block height. 3. Introducing a new parameter `grpcClient.WithGRPCDialOptions(grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(1024*1024*1024)))` to the `grpcClient.NewClient` function to support larger message sizes. The changes are well-structured and enhance the overall quality of the code. Also applies to: 70-70 --- `85-87`: **LGTM!** The changes made to the `newPreviewnetLedger` function improve the efficiency and clarity of the code by: 1. Consolidating the logic for establishing the gRPC connection and retrieving the latest block height into a more streamlined process. 2. Simplifying the control flow and reducing the number of steps required to obtain the latest block height. 3. Introducing a new parameter `grpcClient.WithGRPCDialOptions(grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(1024*1024*1024)))` to the `grpcClient.NewClient` function to support larger message sizes. 4. Returning `newRemoteLedger(execClient, latest.Height)` instead of using the removed `getPreviewnetLatestHeight` function, which is consistent with the changes made in the `Benchmark_RemoteLedger_GetBalance` function. The changes are well-structured and enhance the overall quality of the code. Also applies to: 91-91, 93-95, 98-98
Description
Reuse the client for storage inspection.
For contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
New Features
Refactor
newRemoteLedger
function to focus solely on initialization, improving modularity and testability.