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

add removedtx action #370

Merged
merged 1 commit into from
Mar 25, 2024
Merged

add removedtx action #370

merged 1 commit into from
Mar 25, 2024

Conversation

n13
Copy link
Collaborator

@n13 n13 commented Mar 22, 2024

Error handling on deferred transactions

Our scheduler replaces the old EOSIO deferred transactions.

When deferred actions fail, they need to be removed from the list - otherwise the action never executes, and is never removed from the list because the entire executenext action fails. So we end up with an infinite loop trying to execute an action that has an error.

We accommodate timeout errors by trying a few times.

We also catch "nothing to execute" errors.

For all other errors, we remove the action from the scheduler table, since it cannot be executed.

Ideally there won't be any invalid actions in the scheduler's list, but we saw the error now when the contract is trying to call close prop on staged proposals, causing an error.

We never saw these errors in the past, they were on deferred transactions and failing silently. The fix is to remove the scheduled close doc prop action for staged proposals, but the scheduler needs to deal with failing actions anyway.

This required changes in the contract, the permissions, and the scheduler script.

Contract changes

Added removedtx action

Permissions changes

Added scheduler permission to dao.hypha
Link scheduler permission with removedtx action

Script changes

Catch errors in actions, and call removedtx in case a scheduled action fails.

Other changes in this PR: Some cleanups.

See also
hypha-dao/hypha-smart-contracts#26
https://github.com/JoinSEEDS/hypha-accept-payments/pull/28

Deploy Status

  • Deploy Contract on EOS Testnet
  • Deploy Contract on Telos Testnet
  • Deploy Contract on EOS Mainnet
  • Deploy Contract on Telos Mainnet
  • Permissions update on EOS Testnet
  • Permissions update on Telos Testnet
  • Permissions update on EOS Mainnet
  • Permissions update on Telos Mainnet
  • Backend script update for all networks
  • Enable backend script for Telos Mainnet
  • Telos Testnet - re-enable backend script once permissions are updated. It is now stopped so it doesn't spam errors.

Note: Backend deployed
Telos Testnet - waiting for keys from Gery - need owner key to add permission
Telos Mainnet - deferred transactions still work, we need to switch to new contract by msig: Deploy new contract and change permissions.

remove debug actions
@n13 n13 merged commit b9242f0 into master Mar 25, 2024
3 of 4 checks passed
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.

1 participant