Skip to content

Force initialization before using the TXM#361

Merged
aodhgan merged 17 commits intomasterfrom
gabriel/txm-force-initialization
Feb 10, 2025
Merged

Force initialization before using the TXM#361
aodhgan merged 17 commits intomasterfrom
gabriel/txm-force-initialization

Conversation

@GabrielMartinezRodriguez
Copy link
Contributor

@GabrielMartinezRodriguez GabrielMartinezRodriguez commented Jan 22, 2025

Linked Issues

Description

Adds a started flag to the TransactionManager to prevent usage before initialization. The flag is set to true after the start() method completes successfully. Warning messages are added to key methods when they are called before initialization.

Internal new block events are now only emitted when the transaction manager has been properly started.

Checklist

  • B1. I have applied the proper label & proper branch name (e.g. norswap/build-system-caching).
  • B2. This PR is not so big that it should be split & addresses only one concern.
  • B3. The PR targets the lowest branch it can (ideally master).

Correctness

  • C1. Builds and passes tests.
  • C2. The code is properly parameterized & compatible with different environments.
  • C3. I have manually tested my changes & connected features.
  • C4. I have performed a thorough self-review of my code.

Architecture & Documentation

  • D1. I made it easy to reason locally about the code.
  • D2. All public-facing APIs & meaningful internal APIs are properly documented.
  • D3. If appropriate, the general architecture is documented.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 22, 2025

Deploying happychain with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2e6b4ea
Status: ✅  Deploy successful!
Preview URL: https://19cb8015.happychain.pages.dev
Branch Preview URL: https://gabriel-txm-force-initializa.happychain.pages.dev

View logs

@GabrielMartinezRodriguez GabrielMartinezRodriguez marked this pull request as ready for review January 22, 2025 11:03
@linear
Copy link

linear bot commented Jan 22, 2025

@GabrielMartinezRodriguez GabrielMartinezRodriguez added the reviewing-1 Ready for, or undergoing first-line review label Jan 22, 2025
@GabrielMartinezRodriguez GabrielMartinezRodriguez changed the title Add started flag to TransactionManager Force initialization before using TXM Jan 22, 2025
@GabrielMartinezRodriguez GabrielMartinezRodriguez changed the title Force initialization before using TXM Force initialization before using the TXM Jan 22, 2025
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/txm-force-initialization branch from 48ae59d to 1f12879 Compare January 22, 2025 11:43
@GabrielMartinezRodriguez GabrielMartinezRodriguez changed the base branch from gabriel/on-new-block to gabriel/randomness-local-script January 22, 2025 11:43
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/randomness-local-script branch 2 times, most recently from 7446669 to 9ed42c1 Compare January 22, 2025 14:18
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/txm-force-initialization branch from 1f12879 to db559e2 Compare January 22, 2025 14:20
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/txm-force-initialization branch from db559e2 to ce40619 Compare January 23, 2025 10:37
@GabrielMartinezRodriguez GabrielMartinezRodriguez changed the base branch from gabriel/randomness-local-script to gabriel/randomnness-monitor January 23, 2025 10:37
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/txm-force-initialization branch from ce40619 to 30792ba Compare January 23, 2025 14:44
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/txm-force-initialization branch from 6d56270 to 0c3569a Compare February 10, 2025 18:53
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/txm-force-initialization branch from 0c3569a to 0e8184e Compare February 10, 2025 18:58
@aodhgan aodhgan force-pushed the gabriel/randomnness-monitor branch from 72d43d6 to ab4f347 Compare February 10, 2025 19:33
Base automatically changed from gabriel/randomnness-monitor to master February 10, 2025 19:38
@aodhgan aodhgan removed the merge-blocked Ready to merge, waiting for downstack label Feb 10, 2025
@aodhgan aodhgan force-pushed the gabriel/txm-force-initialization branch from 11296ce to 2e6b4ea Compare February 10, 2025 20:12
@aodhgan aodhgan merged commit 7ea9d93 into master Feb 10, 2025
3 checks passed
@aodhgan aodhgan deleted the gabriel/txm-force-initialization branch February 10, 2025 20: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.

5 participants