Skip to content

feat: store first_block on transactions#350

Merged
andreabadesso merged 10 commits into
masterfrom
feat/store-first-block
Jan 28, 2026
Merged

feat: store first_block on transactions#350
andreabadesso merged 10 commits into
masterfrom
feat/store-first-block

Conversation

@andreabadesso
Copy link
Copy Markdown
Collaborator

@andreabadesso andreabadesso commented Jan 23, 2026

This PR handles first_block changes (by storing them in the transaction table) and also handles multiple changes in a transaction metadata in the same event

Motivation

After adding the first_block handling mechanism, we stopped handling nc_execution changes, upon investigation I've noticed that we were expecting one METADATA_CHANGED event for each change which is not what actually happens -- we receive a single metadata changed event with all changes to metadata

Acceptance Criteria

  • metadataDiff detects all independent metadata changes in a single event and returns them as an array
  • A dispatch queue processes each change one-by-one before returning to idle
  • handleNcExecVoided no longer needs to know about first_block — each handler has a single responsibility
  • first_block is now a transaction column and gets handled by the new metadata diff

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged
  • Make sure either the unit tests and/or the QA tests are capable of testing the new features
  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@andreabadesso andreabadesso self-assigned this Jan 23, 2026
@andreabadesso andreabadesso added the enhancement New feature or request label Jan 23, 2026
@andreabadesso andreabadesso moved this to In Progress (WIP) in Hathor Network Jan 23, 2026
@andreabadesso andreabadesso force-pushed the feat/store-first-block branch from b1596c2 to 55117a0 Compare January 27, 2026 12:46
return {
error: 'checkAddressTable query',
params: { txId, timestamp, version, voided, height },
error: 'checkTransactionTable query',
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks Claude

@andreabadesso andreabadesso moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Jan 27, 2026
r4mmer
r4mmer previously approved these changes Jan 27, 2026
pedroferreira1
pedroferreira1 previously approved these changes Jan 28, 2026
Comment thread packages/daemon/src/services/index.ts
@github-project-automation github-project-automation Bot moved this from In Progress (Done) to In Review (WIP) in Hathor Network Jan 28, 2026
@andreabadesso andreabadesso dismissed stale reviews from pedroferreira1 and r4mmer via d963ba2 January 28, 2026 14:15
@andreabadesso andreabadesso requested a review from r4mmer January 28, 2026 15:25
@andreabadesso andreabadesso merged commit 1f27a37 into master Jan 28, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from In Review (WIP) to Waiting to be deployed in Hathor Network Jan 28, 2026
@andreabadesso andreabadesso deleted the feat/store-first-block branch January 28, 2026 15:39
@andreabadesso andreabadesso mentioned this pull request Jan 28, 2026
2 tasks
@andreabadesso andreabadesso moved this from Waiting to be deployed to Done in Hathor Network Jan 28, 2026
This was referenced Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants