Skip to content

create snapthot of staking module into pse after upgrade#20

Merged
miladz68 merged 6 commits into
masterfrom
milad/pse-staking-snapshot
Nov 20, 2025
Merged

create snapthot of staking module into pse after upgrade#20
miladz68 merged 6 commits into
masterfrom
milad/pse-staking-snapshot

Conversation

@miladz68

@miladz68 miladz68 commented Nov 13, 2025

Copy link
Copy Markdown
Contributor

Description

Reviewers checklist:

  • Try to write more meaningful comments with clear actions to be taken.
  • Nit-picking should be unblocking. Focus on core issues.

Authors checklist

  • Provide a concise and meaningful description
  • Review the code yourself first, before making the PR.
  • Annotate your PR in places that require explanation.
  • Think and try to split the PR to smaller PR if it is big.

This change is Reviewable

@miladz68 miladz68 marked this pull request as ready for review November 14, 2025 13:48
@miladz68 miladz68 requested a review from a team as a code owner November 14, 2025 13:48
@miladz68 miladz68 requested review from TxCorpi0x, masihyeganeh and ysv and removed request for a team November 14, 2025 13:48

@ysv ysv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ysv reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh and @TxCorpi0x)


app/upgrade/v6/pse_staking_snapshot_test.go line 25 at r1 (raw file):

	err := v6.SnapshotPSEStaking(ctx, stakingkeeper.NewQuerier(stakingKeeper), pseKeeper, addressCodec, valAddressCodec)
	requireT.NoError(err)
	// This is not an interesting test case, the real scenario can only be tested in integration tests.

but then this test doesn't seem to verify anything tangible, does it ?
Maybe we can create delegation in sim app before running SnapshotPSEStaking and verify that Score > 0 after.
Otherwise do we even need this test ?

@ysv ysv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @masihyeganeh, @miladz68, and @TxCorpi0x)


app/upgrade/v6/pse_staking_snapshot.go line 14 at r1 (raw file):

)

func SnapshotPSEStaking(

I guess the call of this function will be added in a next PR, right ?

@miladz68 miladz68 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @masihyeganeh, @TxCorpi0x, and @ysv)


app/upgrade/v6/pse_staking_snapshot_test.go line 25 at r1 (raw file):

Previously, ysv (Yaroslav Savchuk) wrote…

but then this test doesn't seem to verify anything tangible, does it ?
Maybe we can create delegation in sim app before running SnapshotPSEStaking and verify that Score > 0 after.
Otherwise do we even need this test ?

the test verifies that no error happened when taking the snapshot. it is ok to keep it IMO.

@miladz68 miladz68 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @masihyeganeh, @TxCorpi0x, and @ysv)


app/upgrade/v6/pse_staking_snapshot.go line 14 at r1 (raw file):

Previously, ysv (Yaroslav Savchuk) wrote…

I guess the call of this function will be added in a next PR, right ?

in this PR actually, it is a placeholder, it lacks proper tests.

ysv
ysv previously approved these changes Nov 17, 2025

@ysv ysv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @masihyeganeh and @TxCorpi0x)

@ysv ysv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ysv reviewed 6 of 6 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @masihyeganeh and @TxCorpi0x)

@TxCorpi0x TxCorpi0x left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:lgtm:

@TxCorpi0x reviewed 3 of 3 files at r1, 6 of 6 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @masihyeganeh)

@miladz68 miladz68 merged commit 585c30c into master Nov 20, 2025
21 of 23 checks passed
@miladz68 miladz68 deleted the milad/pse-staking-snapshot branch November 20, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants