@vultisig/core-chain 2.17.9 → 2.17.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @vultisig/core-chain
2
2
 
3
+ ## 2.17.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [#874](https://github.com/vultisig/vultisig-sdk/pull/874) [`69bb830`](https://github.com/vultisig/vultisig-sdk/commit/69bb8307de72883f0c7693871a6ca040b7a0756c) Thanks [@neavra](https://github.com/neavra)! - fix(core-chain): treat duplicate-signature Solana broadcast errors as idempotent success
8
+
9
+ `broadcastSolanaTx` now classifies "already been processed" / `AlreadyProcessed`
10
+ rejections from `sendRawTransaction` as an idempotent success (returns instead
11
+ of routing to `verifyBroadcastByHash`), mirroring the TON/UTXO/Cosmos dedupe
12
+ guards. This stops a headless retry after an ambiguous broadcast from blindly
13
+ re-submitting an already-accepted Solana transaction.
14
+
3
15
  ## 2.17.9
4
16
 
5
17
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/chain/tx/broadcast/resolvers/solana.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAKvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAGjD,eAAO,MAAM,iBAAiB,EAAE,mBAAmB,CAAC,UAAU,CAAC,MAAM,CAqBpE,CAAA"}
1
+ {"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/chain/tx/broadcast/resolvers/solana.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAMvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAGjD,eAAO,MAAM,iBAAiB,EAAE,mBAAmB,CAAC,UAAU,CAAC,MAAM,CA2CpE,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import { getSolanaClient } from '@vultisig/core-chain/chains/solana/client';
2
2
  import { sendJitoTransaction } from '@vultisig/core-chain/chains/solana/jito';
3
+ import { isInError } from '@vultisig/lib-utils/error/isInError';
3
4
  import base58 from 'bs58';
4
5
  import { verifyBroadcastByHash } from '../verifyBroadcastByHash.js';
5
6
  export const broadcastSolanaTx = async ({ chain, tx }) => {
@@ -21,6 +22,28 @@ export const broadcastSolanaTx = async ({ chain, tx }) => {
21
22
  });
22
23
  }
23
24
  catch (error) {
25
+ // A duplicate-signature error means the node already accepted this exact
26
+ // signed transaction. Treat it as an idempotent success so a headless
27
+ // retry does not blindly re-broadcast the same payload (mirrors the
28
+ // TON/UTXO/Cosmos dedupe guards). verifyBroadcastByHash remains the
29
+ // fallback safety net for genuinely ambiguous (non-duplicate) failures.
30
+ //
31
+ // TRADE-OFF (reviewed + accepted, PR #874): this returns success at the
32
+ // BROADCAST layer WITHOUT verifying the execution outcome. Solana reports
33
+ // `AlreadyProcessed` for any signature it has already seen, including one
34
+ // whose transaction was *processed but reverted on-chain*. So a
35
+ // processed-but-failed Solana tx is reported as success HERE. That is
36
+ // intentional: the broadcast layer's only job is "did the node take this
37
+ // payload", and re-broadcasting an already-accepted signature is useless.
38
+ // The AUTHORITY on actual success/failure is the downstream getTxStatus
39
+ // confirmation poll (#867's confirmBroadcastedTx), which surfaces `failed`
40
+ // for a reverted Solana tx via the status resolver reading
41
+ // `signatureStatus.err` (see ../../status/resolvers/solana.ts). Only a
42
+ // raw-SDK consumer that broadcasts and skips that confirmation poll is
43
+ // exposed to the optimistic result; the CLI agent always confirms.
44
+ if (isInError(error, 'already been processed', 'AlreadyProcessed')) {
45
+ return;
46
+ }
24
47
  await verifyBroadcastByHash({ chain, tx, error });
25
48
  }
26
49
  };
@@ -1 +1 @@
1
- {"version":3,"file":"solana.js","sourceRoot":"","sources":["../../../../../../../packages/core/chain/tx/broadcast/resolvers/solana.ts"],"names":[],"mappings":"AACA,OAAO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10",
4
4
  "description": "Blockchain chain logic shared across Vultisig clients",
5
5
  "license": "MIT",
6
6
  "repository": {