rooch icon indicating copy to clipboard operation
rooch copied to clipboard

[genesis]: add genesis_verify for statedb cmd for verfiying utxo and ord importing result

Open popcnt1 opened this issue 1 year ago • 1 comments

utxo

  1. genesis utxo with heightA, get utxo_store and rooch_to_bitcoin_address_mapping state root: stateA
  2. genesis utxo with heightA+N, get utxo_store and rooch_to_bitcoin_address_mapping state root: stateA+N
  3. process L1 tx from stateA + N: stateA+N'
  4. compare stateA+N' and stateA+N

ord

almost as same as utxo

implementation

  1. get root_state_root by rooch_db.lastest_root()
  2. get x_store state root by moveos_store.get_field_at with root_state_root

https://github.com/rooch-network/rooch/pull/2365 https://github.com/rooch-network/rooch/pull/2379

Verify

  • [x] data imported by statedb genesis
  • [ ] data imported by statedb genesis + relayer_execution
  • [ ] certain cases: #1985

popcnt1 avatar Jul 18 '24 13:07 popcnt1

need to set updated_at, created_at to 0 in object meta for each object when process L1 tx

ghost avatar Jul 18 '24 15:07 ghost