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

feat: base layer scanner fetches templates from the base layer #36

Merged
merged 6 commits into from
Sep 29, 2022

Conversation

mrnaveira
Copy link
Collaborator

@mrnaveira mrnaveira commented Sep 26, 2022

Description

  • base_layer_client.rs: added a method to get template registrations since a specific height.
  • base_layer_scanner.rs: fetch the template registrations since the last scan.
  • template_manager.rs: refactor to use base layer types for template registrations.
  • main.rs: reordered the json-rpc up so it's not blocked by the dan node services.

Motivation and Context

Until now, the base layer scanner in the VN did not fetch real templates from the base layer as the base layer did not store or allow retrieval of templates.

With #4726 in the base layer, we have now a gRPC method to query data of newly published templates since a specific block height.

So this PR updates the base layer scanner and template manager to fetch real templates from the base layer.

How Has This Been Tested?

Manually:

  1. Published a sample template through the wallet gRPC.
  2. The base layer (with the changes from #4726) does detect, store in lmdb and allow fetching the sample template.
  3. The base layer scanner in the VN does retrieve the template metadata and attempt fetching the binary from the url.

@mrnaveira mrnaveira marked this pull request as ready for review September 28, 2022 22:42
@stringhandler stringhandler merged commit 4e5e485 into tari-project:main Sep 29, 2022
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

Successfully merging this pull request may close these issues.

2 participants