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

add parquet_token_v2_processor #462

Merged
merged 10 commits into from
Jul 27, 2024
Merged

Conversation

yuunlimm
Copy link
Contributor

@yuunlimm yuunlimm commented Jul 15, 2024

Description

Add parquet token processor that is responsible for
1. collection_v2 this will be omitted for now.
2. token_datas_v2
3. token_ownerships_v2

Test Plan

token_ownerships
Screenshot 2024-07-15 at 2 08 25 PM
Screenshot 2024-07-15 at 2 08 23 PM
Screenshot 2024-07-15 at 2 08 25 PM

collection_v2
Screenshot 2024-07-15 at 2 08 05 PM

@yuunlimm yuunlimm requested a review from a team July 15, 2024 21:22
@yuunlimm yuunlimm force-pushed the yuunlimm/parquet-token-processor branch 2 times, most recently from c1793b4 to 7f41600 Compare July 22, 2024 23:45
pub mutable_uri: Option<bool>,
pub table_handle_v1: Option<String>,
pub token_standard: String,
#[allocative(skip)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we used to also have a collection_properties field

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

collections is not going to be migrated over in this phase. we can ignore this file for now

pub token_properties: String,
pub description: String,
pub token_standard: String,
pub is_fungible_v2: Option<bool>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rtso what's the diff between token_standard and is_fungible_v2?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

token_standard is whether the token is v1 or v2. is_fungible_v2 is whether this token is also fungible (it's an implementation detail based on the contract)

Copy link
Contributor

@ying-w ying-w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some feedback for

  • collections
  • token_data
  • token_ownerships

did you already move collection_data?

@yuunlimm
Copy link
Contributor Author

Left some feedback for

  • collections
  • token_data
  • token_ownerships

did you already move collection_data?

collection_data wasn't a part of parquet. do we need in bq?

@yuunlimm yuunlimm force-pushed the yuunlimm/parquet-token-processor branch from 7f41600 to bc247ca Compare July 24, 2024 00:52
@yuunlimm yuunlimm force-pushed the yuunlimm/parquet-token-processor branch from bc247ca to 684b30f Compare July 25, 2024 18:01
@yuunlimm
Copy link
Contributor Author

Screenshot 2024-07-25 at 2 44 26 PM
Mainnet backfill is done.
@larry-aptos

@yuunlimm yuunlimm force-pushed the yuunlimm/parquet-token-processor branch from a83c973 to 26370b8 Compare July 25, 2024 23:19
@yuunlimm yuunlimm force-pushed the yuunlimm/parquet-token-processor branch from 26370b8 to 206e088 Compare July 26, 2024 21:48
@yuunlimm yuunlimm requested a review from a team July 26, 2024 21:49
property_version_v1: 0,
owner_address: Some(owner_address.clone()),
storage_id: storage_id.clone(),
amount: "0".to_string(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: make 0 as constant, it's hard to understand why this is 0 without context.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good. will also add a comment

// set to negative of event index to avoid collison with write set index
write_set_change_index: -1 * event_index,
token_data_id: token_data_id.clone(),
property_version_v1: 0,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something like LEGACY_DEFAULT_PROPERTY_VERSION would help.. btw, is it due to v1 migration?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not quite sure if it was added as a part of migration.

@yuunlimm yuunlimm force-pushed the yuunlimm/parquet-token-processor branch from d189d84 to 4f55d77 Compare July 27, 2024 00:23
@yuunlimm yuunlimm merged commit 6b0c7ce into main Jul 27, 2024
7 checks passed
@yuunlimm yuunlimm deleted the yuunlimm/parquet-token-processor branch July 27, 2024 00:58
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.

4 participants