-
Notifications
You must be signed in to change notification settings - Fork 26
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
Flaw in transfer #4
Comments
We need the sender to either have:
Not sure if I understand you correctly, but we have 2 accounts, A and B, and A sends 1 to B, then A will have MIN_DEPOSIT_AMOUNT remaining, or exactly 0. If it's something else, an error is thrown, and the transfer is denied. Also, I know transfers look funky. Especially with the removal of nonces (we use 3 primitives to make nonces unnecessary: dedicated slot + transfer uniqueness in a block + one block per slot). If there are any inconsistencies with the ZRNT logic compared to the spec, I'm happy to continue discussion here. If not, then let's discuss in an issue on the specs repo. |
So the case is when you send from |
@holiman FYI: ZNRT is still in a relatively early phase. Most of my time is spent on spec YAML test generation, and optimized implementations of advanced but isolated features (fork choice, shuffling, ssz implementations). When I do have the time to update ZRNT, it's relatively quick. In ~week we should have state-transition YAML tests from my spec work, and I can start making ZRNT stable and well tested. |
@holiman Also, let me know if you want to contribute in any way, or build on top of ZRNT, we can figure something out within EF to align projects. |
Are you in Sydney as well, or maybe up for a call about Go ETH 2.0 plans? |
Unfortunately not :( |
Reviewed this again after discussing and thinking it was right (there's many other conditions in there), and you're right, there was a bug after all. Thanks for pointing it out! Fixed in specs, and in ZRNT (commit 167aacd ) |
This may totally be a false positive, not sure. However, in
block_transfer.go
I think that can be violated. If I have
transfer.Amount + transfer.Fee
on accountA
, and transfertransfer.Amount
(let's say1
) toB
, then I should have0
remaining. However, IfA
==B
, then that will leaveA
with1
, afterstate.IncreaseBalance(transfer.Recipient, transfer.Amount)
.Not sure if that's checked anywhere else?
The text was updated successfully, but these errors were encountered: