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

Make inner tx of PayingForTx non-valid #3437

Merged
merged 2 commits into from Jan 5, 2021

Conversation

velzevur
Copy link
Member

@velzevur velzevur commented Jan 1, 2021

Fixes #3054

There is a suggested approach in the issue: use empty network_id for signing the inner transaction. This has one big flaw: the inner transaction is repayable on a different network with a different network_id. Instead I took a slightly different approach: the inner transaction uses <netwok_id>-<encoded payer_id>, so for example it would be used ae_mainnet-ak_123.... Note that the payer account's ID is Base58c encoded.

The work on this PR is supported by the Aeternity Crypto Foundation.

Copy link
Member

@hanssv hanssv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should have something static instead of the payer pubkey, it should be possible for "anyone" to pick up the inner tx.

apps/aecore/test/aec_test_utils.erl Outdated Show resolved Hide resolved
apps/aega/test/aega_SUITE.erl Outdated Show resolved Hide resolved
Copy link
Contributor

@gorbak25 gorbak25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please forbid using "-inner_tx" in the network id.
If at some point someone launches "ae_mainnet-inner_tx" then inner transactions from ae_mainnet could be published on "ae_mainnet-inner_tx". When starting/booting the node please hard crash when the network id ends with "-inner_tx" so someone in the future doesn't accidentally shot himself in the foot.

@hanssv
Copy link
Member

hanssv commented Jan 4, 2021

I wonder if it isn't better to make a quiz with random detailed questions about AE that you have to answer correctly in order to be allowed to start the node? I don't think we will be able to stop truly people from shooting themselves in the foot otherwise?

@velzevur velzevur merged commit b1faccc into master Jan 5, 2021
@velzevur velzevur deleted the GH-3054_make_inner_tx_of_paying_for_non_valid branch January 5, 2021 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make inner transaction of PayingForTx non-valid
4 participants