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

feat(events): handle events during the load phase #534

Merged
merged 13 commits into from
Mar 15, 2023
Merged

Conversation

glevco
Copy link
Contributor

@glevco glevco commented Feb 23, 2023

Acceptance Criteria:

  • Emit LOAD_FINISHED event when the full node ends the LOAD phase.
  • Remove LOAD_STARTED event, because it wasn't used and is not necessary. If needed, existing MANAGER_ON_START event serves the same purpose.
  • Emit NETWORK_NEW_TX_ACCEPTED events for all txs during the LOAD phase.
  • Implement --x-emit-load-events flag, that enables emission of events published during the LOAD phase.
    • It cannot be used without the --x-enable-event-queue flag.
    • It cannot be used with the --x-full-verification flag.

@glevco glevco self-assigned this Feb 23, 2023
@glevco glevco changed the base branch from master to dev March 3, 2023 04:33
@glevco glevco changed the title feat(load-events): handle full node loading events feat(events): handle full node loading events Mar 3, 2023
@glevco glevco changed the title feat(events): handle full node loading events feat(events): handle events during the load phase Mar 3, 2023
@glevco glevco marked this pull request as ready for review March 3, 2023 04:47
@glevco glevco requested review from jansegre and msbrogli as code owners March 3, 2023 04:47
tests/event/test_event_reorg.py Outdated Show resolved Hide resolved
hathor/manager.py Outdated Show resolved Hide resolved
hathor/manager.py Outdated Show resolved Hide resolved
hathor/event/event_manager.py Show resolved Hide resolved
tests/event/test_event_reorg.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 8, 2023

Codecov Report

Merging #534 (efe6f7d) into dev (adc0ac5) will decrease coverage by 0.01%.
The diff coverage is n/a.

❗ Current head efe6f7d differs from pull request most recent head 9d8a616. Consider uploading reports for the commit 9d8a616 to get more accurate results

@@            Coverage Diff             @@
##              dev     #534      +/-   ##
==========================================
- Coverage   83.20%   83.20%   -0.01%     
==========================================
  Files         211      211              
  Lines       18646    18644       -2     
  Branches     2590     2590              
==========================================
- Hits        15514    15512       -2     
+ Misses       2563     2562       -1     
- Partials      569      570       +1     
Impacted Files Coverage Δ
hathor/event/event_manager.py 97.01% <ø> (ø)
hathor/event/model/base_event.py 92.30% <ø> (ø)
hathor/pubsub.py 94.80% <ø> (-0.14%) ⬇️

... and 3 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@glevco glevco force-pushed the feat/load-events branch 2 times, most recently from 8acfd78 to a4e6197 Compare March 10, 2023 00:36
@glevco glevco force-pushed the feat/load-events branch from a4e6197 to 9d8a616 Compare March 10, 2023 16:53
Copy link
Member

@jansegre jansegre left a comment

Choose a reason for hiding this comment

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

For me it's approved considering that we discussed to leave this provisional and make tweaks later.

@glevco glevco deleted the feat/load-events branch March 15, 2023 17:17
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.

3 participants