-
Notifications
You must be signed in to change notification settings - Fork 219
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(core): store and fetch templates from lmdb #4726
Merged
stringhandler
merged 8 commits into
tari-project:feature-dan
from
mrnaveira:fetch-templates
Sep 27, 2022
Merged
feat(core): store and fetch templates from lmdb #4726
stringhandler
merged 8 commits into
tari-project:feature-dan
from
mrnaveira:fetch-templates
Sep 27, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sdbondi
previously approved these changes
Sep 23, 2022
stringhandler
approved these changes
Sep 27, 2022
stringhandler
pushed a commit
to tari-project/tari-dan
that referenced
this pull request
Sep 29, 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](tari-project/tari#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](tari-project/tari#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.
sdbondi
added a commit
to sdbondi/tari
that referenced
this pull request
Nov 14, 2022
* feature-dan: (21 commits) fix(core)!: remove unused get_committees call from base node (tari-project#4880) fix: correct value for validator_node_timeout consensus constant in localnet (tari-project#4879) feat: add block height to input request to get network consensus constants (tari-project#4856) fix: remove unused config for validator node (tari-project#4849) feat: add missing fields to grpc consensus constants interface (tari-project#4845) chore: merge development into feature-dan (tari-project#4815) refactor: split tari_base_node and tari_console_wallet into a lib component (tari-project#4818) fix(core)!: adds utxo and block info to get_template_registrations request (tari-project#4789) fix: computation of vn mmr (tari-project#4772) fix(wallet/grpc): add transaction id and template_address to template_reg response (tari-project#4788) fix: fix get shard key (tari-project#4744) feat(core): store and fetch templates from lmdb (tari-project#4726) fix: fix validator node registration logic (tari-project#4718) feat(base_node_grpc_client): add getActiveValidatorNodes method (tari-project#4719) fix after merge fix(core): bring validator node MR inline with other merkle root code (tari-project#4692) feat(core): add validator registration sidechain feature (tari-project#4690) fix merge issues feat: add grpc to get shard key for public key (tari-project#4654) feat: add validator node registration (tari-project#4507) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
lmdb
database for template registrations, with methods for inserting and fetching them.GetTemplateRegistrations
to retrieve all new templates since a specific block heightMotivation and Context
In previous work we added template registration to UTXO sidechain features.
The next step is for the base layer to store and index all template registrations that appear in blocks, as well as provide a gRPC method to retrieve them.
As the main query for templates will come from the base layer scanner in the Validator Node, the gRPC query method should allow to filter all new templates since a specific block height.
How Has This Been Tested?
Manually ran the base layer and perform a gRPC query via Postman.