threefoldfoundation / tfchain

Official implementation of the ThreeFold blockchain
https://explorer.threefoldtoken.com
Apache License 2.0
13 stars 7 forks source link

ethvalidation does not accept all possible withdrawals #294

Closed LeeSmet closed 5 years ago

LeeSmet commented 5 years ago

WARN: block 8b2b80d496d4eba740ffb70cc74b6383228aa2a78a24428942aeb20afb5af09c cannot be applied: tx 70d042e74f7891e0b5b302e41ed255d6c4235e3ccb48833fd4a32d02c28724c8 is invalid: invalid ERC20 CoinCreation Tx: invalid attached ERC20 Tx: invalid ERC20 Tx: unexpected name for unpacked method ID: registerWithdrawalAddress

LeeSmet commented 5 years ago

methods which can trigger a withdraw:

robvanmieghem commented 5 years ago

@LeeSmet is going to document the withdrawal logic, just adding these methods as accepted is wrong. Either the event spawned from this transaction should be checked or the internal transactions, in which case we can delegate to the contract itself to generate one.

LeeSmet commented 5 years ago

documentation describing the withdraw flow has been added in https://github.com/threefoldfoundation/tfchain/commit/d9040f736309df24232abd7cc6854fa7d48e93ae, see https://github.com/threefoldfoundation/tfchain/blob/master/erc20/README.md#withdraw-flow

LeeSmet commented 5 years ago

validator reworked to retrieve past withdraw events and match on those in order to do the validation

LeeSmet commented 5 years ago

initial work done in 9c6333a65461635751d549f8649a27d8217fc015