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

Pinger contract/service #653

Open
Cashmaney opened this issue Nov 12, 2020 · 1 comment
Open

Pinger contract/service #653

Cashmaney opened this issue Nov 12, 2020 · 1 comment
Labels

Comments

@Cashmaney
Copy link
Member

There is a problem where some contracts want computation to happen every X blocks (for example, staking derivatives may want to calculate rewards every block, or every few blocks). To achieve something like this, you'd have to run external code that calls the contract periodically, manages gas, etc.

This could be streamlined by having a contract that is triggered every block that can trigger multiple other contracts, based on some criteria (e.g. call this contract once every 10 blocks, call another once every 20 blocks) etc. The challenges would be managing gas costs, and DoS resistance (what happens if one of the calls fails?).

Another idea is to have something like this as a service (off chain completely)

@reuvenpo
Copy link
Contributor

reuvenpo commented Feb 1, 2021

another issue if it's on-chain is accumulating computational overhead for nodes. If a contract asks to be run once every block, indefinitely... well it's going to be there for the rest of time.

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