celestiaorg / celestia-app

Celestia consensus node
https://celestiaorg.github.io/celestia-app/
Apache License 2.0
345 stars 292 forks source link

feat(statesync): extract app version from snapshot (backport #3871) #3936

Closed mergify[bot] closed 1 month ago

mergify[bot] commented 1 month ago

Closes https://github.com/celestiaorg/celestia-app/issues/3818 Blocked on https://github.com/celestiaorg/celestia-core/pull/1477

I had to bump the celestia-core depedency to get a feature that I wanted. That implied upgrading Go and cosmos-sdk versions.

Testing

I verified that logs added in this PR show up when state syncing on Mocha. The logs show that the app version provided in the OfferSnapshot ABCI method was plumbed through correctly.


./scripts/mocha.sh
...
2:44PM INF Offering snapshot to ABCI app format=2 hash="$�ڢ�\x1b� �zΊ\x15���`��왹\b^G:\x03+ߢޯ" height=2782000 module=statesync
2:44PM INF offering snapshot app_version=2 height=2782000
2:44PM INF mounting keys for snapshot app_version=2
```<hr>This is an automatic backport of pull request #3871 done by [Mergify](https://mergify.com).
mergify[bot] commented 1 month ago

Cherry-pick of 73793b963f1e7a1f360caa9757523725cce9eb92 has failed:

On branch mergify/bp/main/pr-3871
Your branch is up to date with 'origin/main'.

You are currently cherry-picking commit 73793b96.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
    modified:   .goreleaser.yaml
    modified:   README.md
    modified:   app/app.go
    modified:   app/app_test.go
    new file:   app/test/state_sync_test.go
    modified:   docker/Dockerfile
    modified:   go.work.example
    modified:   scripts/single-node.sh
    new file:   scripts/state-sync.sh
    modified:   test/interchain/go.mod

Unmerged paths:
  (use "git add <file>..." to mark resolution)
    both modified:   .github/workflows/lint.yml
    both modified:   Makefile
    both modified:   docker/txsim/Dockerfile
    both modified:   go.mod
    both modified:   go.sum

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

rootulp commented 1 month ago

Putting in draft, let's merge https://github.com/celestiaorg/celestia-app/pull/3848 first b/c that's a portion of the diff in this PR.