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

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

Merged
merged 11 commits into from
Oct 4, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 2, 2024

Closes #3818
Blocked on celestiaorg/celestia-core#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).

Closes #3818
~~Blocked on celestiaorg/celestia-core#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
```

(cherry picked from commit 73793b9)

# Conflicts:
#	.github/workflows/lint.yml
#	Makefile
#	docker/txsim/Dockerfile
#	go.mod
#	go.sum
@mergify mergify bot requested a review from a team as a code owner October 2, 2024 13:22
@mergify mergify bot added the conflicts label Oct 2, 2024
@mergify mergify bot requested review from cmwaters and evan-forbes and removed request for a team October 2, 2024 13:22
Copy link
Contributor Author

mergify bot commented Oct 2, 2024

Cherry-pick of 73793b9 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 rootulp self-assigned this Oct 2, 2024
@rootulp rootulp marked this pull request as draft October 2, 2024 13:25
@rootulp
Copy link
Collaborator

rootulp commented Oct 2, 2024

Putting in draft, let's merge #3848 first b/c that's a portion of the diff in this PR.

@github-actions github-actions bot added the bot item was created by a bot label Oct 2, 2024
@celestia-bot celestia-bot requested a review from a team October 2, 2024 13:35
@rootulp rootulp marked this pull request as ready for review October 2, 2024 13:44
@rootulp rootulp enabled auto-merge (squash) October 2, 2024 13:54
@rootulp rootulp removed the conflicts label Oct 2, 2024
staheri14
staheri14 previously approved these changes Oct 2, 2024
Copy link
Contributor

@staheri14 staheri14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just added a question about the developed tests, thanks!

app/test/state_sync_test.go Outdated Show resolved Hide resolved
rootulp
rootulp previously approved these changes Oct 3, 2024
@rootulp rootulp merged commit c7f26d6 into main Oct 4, 2024
32 checks passed
@rootulp rootulp deleted the mergify/bp/main/pr-3871 branch October 4, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot item was created by a bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle the app version when state syncing
2 participants