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

Bootstrap: Replicate missed transaction of current summary #1494

Merged

Conversation

bchamagne
Copy link
Member

Description

When a node starts and is authorized, it'll catch up the missed transaction of current summary (current day)
Fixes #1468

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Unit tested
Manual test of this scenario:

  1. 4 nodes running
  2. close one
  3. run a faucet
  4. restart the one
  5. check that faucet transaction is in db

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

@bchamagne bchamagne added feature New feature request bootstrap labels Apr 8, 2024
@bchamagne bchamagne force-pushed the 1468-selfrepair-current-summary branch from 4241d24 to 1ebc3e6 Compare April 8, 2024 14:41
@bchamagne bchamagne added this to the 1.5.1 milestone Apr 10, 2024
lib/archethic/bootstrap.ex Outdated Show resolved Hide resolved
lib/archethic/self_repair.ex Outdated Show resolved Hide resolved
@bchamagne bchamagne requested a review from Neylix April 18, 2024 13:55
lib/archethic/beacon_chain.ex Outdated Show resolved Hide resolved
lib/archethic/beacon_chain.ex Outdated Show resolved Hide resolved
replication_attestations:
subsets
|> Stream.flat_map(&BeaconChain.get_current_summary_replication_attestations/1)
|> ReplicationAttestation.reduce_confirmations()
Copy link
Member

Choose a reason for hiding this comment

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

Since the reducing confirmations is already done in the BeaconChain function, it is not needed to do it here as it isn't possible to have attestation for the same transaction on different subset

@Neylix Neylix merged commit 279bd6f into archethic-foundation:develop May 6, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bootstrap feature New feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

resynchronize genesis chain UTXO on node startup
2 participants