-
Notifications
You must be signed in to change notification settings - Fork 35
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
Index DAL Attestations #178
Open
ajinkyaraj-23
wants to merge
22
commits into
baking-bad:master
Choose a base branch
from
ajinkyaraj-23:dal-support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
* [preattestation] remove preattestation_with_dal preattestation_with_dal is not an existing operation * [Data] add a new DalAttestation field to EndorsementOperation * [Api] expose the DalAttestation field in endorsements API call * [Sync] index the DAL attestations EndorsementOperation table
* Add DAL protocol constants * Add data migration for new protocol constants
Authorize to filter by: - hash - level - slot-index - publisher
Authorize to select fields: - hash - level - slotIndex - publisher Authorize to filter by: - hash - level - slotIndex - publisher Authorize to sort by: - level - slotIndex
Authorize to select fields: - hash - level - slotIndex - publisher Authorize to filter by: - level - slotIndex - publisher Authorize to sort by: - level - slotIndex
…ommitment-indexing [DAL] Index DAL commitments
* [data] create a DalAttestationStatus table In order to keep track of DAL attestations evolution * [cache] create a cache for DalCommitmentStatus To be able to retrieve them faster * [dal-attestation] index DAL attestation status Each time an endorsement contains dal-attestation, index a DalAttestationStatus for each slot associated to a DAL commitment * [api] add an endpoint to count DAL attestations Authorize to filter by: - commitment - publishLevel - slot-index - attester - attested * [api] add an endpoint to get DAL attestation information Authorize to select fields: - commitment - publishLevel - slotIndex - attester - attested Authorize to filter by: - commitment - publishLevel - slotIndex - attester - attested Authorize to sort by: - publishLevel - slotIndex
* [data] add the field `DalShards` to the table `BakingRights` In order to keep track of the DAL shards distribution * [dal-shards] compute and index DAL shards Shards are the `number_of_shards` first slots * [api] Expose `DalShards` in `/v1/rights` endpoint's response * [api] allow to filter rights by `dalShards` For the `/v1/rights/count` and `/v1/rights` entrypoints
* [data] add field `ShardsCount` to the table `DalAttestationStatus` In order to keep track of the DAL shards power of attestation * [dal-attestation] index DAL attestation status Rights should be the one of the (level - 1) because the attestation are the attestation of the previous block. But, since the `BakingRights` table maintains rights shifted by one level, we get the correct rights stored at the current level. * [api] add field `ShardsCount` to `/v1/dal/attestations/` endpoints Authorize to select, filter and sort by `ShardsCount`
* Add ShardsAttested and Attested (bool) field in DalCommitmentStatus * update cumulative attestations received from all bakers for a Dal commitment * Add API endpoints for cumulative DAL commitment status * Use cache services for dalcommitmentstatus in UpdateDalCommitmentStatus * Cache the dal attestation data for this level. * Revert status update made to DalCommitmentStatus due to this block.
…baking-bad#31) * [dal] use a dictionnary for the DalAttestationsCache * [dal] update dal commitment status during attestation handling
…-bad#34) To filter by `attested` and `shardsAttested`
…g-bad#36) * Replace DalCommitmentStatus with DalPublishCommitmentOps move shardsAttested and Attested fields to DalPublishCommitmentOps Reuse the cache file used for DalCommitmentStatus to cache DalPublishCommitmentOps Co-authored-by: Palmer Sébastien <[email protected]> * Update APi endpoints Add applied filter on Dal commitments * Add filter for applied Dal commitment operations in API * Use existing enums for operation status --------- Co-authored-by: Palmer Sébastien <[email protected]>
* [data] introduce a new DalRights table to store dal rights DalShards field in BakingRights table will be removed later * [dal] create Dal rights generator Dal rights generation in others generator will be removed later * [cache] add a cache for Dal rights In order to prevent to many calls during dal attestation applies * [dal] initiate/update dal rights - initiate rights for the first ConsensusRightsDelay cycle at first proto activation - update rights at proto update for future cycle in according to the new proto - add rights at new future cycle * [dal] use the new DalRights table to apply dal attestation * [api] add entrypoint that get dal rights using the DalRights table * [dal] remove dal shards from baking rights * [migration] generate files extracting dal rigths from baking rights
* [fix] DAL api * [migration] merge all migration related to dal support
Merge tzkt base branch
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.
DAL commitments are indexed in DalPublishCommitmentOps table.
The bakers attest these commitments after 8 blocks(DAL_ATTESTATION_LAG constant).
This pull request aims to index these attestations by the bakers.
The information is made available via api endpoints as follows: