feat(ttx): add versioned envelope for interactive protocol messages - #1700
Merged
Merged
Conversation
SuyashAlphaC
force-pushed
the
ttx-versioning-phase1
branch
2 times, most recently
from
May 13, 2026 10:25
405e4b9 to
b491443
Compare
adecaro
reviewed
May 13, 2026
Contributor
|
Hi @SuyashAlphaC , thanks for starting this 🙏 |
SuyashAlphaC
force-pushed
the
ttx-versioning-phase1
branch
from
May 14, 2026 04:23
b491443 to
fb11975
Compare
Implements Phase 1 (Foundation) of the TTX versioning proposal (LFDT-Panurus#1654). Introduces a session-level Envelope wrapper for all JSON-typed interactive protocol messages, enabling strict version negotiation and message-type discrimination. - Envelope struct with compact wire fields (v/t/b) - Strict versioning: reject unversioned and mismatched versions - Mandatory type discriminator with constants for all flows - Session helpers: SendTyped, ReceiveTyped, ReceiveTypedWithTimeout - Metrics instrumentation (sent/received/error counters, body size) - VersionCompatibility map for future multi-version support - 27 unit tests + 3 benchmarks Signed-off-by: SuyashAlphaC <suyashagrawal862@gmail.com>
adecaro
force-pushed
the
ttx-versioning-phase1
branch
from
May 14, 2026 05:11
fb11975 to
79e6403
Compare
adecaro
approved these changes
May 14, 2026
adecaro
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Thanks @SuyashAlphaC , please, attach the Issue to this PR. Thanks 🙏
HayimShaul
pushed a commit
that referenced
this pull request
May 14, 2026
…1700) Signed-off-by: SuyashAlphaC <suyashagrawal862@gmail.com>
HayimShaul
pushed a commit
that referenced
this pull request
May 14, 2026
…1700) Signed-off-by: SuyashAlphaC <suyashagrawal862@gmail.com>
HayimShaul
pushed a commit
that referenced
this pull request
May 14, 2026
…1700) Signed-off-by: SuyashAlphaC <suyashagrawal862@gmail.com> Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
HayimShaul
pushed a commit
that referenced
this pull request
May 14, 2026
…1700) Signed-off-by: SuyashAlphaC <suyashagrawal862@gmail.com> Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
4 tasks
AkramBitar
pushed a commit
that referenced
this pull request
May 20, 2026
Signed-off-by: Shashank <yshashank959@gmail.com> fix(multisig,boolpolicy): verify spend tx matches approved SpendRequest (#1691) Signed-off-by: SuyashAlphaC <suyashagrawal862@gmail.com> fsc v0.11.0 (#1702) Signed-off-by: Angelo De Caro <adc@zurich.ibm.com> feat(ttx): add versioned envelope for interactive protocol messages (#1700) Signed-off-by: SuyashAlphaC <suyashagrawal862@gmail.com> fix(recovery): unblock queue head by marking NotFound orphans Deleted after grace period (#1708) Signed-off-by: Evan <evanyan@sign.global> fix: cachedFetcher.update() no longer blocks token reads during DB refresh (#1535) Signed-off-by: Nitesh <nitesh@example.com> Signed-off-by: Nitesh Kumar <niteshkumar121411@gmail.com> Signed-off-by: NETIZEN-11 <kumarnitesh979875@gmail.com> perf(bulletproof): optimize IPA prover with batched MSMs (#1719) Signed-off-by: Ankit Basu <ankitbasu14@gmail.com> replace mutex with context aware semaphore (#1616) Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe3.haifa.ibm.com> refactor(recovery): return RecoveryClaim from ClaimPendingTransactions (#1715) Signed-off-by: Evan <evanyan@sign.global> Adding ZKP Benchmarking to test overhead of FSC nodes on TPS Signed-off-by: Effi-S <effi.szt@gmail.com> Signed-off-by: AKRAM@il.ibm.com <akram@akramb.vpc.cloud9.ibm.com> Fix #1635: Prevent audit lock starvation via defer pattern - Enhanced Audit() documentation requiring immediate defer Release() - Fixed integration test callers with proper error handling - Added unit tests for lock acquisition error handling - Leverages existing semaphore.Weighted for context-aware acquisition (PR #1616) - Ensures locks always released via defer, preventing DoS attacks Signed-off-by: AKRAM@il.ibm.com <akram@akramb.vpc.cloud9.ibm.com>
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.
Summary
Implements Phase 1 (Foundation) of the TTX versioning proposal discussed in #1654.
This introduces a session-level
Envelopewrapper for all JSON-typed interactive protocol messages, enabling strict version negotiation and message-type discrimination — addressing the silent failure mode when nodes running differentSDK versions exchange messages.
What's included
Envelopestruct with compact wire fields (v=version,t=type,b=body) intoken/services/utils/json/session/envelope.goErrMissingVersion) and version mismatches (VersionErrorwitherrors.Is(ErrVersionMismatch)support)TypeRecipientRequest,TypeWithdrawalRequest,TypeSpendRequest, etc.)SendTyped,ReceiveTyped,ReceiveTypedWithTimeoutfor simplified versioned message exchangeEnvelopeMetrics(sent/received counters, error counter, body size histogram) usingfabric-smart-client/platform/view/services/metricsVersionCompatibilitymap andIsCompatiblehelper for future multi-version supportDesign decisions (per #1654 discussion with @adecaro)
v/t/b)omitempty)Test plan
go vet ./...passesgofmtcleango test -v -count=1 ./token/services/utils/json/session/...)json/sessiontests