HerodotusDev/hdp

Support Mult Network

Opened this issue · 0 comments

context

Current version is assuming on getting BlockSampledDataLake only Ethereum Sepolia network. However, in the future, as we planning on supporting other networks, we need to specify exact chain Id in BlockSampledDataLake field.

more, before hardfork of ethereum, there was no chain_id was introduced, so without passing chain_id would result unsound TransactionsInBlockDatalake

Here is following todos:

BlockSampledDatalake

  • (hdp-cli) add chain_id as field of BlockSampledDataLake struct.
pub struct BlockSampledDatalake {
    pub chain_id: u64,
    pub block_range_start: u64,
    pub block_range_end: u64,
    pub increment: u64,
    pub sampled_property: String,
}
  • (Cairo Program) add chain_id as field of BlockSampledDataLake struct.
  • (Contract) add chain_id as field of BlockSampledDataLake struct.
struct BlockSampledDatalake {
    uint256 chain_id;
    uint256 blockRangeStart;
    uint256 blockRangeEnd;
    uint256 increment;
    bytes sampledProperty;
}
  • (Server) add chain_id as field of BlockSampledDataLake struct.

TransactionsInBlockDatalake

  • (hdp-cli) add chain_id as field of TransactionsInBlockDatalake struct.
pub struct TransactionsInBlockDatalake {
    pub chain_id: u64,
    pub target_block: u64,
    pub sampled_property: TransactionsCollection,
    pub increment: u64,
}
  • (Cairo Program) add chain_id as field of TransactionsInBlockDatalake struct.
  • (Contract) add chain_id as field of TransactionsInBlockDatalake struct.
struct TransactionsInBlockDatalake {
    uint256 chain_id;
    uint256 target_block;
    uint256 increment;
    bytes sampledProperty;
}
  • (Server) add chain_id as field of TransactionsInBlockDatalake struct.

Test check

Make sure to have hash be same around all flow