Skip to content

Add payment stream example - #303

Closed
azer wants to merge 1 commit into
stellar:masterfrom
azer:add-stream-payments-example
Closed

Add payment stream example#303
azer wants to merge 1 commit into
stellar:masterfrom
azer:add-stream-payments-example

Conversation

@azer

@azer azer commented Feb 9, 2018

Copy link
Copy Markdown

Just a little PR for adding an example of a simple payment stream.

@nullstyle nullstyle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please keep examples consistent. Notably, we use underscores (stream_payments) for word separation and we name the go file main.go.

Thanks for the contribution!

@robertDurst

robertDurst commented Jul 16, 2018

Copy link
Copy Markdown

Hey @azer you still interested in completing this? If so, feel free to re-open.

sisuresh added a commit to sisuresh/go that referenced this pull request Jun 3, 2026
- Bump XDR_COMMIT to stellar-xdr@68fa1ac (post-stellar#303 which ungated CAP-0071).
- Clear XDR_FEATURES default so CAP-0083 #ifdef blocks are stripped during
  preprocess. CAP-0071 is ungated and needs no feature flag.
- Regenerate gxdr/, xdr/xdr_generated.go, xdr/xdr_views_generated.go.
- randxdr: add IsDeepNestedDelegates preset to cap recursion through CAP-71
  SorobanDelegateSignature.nestedDelegates, mirroring the existing
  IsDeepAuthorizedInvocationTree handling for subInvocations. Without it
  TestView_RandXDR_RawRoundTrip stack-overflows on unbounded random trees.
Shaptic pushed a commit that referenced this pull request Jun 5, 2026
* xdr: regenerate for Protocol 27 CAP-0071 + CAP-0083

Bump XDR to stellar-xdr@5187e69 (CAP-0071 address-bound/delegated Soroban
credentials + CAP-0083 STELLAR_VALUE_EMPTY_TX_SET). goxdr and Ruby xdrgen
cannot parse #ifdef, so CAP_0071/CAP_0083 gates are resolved with
'stellar-xdr xfile preprocess' (rs-stellar-xdr #503) before codegen, driven
by XDR_FEATURES. Regenerated xdr/, gxdr/, and xdr/xdr_views_generated.go.

* xdr: drop CAP-0083 from regen; only CAP-0071 ships in p27

- Bump XDR_COMMIT to stellar-xdr@68fa1ac (post-#303 which ungated CAP-0071).
- Clear XDR_FEATURES default so CAP-0083 #ifdef blocks are stripped during
  preprocess. CAP-0071 is ungated and needs no feature flag.
- Regenerate gxdr/, xdr/xdr_generated.go, xdr/xdr_views_generated.go.
- randxdr: add IsDeepNestedDelegates preset to cap recursion through CAP-71
  SorobanDelegateSignature.nestedDelegates, mirroring the existing
  IsDeepAuthorizedInvocationTree handling for subInvocations. Without it
  TestView_RandXDR_RawRoundTrip stack-overflows on unbounded random trees.

* go.mod: bump go-xdr to 0bf8f49 (raise DecodeDefaultMaxDepth to 1500)

Pulls in stellar/go-xdr#32 which lifts the default XDR decode depth from
250 → 1500 and adds the DecodeUnlimitedDepth sentinel. Necessary so the
CAP-71 SorobanDelegateSignature delegate chain (which the protocol allows
to nest arbitrarily, with only Soroban's runtime trap policing depth) can
be decoded by stellar-core LCM consumers without stalling.

* go.sum: drop stale go-xdr@a87d4d0 entry (go mod tidy)

The previous commit bumped go-xdr to 0bf8f49 in go.mod, but go.sum still
carried the old a87d4d0789c3 lines. CI's gomod.sh runs `go mod tidy` and
fails the build on the residual diff.

* ci: bump go-test timeout to 20m

The default per-test-binary timeout is 10m, which is borderline for
this repo's race-cover suite (xdr/ alone takes ~230s with -race
locally, longer on slower CI runners). CAP-71's added generated
XDR pushed the run past 10m, killing the test job with SIGTERM
before xdr/ and txnbuild/ finished.

20m gives generous headroom and matches the conservative timeout
other Stellar Go repos use for race+cover runs.

* txnbuild: cap CAP-71 nestedDelegates recursion in TestOperationCoverage

TestOperationCoverage generates 10,000 random gxdr.Operation values
which now include InvokeHostFunctionOp.auth[].credentials carrying
the new SorobanAddressCredentialsWithDelegates with the recursive
nestedDelegates field. Without bounding, the random generator
recurses unboundedly through SorobanDelegateSignature.nestedDelegates
and the test hangs past go test's default 10-minute per-binary
timeout, killing the CI test matrix.

Add IsDeepNestedDelegates preset (already defined in
randxdr/presets.go for LedgerCloseMetaPresets) — caps the tree height
at 2. With the preset, the test runs in ~8s under -race instead of
timing out.

Pairs with the -timeout=20m bump on the test workflow (which is now
just headroom — the real fix is this preset).
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.

4 participants