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

Verify scheduled transaction only happens once #534

Merged
9 commits merged into from
Aug 25, 2022
Merged

Conversation

ghost
Copy link

@ghost ghost commented Aug 19, 2022

Description

Ensure network transactions which are scheduled to happen only once in their interval.

Fixes #421

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Start multiple nodes, at some point nodes will have different time synchronization.
Hence one might send a node shared secrets tx just after one have been already sent (until #420 is implemented)

The validation should catch it and the tx would not be validated.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@ghost ghost added bug Something isn't working mining Involve transaction validation and mining oracle chain Involve OracleChain shared secrets Involve SharedSecrets labels Aug 19, 2022
@ghost ghost requested a review from apoorv-2204 August 19, 2022 16:13
@ghost ghost force-pushed the verify_network_tx_once branch from b2752b4 to 451ef20 Compare August 22, 2022 09:26
Copy link
Contributor

@apoorv-2204 apoorv-2204 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe test cases under mining_pending_validation_test.exs

lib/archethic/shared_secrets.ex Outdated Show resolved Hide resolved
@ghost ghost force-pushed the verify_network_tx_once branch from dbc7270 to e7b5b25 Compare August 23, 2022 07:04
Copy link
Contributor

@apoorv-2204 apoorv-2204 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

lib/archethic/mining/pending_transaction_validation.ex Outdated Show resolved Hide resolved
@ghost ghost merged commit 0183081 into develop Aug 25, 2022
@ghost ghost deleted the verify_network_tx_once branch August 25, 2022 14:57
ghost pushed a commit that referenced this pull request Aug 25, 2022
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mining Involve transaction validation and mining oracle chain Involve OracleChain shared secrets Involve SharedSecrets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants