Stamp created_tx on role + network_role writes#47
Merged
Conversation
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
force-pushed
the
feat/roles-created-tx
branch
from
June 28, 2026 21:38
a3ba7f9 to
9fe3e50
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stamp
created_txon role + network_role writesevent-source already exposes the originating trx id (
action.action_trace.trx_id→payload.transactionId) and writes it ascreated_txon networks/tokens/transfers — it just omitted it on the role writes. This addscreated_tx: payload.transactionIdto all 5 role-write sites insrc/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_txcolumn). Backend is back-compat: it treats a missing/NULLcreated_txas a community-scoped fallback, so deploy order is forgiving but backend-first is correct.🤖 Generated with Claude Code