Repository navigation
Conversation
Co-authored-by: Codex <[email protected]>
There was a problem hiding this comment.
Pull request overview
Expands the channel accounts guide with architecture, security, throughput, and multi-SDK implementation guidance.
Changes:
- Adds diagrams and channel-account concepts.
- Adds Python, JavaScript, Java, and Go examples.
- Documents rotation, fees, capacity, and operational considerations.
Recommendation: NEEDS-CHANGES — fix the non-runnable SDK examples, unsafe rotation logic, and inaccurate fee/capacity guidance.
Comments suppressed due to low confidence (8)
docs/build/guides/transactions/channel-accounts.mdx:129
StellarSdkis not defined by the destructuring import. Use the importedOperationsymbol here as well.
transaction2.addOperation(StellarSdk.Operation.payment({
docs/build/guides/transactions/channel-accounts.mdx:475
- This second Java tab also uses the removed
Transaction.Builderandnew PaymentOperation.Builder(...)APIs, so it cannot compile with Java SDK 4.x. Migrate it toTransactionBuilderandPaymentOperation.builder()before publishing the refreshed guide.
Transaction.Builder transactionBuilder = new Transaction.Builder(channelAccount, Network.TESTNET)
.setBaseFee(Transaction.MIN_BASE_FEE);
for (String recipient : allRecipients.get(i)) {
transactionBuilder.addOperation(
new PaymentOperation.Builder(recipient, AssetTypeNative.INSTANCE, "10")
.setSourceAccount(primaryKeypair.getAccountId())
docs/build/guides/transactions/channel-accounts.mdx:714
- This JavaScript loop has the same rotation deadlock: once every channel is
active, no code marks one available until after this loop exits, which cannot happen while recipients remain. Process and await each wave before assigning another batch.
while (recipientIndex < allRecipients.length) {
for (const channelData of channelAccountsTracker) {
if (recipientIndex >= allRecipients.length) break;
if (channelData.state === "available") {
channelData.state = "active";
docs/build/guides/transactions/channel-accounts.mdx:878
- This Go loop also deadlocks after one batch per channel because channel states are reset only in the submission loop below. If recipients remain after every channel becomes active, neither index nor state can change.
for recipientIndex < len(allRecipients) {
for _, channelData := range channelAccountsTracker {
if recipientIndex >= len(allRecipients) {
break
}
if channelData["state"] == "available" {
docs/build/guides/transactions/channel-accounts.mdx:783
- The Java rotation loop cannot handle more than one batch per channel: after all channels become
active, no state is reset until the later submission loop, so thiswhileloop has no way to make progress. Submit and confirm each wave before continuing allocation.
while (recipientIndex < allRecipients.length) {
for (ChannelAccount channelData : channelAccountsTracker) {
if (recipientIndex >= allRecipients.length) break;
if (channelData.state.equals("available")) {
channelData.state = "active";
docs/build/guides/transactions/channel-accounts.mdx:759
- Even after awaiting submission, this unconditional release is unsafe on rejection or an unknown transport outcome: the local account sequence was advanced when the transaction was built, but the network may not have consumed it. Query/reload the channel account and reconcile the transaction before setting it available.
} finally {
channelData.state = "available";
docs/build/guides/transactions/channel-accounts.mdx:823
- This releases the Java channel even when submission failed or its outcome is unknown. Because transaction construction advances the local account sequence, the next build can use a sequence that does not match the network; reconcile/reload the account before making it available.
} finally {
txBundle.channelData.state = "available";
docs/build/guides/transactions/channel-accounts.mdx:943
- This marks the channel available after both success and failure without reconciling its sequence. When submission fails or times out,
IncrementSequenceNummay have advanced only the local account, so reusing it can produce a sequence gap. Reload/verify the network account before release on non-confirmed outcomes.
output.channelData["state"] = "available"
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Refs stellar#2674 in that you can't see the history or independence of this value, relying instead on an asterisk footnote disclaimer in a busy table.
Replace the unsupported exponential fee claim with evidence-based wording. A 200-ledger February 2019 sample showed fees up to 80 times the minimum, while a 6,144-ledger March-June 2023 sample found a 50-times-minimum median for full ledgers and no exponential fit. Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Codex <[email protected]>
txnbuild.NewTransaction rejects params without built TimeBounds, and TransactionParams has no Network field.
|
🤖 Automated message from the Stellar Triage Bot. Thanks for this PR. I saw it, but I will not review it unless someone calls me in. How to reach me:
|
from #723