Skip to content
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

Implement BlockBackend and HeaderBackend for Client type. #4474

Open
timwu20 opened this issue Jan 16, 2025 · 0 comments
Open

Implement BlockBackend and HeaderBackend for Client type. #4474

timwu20 opened this issue Jan 16, 2025 · 0 comments
Assignees

Comments

@timwu20
Copy link
Contributor

timwu20 commented Jan 16, 2025

Issue Summary

Taken from design doc:

I propose implementing the BlockBackend and HeaderBackend into the newly introduced Client. Given that db.Backend already provides access to the underlying HeaderBackend this is trivially implemented by calling the Backend.Blockchain() which returns an impl of blockchain.Backend which embeds HeaderBackend. BlockBackend is implemented by also calling methods on the returned impl blockchain.Backend from Backend.Blockchain().

After the introduction and implementation of the BlockBackend and HeaderBackend interfaces, we can create a translation shim type to map the above BlockState methods to utilize the Client methods for both BlockBackend and ChainHeaderBackend.

Acceptance Criteria

  • Introduction of BlockBackend interface
  • Implementation of BlockBackend in Client.
  • Implementation of HeaderBackend in Client.
  • Tests

Other Information and links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant