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

Transaction datalake (1/3) #49

Merged
merged 13 commits into from
Mar 27, 2024
Merged

Transaction datalake (1/3) #49

merged 13 commits into from
Mar 27, 2024

Conversation

rkdud007
Copy link
Member

@rkdud007 rkdud007 commented Mar 25, 2024

#48

/// [`TransactionsDatalake`] is a struct that represents a transactions datalake.
///
/// It can represent a transactions datalake for a specific address as sender.
///
/// example 1: from_base_nonce is 0, to_base_nonce is 3 increment is 1
/// target nonce [0, 1, 2, 3]
/// - transaction 1 (nonce 0 -> 1)
/// - transaction 2 (nonce 1 -> 2)
/// - transaction 3 (nonce 2 -> 3)
/// - transaction 4 (nonce 3 -> 4)
///
/// example 2: from_base_nonce is 0, to_base_nonce is 3 increment is 2
/// target nonce [0, 2]
/// - transaction 1 (nonce 0 -> 1)
/// - transaction 2 (nonce 2 -> 3)
///
/// example 3: from_base_nonce is 0, to_base_nonce is 3 increment is 3
/// target nonce [0, 3]
/// - transaction 1 (nonce 0 -> 1)
/// - transaction 2 (nonce 3 -> 4)
///
/// example 4: from_base_nonce is 0, to_base_nonce is 5 increment is 2
/// target nonce [0, 2, 4]
/// - transaction 1 (nonce 0 -> 1)
/// - transaction 2 (nonce 2 -> 3)
/// - transaction 3 (nonce 4 -> 5)
#[derive(Debug, Clone, PartialEq)]
pub struct TransactionsDatalake {
    pub address: Address,
    // start of nonce range the first transaction base on
    pub from_base_nonce: u64,
    // end of nonce range the last transaction base on
    pub to_base_nonce: u64,
    // ex. "tx.to" , "tx.gas_price" or "tx_receipt.success", "tx_receipt.cumulative_gas_used"
    pub sampled_property: TransactionsCollection,
    // increment of nonce range
    pub increment: u64,
}

@rkdud007 rkdud007 added the enhancement New feature or request label Mar 25, 2024
@rkdud007 rkdud007 self-assigned this Mar 25, 2024
@rkdud007 rkdud007 changed the title Transaction datalake by Sender (1/4) Transaction datalake Mar 26, 2024
@rkdud007 rkdud007 changed the title Transaction datalake Transaction datalake (1/2) Mar 27, 2024
@rkdud007 rkdud007 changed the title Transaction datalake (1/2) Transaction datalake (1/3) Mar 27, 2024
@rkdud007 rkdud007 marked this pull request as ready for review March 27, 2024 04:33
@rkdud007 rkdud007 mentioned this pull request Mar 27, 2024
4 tasks
@rkdud007 rkdud007 merged commit 3fa853e into main Mar 27, 2024
1 check passed
@rkdud007 rkdud007 deleted the feat/transaction-datalake branch March 27, 2024 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant