Skip to content

integrate address exclusion functionality from distribution#27

Merged
miladz68 merged 4 commits into
masterfrom
milad/integrate-excluded-addresses
Nov 19, 2025
Merged

integrate address exclusion functionality from distribution#27
miladz68 merged 4 commits into
masterfrom
milad/integrate-excluded-addresses

Conversation

@miladz68

@miladz68 miladz68 commented Nov 17, 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 requested a review from a team as a code owner November 17, 2025 10:38
@miladz68 miladz68 requested review from TxCorpi0x, masihyeganeh and ysv and removed request for a team November 17, 2025 10:38

@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 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh and @TxCorpi0x)


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

		return nil
	}
	key, err := m.addressCodec.BytesToString(addr)

but shouldn't we skip excluded addresses here also ?

This way they will not be accounted in total score also and as result we will be able to distribute ~100% of allocated tokens.
Because with current implementation significant amount might be left

@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, 1 unresolved discussion (waiting on @masihyeganeh, @TxCorpi0x, and @ysv)


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

Previously, ysv (Yaroslav Savchuk) wrote…

but shouldn't we skip excluded addresses here also ?

This way they will not be accounted in total score also and as result we will be able to distribute ~100% of allocated tokens.
Because with current implementation significant amount might be left

we never get this code since it is called in one of the iterations.

@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 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh, @miladz68, and @TxCorpi0x)


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

Previously, miladz68 (milad) wrote…

we never get this code since it is called in one of the iterations.

I see what you mean.
However, it was a bit confusing because AddScore method is public, but it is used by iterateDelegationTimeEntries & iterateAccountScoreSnapshot both of which are private.

maybe we should make addScore private also because otherwise excluded addresses logic might be broken if addScore is called externally

@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, 1 unresolved discussion (waiting on @masihyeganeh, @TxCorpi0x, and @ysv)


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

Previously, ysv (Yaroslav Savchuk) wrote…

I see what you mean.
However, it was a bit confusing because AddScore method is public, but it is used by iterateDelegationTimeEntries & iterateAccountScoreSnapshot both of which are private.

maybe we should make addScore private also because otherwise excluded addresses logic might be broken if addScore is called externally

make sense. Done.

@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.

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

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

@miladz68 miladz68 merged commit a4132a3 into master Nov 19, 2025
9 checks passed
@miladz68 miladz68 deleted the milad/integrate-excluded-addresses branch November 19, 2025 11:51
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