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

Validate smart contract calls #57

Closed
3 tasks
ghost opened this issue Sep 1, 2021 · 2 comments · Fixed by #802 · May be fixed by netboz/archethic-node#1
Closed
3 tasks

Validate smart contract calls #57

ghost opened this issue Sep 1, 2021 · 2 comments · Fixed by #802 · May be fixed by netboz/archethic-node#1
Assignees
Labels
API Involve API facing user feature New feature request smart contracts Involve smart contracts

Comments

@ghost
Copy link

ghost commented Sep 1, 2021

Rationale

When a transaction is targeting a smart contract through the recipients field in the transaction data, we should provide a way to check if the transaction would be valid before to send.
Hence, clients can call this endpoint to be sure the transaction will pass.

Why not doing it during transaction validation ?

Because if the transaction calls are invalid, we don't want a user to spam the network making DDOS attack for nothing and do not pay the fee as the transaction would be not valid.
So by letting the transaction be validated and refused on the smart contract side, we are using the fee as a security mechanism for malicious attacks towards smart contracts.

How to do it

We should provide an API to check the validity of the smart contract call.
This API should:

  • Download transaction's code of the smart contract targeted
  • Interpret the transaction conditions with the pending transaction as input
  • Return errors or success
@ghost ghost added feature New feature request smart contracts Involve smart contracts labels Sep 1, 2021
@ghost ghost changed the title Smart Contract call validatioon Smart Contract call validation Sep 1, 2021
@ghost ghost added this to the ARCHEthic 1.0 milestone Sep 7, 2021
@ghost ghost changed the title Smart Contract call validation Validate smart contract calls Nov 16, 2021
@ghost ghost changed the title Validate smart contract calls [Feature]: Validate smart contract calls Dec 2, 2021
@ghost ghost removed this from the 1.0 milestone Feb 10, 2022
@ghost ghost added the mining Involve transaction validation and mining label Feb 24, 2022
@internet-zero
Copy link
Member

Hey team! Please add your planning poker estimate with ZenHub @apoorv-2204 @blackode @imnik11 @roychowdhuryrohit-dev @samuel-uniris

@ghost ghost changed the title [Feature]: Validate smart contract calls Validate smart contract calls Mar 11, 2022
@ghost ghost mentioned this issue May 13, 2022
@ghost ghost mentioned this issue Jun 27, 2022
@ghost ghost added API Involve API facing user and removed mining Involve transaction validation and mining labels Aug 12, 2022
@internet-zero
Copy link
Member

Please add your planning poker estimate with Zenhub @Neylix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Involve API facing user feature New feature request smart contracts Involve smart contracts
Projects
Status: Done 🍻
3 participants