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

Smart Contract bug following failed execution #375

Open
cmcgrath13 opened this issue Feb 12, 2019 · 1 comment
Open

Smart Contract bug following failed execution #375

cmcgrath13 opened this issue Feb 12, 2019 · 1 comment
Labels

Comments

@cmcgrath13
Copy link
Contributor

Describe the bug
After a smart contract fails to execute, we need to unroll the stack of operations to ensure all the funds set aside for the transaction are given back to their original holders. Upon the unroll, something within Seneca crashes

To Reproduce
-- See internal docs --

@cmcgrath13 cmcgrath13 added the bug label Feb 12, 2019
@StuartFarmer
Copy link
Contributor

Is there a potential solution in designing the CR layer where each transaction outputs a set of 'updates' but aren't applied until it succeeds? That would make it easy to throw out that set up updates without needing to do extra work to roll back.

IE: Keep the CR layer state as a Python dict or something rather than in Redis (which I think we already do) and then propose modifications to that dict by doing a deepcopy on it and modifying it during the execution. If the contract succeeds, it would replace the original dict. If it fails, it's tossed.

I'm also relying on my basic understanding of the CR layer. @dhaba would have to chime in here to correct me if I'm wrong.

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

2 participants