Closed sideninja closed 4 months ago
The update introduces new types and functions for interacting with a remote ledger on the Flow blockchain preview network. This includes the remoteLedger
type, which implements the atree.Ledger
interface, and various methods for fetching and manipulating ledger data. Additionally, it adds test and benchmark functions for evaluating the new remote ledger’s performance and reliability. Dependencies in go.mod
have also been updated to support these new functionalities.
File | Summary of Changes |
---|---|
emulator/remote_state.go |
Introduced the remoteLedger type, implementing the atree.Ledger interface, with methods for fetching values, checking existence, setting values (read-only), and allocating storage indices. |
emulator/remote_state_test.go |
Added tests for ledger interactions on the Flow blockchain preview network, including retrieval of code, nonce, balance, code size, and state information. Also, added benchmark tests for fetching balances and helper functions. |
go.mod |
Added new dependencies github.com/onflow/atree , github.com/onflow/flow/protobuf/go/flow , github.com/huandu/go-clone , and google.golang.org/grpc with updated versions. |
In the world of code where bytes do flow,
A ledger remote sets the data aglow.
With tests and benchmarks, we ensure it's tight,
In preview networks, it performs just right.
Dependencies added, the framework grows,
In this digital garden, a new feature blooms and shows. 🌸
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?
Related: #351
This is the first step towards solution 2 in the issue.
The PR implements a remote ledger that is compliant with the
atree.Ledger
interface that is being used by the state DB. The ledger is read-only and fetches the registers from the configured AN API.For contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
New Features
Tests