ignite / apps

Ignite Apps
https://docs.ignite.com/apps/using-apps
Other
15 stars 3 forks source link

[rollkit] Error initializing BlockManager #104

Closed a26nine closed 5 months ago

a26nine commented 5 months ago

App: rollkit

Describe the bug After the recent PR, the rollkit chain is unable to initialize from genesis. It throws:

error while initializing BlockManager: genesisValidators[0] != req.Validators[0]
Error intercepting command:  failed to run entrypoint: exit status 1

even when the the genesis.json file validator key and the local validator key are the same.

To reproduce Steps to reproduce the behavior:

  1. ignite scaffold chain gm --address-prefix gm
  2. cd gm
  3. ignite app install -g github.com/ignite/apps/rollkit@rollkit/v0.2.0
  4. ignite rollkit add
  5. ignite chain build
  6. ignite rollkit init
  7. rollkit toml init
  8. rollup start ...

What version are you using?

Ignite CLI version:     v28.4.0
Ignite CLI build date:      2024-05-15T13:42:13Z
Ignite CLI source hash:     83ee9ba5f81f2d2104ed91808f2cb72719a23e41
Ignite CLI config version:  v1
Cosmos SDK version:     v0.50.6
Your OS:            linux
Your arch:          amd64
Your go version:        go version go1.22.4 linux/amd64
julienrbrt commented 5 months ago

Hi,

If you are using local-da for testing you need to use --local-da when using rollkit init.

Namely ignite rollkit init --local-da

a26nine commented 5 months ago

Hi,

If you are using local-da for testing you need to use --local-da when using rollkit init.

Namely ignite rollkit init --local-da

I am not using local-da. It happens while using Celestia DA.

The issue is reproducible by one of the Rollkit team members:

image
julienrbrt commented 5 months ago

Ok, let me check 👍

gupadhyaya commented 5 months ago

@julienrbrt i have seen this error happen when the power requirement is different (https://github.com/ignite/apps/blob/main/rollkit/cmd/init.go#L92). For example, changing the Power to 1 was required on some integrations. May be we can flag this for user to pass custom power?

a26nine commented 5 months ago

@julienrbrt i have seen this error happen when the power requirement is different (https://github.com/ignite/apps/blob/main/rollkit/cmd/init.go#L92). For example, changing the Power to 1 was required on some integrations. May be we can flag this for user to pass custom power?

I can confirm that changing the power to 1 resolved the issue. Thanks, @gupadhyaya!

julienrbrt commented 5 months ago

Looks like to me that the issue is the difference between bonded token and val power. If we make those match, the number doesn't change.

Opened https://github.com/ignite/apps/pull/106. Tried with local-da and testnet and it works. Would be nice if one of you could confirm too :)