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

mocha-4 genesis file does not define an app version #3840

Closed
rootulp opened this issue Sep 3, 2024 · 2 comments · Fixed by #3846
Closed

mocha-4 genesis file does not define an app version #3840

rootulp opened this issue Sep 3, 2024 · 2 comments · Fixed by #3846
Assignees
Labels
bug Something isn't working

Comments

@rootulp
Copy link
Collaborator

rootulp commented Sep 3, 2024

Context

https://celestia-team.slack.com/archives/C02PFFCGMNW/p1725353291554399?thread_ts=1725273825.398589&cid=C02PFFCGMNW

Problem

Attempt to sync a v2.1.2 node from genesis with the genesis.json file defined at https://github.com/celestiaorg/networks/blob/master/mocha-4/genesis.json

Proposal

Option 1: modify Mocha genesis.json

  • Identify if there are any issues with updating the existing genesis.json file.
  • Update the mocha-4 genesis file (I checked both celestia and arabica-11 and they have the correct app version in the genesis)
"version": {
   "app_version": "1"
}

Option 2: modify celestia-app to accomodate mocha-4's lack of app version in genesis.json

@rootulp rootulp added the bug Something isn't working label Sep 3, 2024
@evan-forbes
Copy link
Member

evan-forbes commented Sep 3, 2024

is it possible to modify the genesis and sync an existing network from scratch? if so, is that a bug? my understanding of the genesis is that its the first block.

edit:
It appears that this is possible! however, the change involved changing the genesis state to something the app was expecting (app version v1). Committing to the hash of a json file is likely not a good idea and everything important has to be committed to elsewhere, but still seems slightly weird to not commit to the entire thing.

@rootulp
Copy link
Collaborator Author

rootulp commented Sep 4, 2024

As an alternative to modifying the genesis file: can celestia-app interpret an InitGenesis invocation on a genesis file with an unpopulated app version as 1?

Did this only surface for DevOps maintained Mocha nodes because it was a regression in v2.x.x?

@rootulp rootulp self-assigned this Sep 5, 2024
rootulp added a commit that referenced this issue Sep 16, 2024
Closes #3840 by
implementing option 2 because it seems like a bad practice to modify
`genesis.json` after the chain has launched.

~~Blocked on celestiaorg/celestia-core#1469

## Testing

I can state sync and block sync on Arabica and Mocha

```shell
./scripts/arabica.sh
./scripts/arabica-block-sync.sh
./scripts/mocha.sh
./scripts/mocha-block-sync.sh
```
rootulp added a commit that referenced this issue Sep 16, 2024
Closes #3840
Forward port of #3843


## Testing

I can state sync and block sync on Arabica and Mocha

```shell
./scripts/arabica.sh
./scripts/arabica-block-sync.sh
./scripts/mocha.sh
./scripts/mocha-block-sync.sh
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants