Skip to content

Allow run multiple txm simultaneously within the same service#285

Merged
GabrielMartinezRodriguez merged 5 commits into
masterfrom
gabriel/txm-address
Jan 7, 2025
Merged

Allow run multiple txm simultaneously within the same service#285
GabrielMartinezRodriguez merged 5 commits into
masterfrom
gabriel/txm-address

Conversation

@GabrielMartinezRodriguez

@GabrielMartinezRodriguez GabrielMartinezRodriguez commented Dec 4, 2024

Copy link
Copy Markdown
Contributor

Linked issues

closes https://linear.app/happychain/issue/HAPPY-230/txmanager-do-not-use-id-in-the-transaction-use-the-account-instead-for

Description

  • The TransactionManager now only processes Transactions that have the same from field as the TransactionManager, allowing multiple TransactionManager to operate simultaneously within the same service.
  • Introduces the createTransaction method in TransactionManager to handle transaction creation. This eliminates the need to pass the from address and chainId to the Transaction every time a new one is created. This was redundant because the TransactionManager already holds that information.
  • Removes the id field from the TransactionManager as it was unused. It was initially intended to serve as a discriminator for supporting multiple TransactionManager in the same service, but this functionality is now achieved using the from field.
  • Adds a from address field to Transaction objects to track the sender.
  • Updates the database schema to include the new from column.
  • Updated the randomnnes-service to use createTransaction instead of contructor
  • Fixes a typo in the randomness-service.
Toggle Checklist

Checklist

Basics

  • 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 after submitting the PR.

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 of the code is documented.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 4, 2024

Copy link
Copy Markdown

Deploying happychain with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4f82a92
Status: ✅  Deploy successful!
Preview URL: https://4108753e.happychain.pages.dev
Branch Preview URL: https://gabriel-txm-address.happychain.pages.dev

View logs

GabrielMartinezRodriguez commented Dec 4, 2024

Copy link
Copy Markdown
Contributor Author

@GabrielMartinezRodriguez GabrielMartinezRodriguez mentioned this pull request Dec 4, 2024
10 tasks
@GabrielMartinezRodriguez GabrielMartinezRodriguez changed the title feat(txm): move transaction creation to TransactionManager Move transaction creation to TransactionManager Dec 4, 2024
@GabrielMartinezRodriguez GabrielMartinezRodriguez marked this pull request as ready for review December 4, 2024 10:29
@GabrielMartinezRodriguez GabrielMartinezRodriguez changed the title Move transaction creation to TransactionManager Allow run multiple txm on the same service Dec 4, 2024
@linear

linear Bot commented Dec 4, 2024

Copy link
Copy Markdown

@GabrielMartinezRodriguez GabrielMartinezRodriguez changed the title Allow run multiple txm on the same service Allow run multiple txm simultaneously within the same service Dec 4, 2024
@GabrielMartinezRodriguez GabrielMartinezRodriguez added the reviewing-1 Ready for, or undergoing first-line review label Dec 4, 2024
@GabrielMartinezRodriguez GabrielMartinezRodriguez added reviewing-2 Ready for, or undergoing final review and removed reviewing-1 Ready for, or undergoing first-line review labels Dec 4, 2024
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/txm-doc branch 3 times, most recently from 7199d82 to a4d48c9 Compare December 5, 2024 15:30
@GabrielMartinezRodriguez GabrielMartinezRodriguez mentioned this pull request Dec 5, 2024
10 tasks
@norswap norswap added merge-blocked Ready to merge, waiting for downstack and removed reviewing-2 Ready for, or undergoing final review labels Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-blocked Ready to merge, waiting for downstack

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants