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

Enhance smart contract's seed security #686

Closed
samuelmanzanera opened this issue Nov 15, 2022 · 1 comment
Closed

Enhance smart contract's seed security #686

samuelmanzanera opened this issue Nov 15, 2022 · 1 comment
Labels
feature New feature request mining Involve transaction validation and mining smart contracts Involve smart contracts to-analyze

Comments

@samuelmanzanera
Copy link
Member

samuelmanzanera commented Nov 15, 2022

Is your feature request related to a problem?

Archethic's smart contract leverages secret delegation to allow self-triggered transactions.
In this context, the smart contract's owner encrypts the chain's seed with the storage nonce public key (known by all the nodes).

Of course, to restrict the impact of the seed's usage, the inherit constraints define a whitelist of mutated properties allowed by the nodes.
So, a node could not change something which was not expected.

Because the storage nonce is known by all the nodes at any time, some people could have access to all the seeds of the smart contracts and try to leverage this to build transactions unexpected.

To prevent security issue, if the inherit constraints were not well scoped, we can increase the way the transactions are triggered to target only authorized nodes and leverage proof of work to ensure the origin.

Describe the solution you'd like

To tackle this problem, I propose to ensure the origin of the transactions by changing the Contracts.accept_new_contract/3 function to check the origin signature based on the list of authorized nodes

Additional context

Epic: #608

@samuelmanzanera samuelmanzanera added feature New feature request smart contracts Involve smart contracts mining Involve transaction validation and mining labels Nov 15, 2022
@samuelmanzanera
Copy link
Member Author

No need after #945

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request mining Involve transaction validation and mining smart contracts Involve smart contracts to-analyze
Projects
Status: Done 🍻
Development

No branches or pull requests

1 participant