You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement the handling of Ethereum Accounts during the genesis process:
Add it as an option for the genesis model
Add such addresses via the CLI commands
Handle them in the genesis interpreter by creating EVM actors and inserting into the Init actor
Background
During consensus-shipyard/fendermint#124 it was revealed that it's impossible to do a simple transfer between two "native" FVM Accounts using the Ethereum API. It can only be used to interact with Ethereum Accounts, which are different.
By native accounts we mean the f1 accounts, which have an address like f1<20-byte-from-blake2b-hash-of-secp256k1> , while the Ethereum accounts are the f410<20-byte-from-keccak256-hash-of-secp256k1> variants, a.k.a. f410 accounts. To send messages from them, any address like this has to be known by the Init actor.
During genesis we set up f1 accounts, but we could also set up f410 ones; currently the only way to create one would be to send a transfer of tokens from an f1 account to an f410 account, however, this can only be done with the Fendermint CLI, not the Ethereum API.
The reason the Ethereum API cannot send from f1 accounts is that the from of the transaction is not part of the RLP encoding of the transaction. Instead, the receiver side recovers the public key used to sign the transaction based on a specific hashing algorithm that Ethereum clients use. Once we have the public, we could generate f1 or f410 from it, but we don't know which one it should be, and both can exist on the ledger, independently. Therefore the product decision was that the translation layer that turns Ethereum transactions into Filecoin messages will use f410 addresses, and thus the Ethereum API only works if the f410 account actually exists.
Implementing this story will allow us to set up test accounts for Ethereum as well in the smoke tests, rather than have to resort to the native RPC commands for this during the tests.
The text was updated successfully, but these errors were encountered:
Implement the handling of Ethereum Accounts during the genesis process:
Background
During consensus-shipyard/fendermint#124 it was revealed that it's impossible to do a simple transfer between two "native" FVM Accounts using the Ethereum API. It can only be used to interact with Ethereum Accounts, which are different.
By native accounts we mean the f1 accounts, which have an address like
f1<20-byte-from-blake2b-hash-of-secp256k1>
, while the Ethereum accounts are thef410<20-byte-from-keccak256-hash-of-secp256k1>
variants, a.k.a. f410 accounts. To send messages from them, any address like this has to be known by theInit
actor.During genesis we set up f1 accounts, but we could also set up f410 ones; currently the only way to create one would be to send a transfer of tokens from an f1 account to an f410 account, however, this can only be done with the Fendermint CLI, not the Ethereum API.
The reason the Ethereum API cannot send from f1 accounts is that the
from
of the transaction is not part of the RLP encoding of the transaction. Instead, the receiver side recovers the public key used to sign the transaction based on a specific hashing algorithm that Ethereum clients use. Once we have the public, we could generate f1 or f410 from it, but we don't know which one it should be, and both can exist on the ledger, independently. Therefore the product decision was that the translation layer that turns Ethereum transactions into Filecoin messages will use f410 addresses, and thus the Ethereum API only works if the f410 account actually exists.Implementing this story will allow us to set up test accounts for Ethereum as well in the smoke tests, rather than have to resort to the native RPC commands for this during the tests.
The text was updated successfully, but these errors were encountered: