Skip to content

finalize end blocker of pse module#32

Merged
miladz68 merged 8 commits intomasterfrom
milad/pse-endblock-rollback
Nov 25, 2025
Merged

finalize end blocker of pse module#32
miladz68 merged 8 commits intomasterfrom
milad/pse-endblock-rollback

Conversation

@miladz68
Copy link
Contributor

@miladz68 miladz68 commented Nov 20, 2025

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 requested a review from a team as a code owner November 20, 2025 11:07
@miladz68 miladz68 requested review from TxCorpi0x, masihyeganeh and ysv and removed request for a team November 20, 2025 11:07
Copy link
Contributor

@ysv ysv left a comment

Choose a reason for hiding this comment

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

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


x/pse/keeper/keeper.go line 38 at r1 (raw file):

	AccountScoreSnapshot  collections.Map[sdk.AccAddress, sdkmath.Int]
	AllocationSchedule    collections.Map[uint64, types.ScheduledDistribution] // Map: timestamp -> ScheduledDistribution
	SkippedDistributions  collections.Item[bool]

nit: I think SkipDistributions is slightly better name for this flag style keeper variable.

Because SkippedDistributions sounds like it returns list of skipped distributions

Code quote:

SkippedDistributions

x/pse/keeper/distribution_test.go line 332 at r1 (raw file):

	requireT.NoError(err)
	// Process distribution
	err = testApp.FinalizeBlock()

I can see that startTime for distribution is in 1 hour.
Does it execute here ?


x/pse/keeper/genesis.go line 60 at r1 (raw file):

	}

	return k.SkippedDistributions.Set(ctx, false)

shouldn't we import/export it to genesis.json also ?

Copy link
Contributor Author

@miladz68 miladz68 left a comment

Choose a reason for hiding this comment

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

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


x/pse/keeper/distribution_test.go line 332 at r1 (raw file):

Previously, ysv (Yaroslav Savchuk) wrote…

I can see that startTime for distribution is in 1 hour.
Does it execute here ?

start time is 1 hour before, note the -1


x/pse/keeper/genesis.go line 60 at r1 (raw file):

Previously, ysv (Yaroslav Savchuk) wrote…

shouldn't we import/export it to genesis.json also ?

Done.


x/pse/keeper/keeper.go line 38 at r1 (raw file):

Previously, ysv (Yaroslav Savchuk) wrote…

nit: I think SkipDistributions is slightly better name for this flag style keeper variable.

Because SkippedDistributions sounds like it returns list of skipped distributions

Done.

Copy link
Contributor

@ysv ysv left a comment

Choose a reason for hiding this comment

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

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

Copy link
Contributor

@TxCorpi0x TxCorpi0x left a comment

Choose a reason for hiding this comment

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

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

Copy link
Contributor

@ysv ysv left a comment

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 r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @masihyeganeh)

@miladz68 miladz68 merged commit 243f99c into master Nov 25, 2025
15 of 16 checks passed
@miladz68 miladz68 deleted the milad/pse-endblock-rollback branch November 25, 2025 11:52
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