-
Notifications
You must be signed in to change notification settings - Fork 160
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
active_epoch_no field in pool_update table is incorrect for updates #610
Comments
I also stumbled over that problem today. I've updated both TITAN pools in the current epoch (e265), active_epoch_no is 267, which is fine for the margin change of one of the pools, but the pledge change will be active next epoch already (e266). So it should be +1 for pledge changes and +2 for parameter changes, right? |
All the pool parameters are handled in the same way, the pledge is no different. |
Pledge need to be met one epoch prio to be in the snapshot. So we have one epoch transition before we need to meet the newly registered pledge. That's why it looks like a wrong active epoch. As long as it stays consistent, it is fine. |
It can be a bit hard describing the snapshots. I made this picture recently to try to help: IntersectMBO/cardano-ledger#2282 The pledge (just like cost and margin, and all the pool parameters) is effected by the re-registration logic. |
The intention of There is currently an off-by-one bug that will be fixed in the next release. |
So, the fix will see the current behavior: re-register: e265 change to re-register: e265 right? |
Previously, the value inserted in the activeEpochNo field we calculated did not match the actual behaviour of the ledger rules. If the pool is found in `_pParams` of `PState` before the current block it's `epoch + 3` (retirements in the current block are irrelevant) if it's not found, but there is already another `PoolReg` in the current block it's `epoch + 3` again (we can check this from the db). Any other case is `epoch + 2`. Closes: #610
Previously, the value inserted in the activeEpochNo field we calculated did not match the actual behaviour of the ledger rules. If the pool is found in `_pParams` of `PState` before the current block it's `epoch + 3` (retirements in the current block are irrelevant) if it's not found, but there is already another `PoolReg` in the current block it's `epoch + 3` again (we can check this from the db). Any other case is `epoch + 2`. Closes: #610
Previously, the value inserted in the activeEpochNo field we calculated did not match the actual behaviour of the ledger rules. The epoch where the update becomes active is the current epoch plus two or three. * If the pool is found in `_pParams` field of `PState` before the current block its `+3` (retirements in the current block are irrelevant). * If it's not found, but there is already another `PoolReg` in the current block it's `+3` (we can check this from the db). * Otherwize its `+2`. Closes: #610
Previously, the value inserted in the activeEpochNo field did not match the actual behaviour of the ledger rules. The epoch where the update becomes active is the current epoch plus two or three. * If the pool is found in `_pParams` field of `PState` before the current block its `+3` (retirements in the current block are irrelevant). * If it's not found, but there is already another `PoolReg` in the current block it's `+3` (we can check this from the db). * Otherwize its `+2`. Closes: #610
The field
active_epoch_no
inpool_update table
is always +2 from the epoch of the transaction registering the update, while in reality it should be +2 for registrations and +3 for other updates.PoC code for all diffs being 2
Example of pool updates for a pool where there should be a diff of +3 in several places but the diff is recorded as +2
The text was updated successfully, but these errors were encountered: