-
Notifications
You must be signed in to change notification settings - Fork 155
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
Unexpected removal of DRep delegation leading to an issue with withdrawal #4772
Comments
It was put to my attention by Martin that it could maybe be related to the v10 HF, that DRep was marked as inactive long before the HF was enacted in epoch |
We can no longer fix this issue without a hardfork. The danger of fixing it without a hardfork would be that discrepencies in the ledger state could lead to different nodes having different DRep delegations when we out of the bootstrap, if such bug to be manifested on mainnet. This commit ensures that the fix is applied during the hardfork out of the bootstrap phase.
We can no longer fix this issue without a hardfork. The danger of fixing it without a hardfork would be that discrepencies in the ledger state could lead to different nodes having different DRep delegations when we out of the bootstrap, if such bug to be manifested on mainnet. This commit ensures that the fix is applied during the hardfork out of the bootstrap phase.
This is how it was suppose to be implemented to begin with, however this fix no longer can be applied without a hradfork, so the follow up commit will take care of that.
We can no longer fix this issue without a hardfork. The danger of fixing it without a hardfork would be that discrepencies in the ledger state could lead to different nodes having different DRep delegations when we out of the bootstrap, if such bug to be manifested on mainnet. This commit ensures that the fix is applied during the hardfork out of the bootstrap phase.
So, I was able to get to the bottom of this earlier today. It is indeed a bug in the ledger code. It was introduced in #4598 and the actual reproducer of this bug requires a bit of a setup and it was really hard to spot. For the curious here would be the bugfix, if it was spotted before we made an actual release: c3059b0 In order to demystify this bug here is how it depicted itself on preview:
Normally what should have happened is DRep Once there was no delegation to any DRep it was impossible to withdraw rewards, so that part behaved as expected and inactivity of DReps played no role in this bug, it was just a coincidence. This is a very unfortunate bug, but it is a blessing that it was discovered before the hard fork to protocol version 10.0 on mainnet! So, @Scitz0 thank very much for this bug report! The fix is implemented in #4773 and we'll be working out the details on how to proceed with deploying this fix on preview/preprod/mainnet. Clearly cardano-node-10.1.2 and prior cannot be used for the hard fork out of bootstrap on mainnet, so there will be a new release for that purpose. We'll be discussing the details during the Hard Fork Working Group meeting tomorrow. |
An error was noticed when trying to submit a transaction including a withdrawal when the stake key has a vote delegation to a registered but inactive DRep. Multiple tests were performed. And it was not always the case when withdrawing rewards with a vote delegation to an inactive DRep that the error was given.
Describing the flow of events to make it a bit clearer.
2274519ac5359c003a7ace69c475ae55a86eb8f9fec6cf6feaada1debf
. This DRep was registered in epoch724
, updated in734
and marked as inactive in754
. Rewards was successfully withdrawn in epoch758
, tx hashde2342e28817d3117e8fd09e01dd948668cb15a61d1cfcdf914eb8861c9d404f
. This confirmed how it should work, that inactive state should not prevent withdrawal.758
after test in (2), hex22fa6a8dc2635dddcf9af495cb144f7eb4ff845866fe48695ad7cb65d3
. This DRep is from own account but doesn't matter. Registered in epoch664
and vote cast in684
as the only action. Thus expired in epoch704
.759
to receive new rewards to withdraw as it was easier with the tools at hand (I know you can withdraw 0 lovelace). Now we get the error message again as we originally found. Tried both w/ and w/o 258 tagged sets to be sure it wasn't connected to that.Network:
Preview Testnet
Abs slot for submission test:
65610177
Node version:
cardano-node 10.1.1 - linux-x86_64 - ghc-8.10 git rev 4184f9297bf7306713bfbb8f39eef61c056198cc
CLI version:
cardano-cli 10.1.1.0 - linux-x86_64 - ghc-9.6 git rev 0000000000000000000000000000000000000000
Ogmios version:
v6.9.0 (a07c154e)
Wallet address:
CBOR (w/o 258 tag)
CBOR (w/ 258 tag)
Ogmios error:
Node error:
The text was updated successfully, but these errors were encountered: