Skip to content

Stamp created_tx on role + network_role writes#47

Merged
lucca65 merged 2 commits into
masterfrom
feat/roles-created-tx
Jun 28, 2026
Merged

Stamp created_tx on role + network_role writes#47
lucca65 merged 2 commits into
masterfrom
feat/roles-created-tx

Conversation

@lucca65

@lucca65 lucca65 commented Jun 28, 2026

Copy link
Copy Markdown
Member

Stamp created_tx on role + network_role writes

event-source already exposes the originating trx id (action.action_trace.trx_idpayload.transactionId) and writes it as created_tx on networks/tokens/transfers — it just omitted it on the role writes. This adds created_tx: payload.transactionId to all 5 role-write sites in src/updaters/community.js (member role on newcommunity + netlink, upsertrole, the assignroles replace-all inserts).

Enables the backend tx-tracker to confirm the exact transaction it broadcast for role/admin changes instead of any role change in the community (concurrent-admin safe).

Deploy after the backend PR (which adds the nullable created_tx column). Backend is back-compat: it treats a missing/NULL created_tx as a community-scoped fallback, so deploy order is forgiving but backend-first is correct.

🤖 Generated with Claude Code

lucca65 and others added 2 commits June 28, 2026 23:37
Points event-source at a local nodeos (127.0.0.1:8888, from block 1) and the
isolated cambiatus_local DB. Omits the DB password so node-pg works under
Postgres.app trust auth. Run: NODE_ENV=local node src/app.js

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
event-source already has the originating trx id (action.action_trace.trx_id,
exposed as payload.transactionId) and writes it as created_tx on networks,
tokens, and transfers. The role writes omitted it. Stamp it on the member-role
creation (newcommunity + netlink), upsertrole, and the assignroles replace-all
inserts so the backend tx-tracker can confirm the exact transaction it
broadcast instead of any role change in the community.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lucca65
lucca65 force-pushed the feat/roles-created-tx branch from a3ba7f9 to 9fe3e50 Compare June 28, 2026 21:38
@lucca65
lucca65 merged commit 76a4e1c into master Jun 28, 2026
2 checks passed
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.

1 participant