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

Prevent scheduled transaction to be sent in the same time by multiple nodes #420

Closed
Tracked by #419
ghost opened this issue Jun 29, 2022 · 2 comments
Closed
Tracked by #419
Labels
feature New feature request oracle chain Involve OracleChain rewards shared secrets Involve SharedSecrets

Comments

@ghost
Copy link

ghost commented Jun 29, 2022

Is your feature request related to a problem?

We are using some self-triggered transactions based on scheduling like cronjob.
Hence, we should avoid two nodes to send the same transaction with few milliseconds of interval.
This can happen if the transaction is validated too fastly, creating some race condition.

Describe the solution you'd like

The solution would be to either:

  • store the timestamp of the last transaction in the scheduler state (coming from the replication) to not relaunch if timestamp > last scheduler.
  • manage through FSM using event notifications

Additional context

stateDiagram-v2
    [*] --> IDLE
    IDLE --> CONFIRMED: replication confirmation
    CONFIRMED --> IDLE: schedule new cron
    IDLE --> SCHEDULED: recv cron event
    SCHEDULED --> SCHEDULED: replication confirmation
    SCHEDULED --> CONFIRMED
Loading
@ghost ghost added feature New feature request oracle chain Involve OracleChain shared secrets Involve SharedSecrets labels Jun 29, 2022
@ghost ghost mentioned this issue Jun 29, 2022
4 tasks
@ghost ghost changed the title Prevent scheduled transaction to be sent in the same times by multiple nodes Prevent scheduled transaction to be sent in the same time by multiple nodes Jun 29, 2022
@ghost ghost added the rewards label Jun 29, 2022
@ghost
Copy link
Author

ghost commented Jul 1, 2022

Hey team! Please add your planning poker estimate with ZenHub @apoorv-2204 @imnik11 @Neylix @prix-uniris

@ghost ghost self-assigned this Aug 19, 2022
@ghost
Copy link
Author

ghost commented Aug 25, 2022

Closed by #538

@ghost ghost closed this as completed Aug 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request oracle chain Involve OracleChain rewards shared secrets Involve SharedSecrets
Projects
None yet
Development

No branches or pull requests

0 participants