Skip to content
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

Avoid wrapping genesis txs #3934

Open
grarco opened this issue Oct 21, 2024 · 1 comment
Open

Avoid wrapping genesis txs #3934

grarco opened this issue Oct 21, 2024 · 1 comment
Labels

Comments

@grarco
Copy link
Collaborator

grarco commented Oct 21, 2024

Right now in the tx_to_sign method of the TxToSign trait we call get_tx_to_sign which produces a wrapper transaction. We don't need a fee payer for a genesis transaction, and indeed the signature on it is produced and checked only against the raw_headher_hash: we should avoid wrapping the raw transaction in the first place.

Doing so would also remove the need for the genesis_fee_payer_pk and genesis_fee_token_address functions. Because the fee payer is required in the SigningTxData we need for signing, this seems to depend on #3901.

We could also think about adding an expiration to the genesis tx back in the past (we could use the same value we are using for the timestamp right now), just to make it even more strong against possible replays after genesis: this last change though would brake any genesis process currently underway.

@grarco grarco changed the title Avoid wrapping genesis tx Avoid wrapping genesis txs Oct 21, 2024
@grarco
Copy link
Collaborator Author

grarco commented Dec 23, 2024

Right now it is not possible to apply the changes suggested here because the hardware wallet can only handle wrapped transactions. We could come back at this if we ever changed that logic, for now I'm setting the priority of this issue to low

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant