rooch-network / rooch

VApp Container with Move Language for Bitcoin ecosystem
https://rooch.network
Apache License 2.0
162 stars 85 forks source link

[genesis] Unmatched sequencer account after genesis. #2493

Closed pause125 closed 2 months ago

pause125 commented 2 months ago

Rooch version

rooch 0.6.8 (git commit c3f0893c86586ba431460e5b3e1d34685a0dc78d)

What did you do?

  1. start server: rooch server start -n local. We can see info in the CLI output like this:

    2024-08-23T16:20:42.725075Z  INFO rooch_rpc_server: RPC Server sequencer address: rooch1d9z2legekqw00we74w4f200mww273y0ld2k5tqvpucaeg39fzndsmrmdr0(0x6944afe519b01cf7bb3eabaa953dfb7395e891ff6aad458181e63b9444a914db)

    The sequencer account is also my local actived account.

  2. query onchain config object:

    rooch rpc request --method rooch_queryObjectStates --params '[{"object_type
    ":"0x3::onchain_config::OnchainConfig"}, null, "10", {"descending":true, "showDisplay":true}]' --json
    {
    "data": [
    {
      "id": "0xe8de034bd93aaaae15675e107fd7ca755575c16ee7237b6c837a40a24927758c",
      "owner": "rooch1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpsd68l8x",
      "owner_bitcoin_address": null,
      "flag": 0,
      "state_root": "0x5350415253455f4d45524b4c455f504c414345484f4c4445525f484153480000",
      "size": "0",
      "created_at": "0",
      "updated_at": "0",
      "object_type": "0x3::onchain_config::OnchainConfig",
      "value": "0x00000000000000000e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8",
      "decoded_value": {
        "abilities": 8,
        "type": "0x3::onchain_config::OnchainConfig",
        "value": {
          "framework_version": "0",
          "sequencer": "0x0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8"
        }
      },
      "tx_order": "0",
      "state_index": "163",
      "display_fields": null
    }
    ],
    "next_cursor": {
    "tx_order": "0",
    "state_index": "163"
    },
    "has_next_page": false
    }

    You can see the sequencer address is 0x0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8, which is not matched with my actived account.

What did you see happen?

The sequencer address onchain is not matched with my local active account.

What did you expect to see?

The sequencer address should be my active account.

pause125 commented 2 months ago

This bug is caused at here.

Only main and test network has genesis binary file, the dev and local genesis will be built from default RoochNetwork which has empty sequencer address.

jolestar commented 2 months ago

The sequencer is configured in the GenesisConfig, the local is an empty address, and the dev is a fixed address. When the local node starts, we update the genesis config and set the active address as the sequencer. Which part did not work?

pause125 commented 2 months ago

The sequencer is configured in the GenesisConfig, the local is an empty address, and the dev is a fixed address. When the local node starts, we update the genesis config and set the active address as the sequencer. Which part did not work?

at line,a new default network config is used. The config which has set sequencer account is ignored.