-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
ProverPool bug (address gets removed) #14402
Comments
@davidtaikocha could you work on this one? |
Yep sure, will do the investigation |
+1 possible clue (activity around this address): 0xae3f94f9d84dd8aff257c6bb9a5a8e61d930162a The reason it is suspicious because if we query (UPDATE: This address staked well after Ivy got kicked out, so might be not related at all! But given Ivy has still proverId 3, suspicious on it's own - how Ivy's address could retain proverId: 3 (one possible scneario below, but we should still saw the |
@dantaik @davidtaikocha one scenario to think about:
|
Okay, so i have an explanation (tho i'd like to request more pair of eyes on it because it is just one possible answer how it could happen). David sent me a hint, that address: 0x5A0C30dd34d0a05742c64725D44505607e6Fbee4 was able to withdraw Ivy's funds from the prover pool and it seemed that when he/she staked she exited his/her funds but actually it was Ivy's fund. Let me explain how it could happen. We have stakers:
Let's say we have lots and lots of slashed (as how it happened last night see David's post here.) So that Ed is slashed to 0. Now the new proving table is the following:
Now, Fred wants to stake and he is indeed able to stake on position 5 - force-exiting Ed. But since the previous comment/bug highlights, Ed actually could retain his I cannot say exactly if this happaned, but i'm pretty sure - it would be cool to go back and see Imo prover pool contract got a bit too complex if debugging this is issue seems to be very challenging for 2 engineers for several hours. |
I think an easy fix is the following, in
|
Yep this fix makes some sense to me (+ left a comment in #14411 ), and we also need to clean those dirty data? |
Thank you, @adaki2004, for analyzing and fixing the bug. Lets verify the fix with a upgrade to Eldfell L3. @davidtaikocha |
Describe the bug
Ivy from ZkPool reached out to us, reporting that she staked with 2 addresses , 5 TKOe each. (
0x08f0B99Ab6624bdf7bC4F0A75504a64154791fD8
,0x2EA93391Cd55617E8e4CA1FD66E881d5ACbAA76B
).She got assigned to blocks and she got slashed couple of times (but 0.01 - so the minimum amount) but around couple of minutes (cca. 30mins) she disappeared from the provers table. (top32).
Her stake with
0x2e..
can be seen here:https://explorer.test.taiko.xyz/tx/0xf6c3b14385f59ae747fa54c5114db4497c364ec9074c9ec711f9c31defb0a3b1
I created a python script which parses events (from the (block number of the staking) - 1) in which this
0x2e..
address is mentioned , see the code in theadditional context section
together with the log.The weird thing is, since she staked there are 4 events:
1 stake
1 exit (which comes with the stake by default)
2 slashes
Nothing more, but she is not in the prover table any more.
If you check the explorer:
https://explorer.test.taiko.xyz/address/0xC9580414A4372BDdBd8e19e01854DC0B2b1390Cf/read-proxy#address-tabs
She is not there. Altough when you query getStaker("0x2EA93391Cd55617E8e4CA1FD66E881d5ACbAA76B") you get this:
UPDATE (to this above tuple): When you query the result now, you will see different prover struct. This is because
address 0xae3f94f9d84dd8aff257c6bb9a5a8e61d930162a came in to provers (occupiying the place proverId:3 represents, so when you query Ivy's address, - since it points to the porverId: 3, it will print those results)
Since she is not in the prover table, her proverId shall not be 3.. Because we can clearly see she is not in the
getProvers()
.Steps to reproduce
Steps to reproduce here.
Additional context
Log:
Simply run it as
python3 script.py
(once you set theRPC URL
and installed therequests
lib)The text was updated successfully, but these errors were encountered: