-
Notifications
You must be signed in to change notification settings - Fork 7
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
[MET-46] feat: dynamic data slot for each field #6
Conversation
let slot_updated = vec![owner.slot_updated, leaf.slot_updated] | ||
.into_iter() | ||
.max() | ||
.unwrap(); // unwrap here is save, because vec is not empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.unwrap(); // unwrap here is save, because vec is not empty | |
.unwrap(); // unwrap here is safe, because vec is not empty |
rocks-db/src/asset.rs
Outdated
pub is_compressible: (u64, bool), | ||
pub is_compressed: (u64, bool), | ||
pub is_frozen: (u64, bool), | ||
pub supply: (u64, Option<u64>), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you have a supply or seq or unchain_data with some slot updated and None value?
rocks-db/src/asset.rs
Outdated
pub creators: Vec<Creator>, | ||
pub royalty_amount: u16, | ||
pub slot_updated: u64, | ||
pub is_compressible: (u64, bool), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we need something like
struct Updated<T> {
slot_updated: u64,
value: T,
}
What do you think of that?
# Conflicts: # digital_asset_types/src/dao/scopes/asset.rs # nft_ingester/src/bubblegum_updates_processor.rs # nft_ingester/src/mplx_updates_processor.rs # nft_ingester/src/token_updates_processor.rs # rocks-db/src/asset.rs # rocks-db/src/batch_client.rs
# Conflicts: # nft_ingester/src/token_updates_processor.rs # rocks-db/src/asset.rs
# Conflicts: # nft_ingester/src/api/service.rs
@@ -33,6 +33,8 @@ export INGESTER_SLOT_UNTIL=0 | |||
export INGESTER_SLOT_START_FROM=236032212 | |||
export INGESTER_BIG_TABLE_CONFIG='{creds="./creds.json", timeout=1000}' | |||
|
|||
export ingester_synchronizer_batch_size=500 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: let's make capitalize for consistency?
build: | ||
context: . | ||
dockerfile: migrator.Dockerfile | ||
|
||
ingester-first-consumer: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can drop ingester-second-consumer as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added slot_updated logic for each field in AssetDynamicDetails && AssetOwner structs. Refactored merge functions for this structs. Create insert_gaped_data function, that process CompleteAssetDetails. Wrote test for merge functions. Also this pr include some code clean up: removed unused imports in Cargo.toml for ingester and digital_asset_types, unused directories in project, adjust MakeFile and docker-compose.yaml etc