Skip to content

Conversation

@jstuczyn
Copy link
Contributor

@jstuczyn jstuczyn commented Aug 21, 2025

the issue was as follows:

  1. our rewarded set was set to X, for argument sake say 200 (I don't remember exact value)
  2. we sent transaction to update it to Y, say 100
  3. this internally updated the interval rewarding parameters inside the mixnet contract including the default active and standby node work factors. note that the rewarded set itself stayed the same, as it only changes after epoch rolls over and new one is assigned [by the nym-api]
  4. epoch has finished and nym-api wanted to do the rewarding. it grabbed the current rewarded set (of X, 200) and started calculating the total work in the system. but since the contract already had new parameters (adjusted for size of Y, 100), the result was greater than 1 thus nym api was preventably blowing up.

to fix it I've introduce additional checks, so that if the current rewarded set does not match the specification defined in the contract rewarding parameters, nym api will attempt to do its best to manually calculate work factors for this epoch.

This change is Reviewable

@vercel
Copy link

vercel bot commented Aug 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
nym-explorer-v2 Ready Ready Preview Comment Aug 21, 2025 3:58pm
nym-node-status Ready Ready Preview Comment Aug 21, 2025 3:58pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs-nextra Ignored Ignored Aug 21, 2025 3:58pm

@jstuczyn jstuczyn merged commit 17708cd into develop Aug 27, 2025
21 of 23 checks passed
@jstuczyn jstuczyn deleted the bugfix/nym-api-rewarded-set-work-factor branch August 27, 2025 11:33
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.

2 participants