Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to Transfer Native SOL from Solana to Ethereum #669

Open
OwenKaneCypher opened this issue Aug 12, 2024 · 2 comments
Open

Failing to Transfer Native SOL from Solana to Ethereum #669

OwenKaneCypher opened this issue Aug 12, 2024 · 2 comments

Comments

@OwenKaneCypher
Copy link

OwenKaneCypher commented Aug 12, 2024

When trying to bridge native SOL to WSOL on Ethereum. However, I am getting the following error when bridging:

SendTransactionError: failed to send transaction: Internal error

Its raised when calling initiateTransfer().

When listening to the http requests, the failing rpc call is the following:

{
  "method": "sendTransaction",
  "jsonrpc": "2.0",
  "params": [
    "A3i/+uxJMtpp67kxxIEzQXj5kJCrYBFFXDAjYsd7AfRaehVYttOdNT+dxDcRSqvNef7uPEjlyc0GBlFKNs2lgwT0bfY1CL2qEWRnut+/h4RrPbPFkEPpfLaXv/4xL/HhGuYIvHQbJ2np50OHvx7GsTnY8MaQn96tUQs+xMlvNoMPMOmXlcUO+6yNEW6XqAAM94hU/5ujYdQr0hPqVuzH3PBN0yrdwhJ/2ydgKXDMsEQkQKuuevAKxiJUm3ycjrG7BQMAChL56kBUYgAOMTKch6vLCb8nTts+fOZjYjTplxJ2m2bWCGbchg1DeBilWXVkPhmmOrwR+NuUC6rAT6anuvkgi2hYlI5ah6K5RU+j8W/HrDJSaeH/hdGpA0v0XxVMqhxxZYEafT5gXk9LuKbZCB885D0cNzrZwRyv7q4j/fgm9kkePx1UtVWgROY6CpYMKGKtGfo9cAxspQVJzsHCn2swzhWjf6N/sed8cgCXvuUFW4XHAzBRxMyCgsE36buusQaQuXzid1cFUQw28RxuMpgORU9x4nBqqj2s0Hl9IpOi3pFvOAabiFf+q4GE+2h/Y0YYwDXaxDncGus7VZig8AAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABlCFupQxL15UNNu6DymGjvNv/7IdYzoGFtcrRebm/O2Lr2XC6zS+k648kzMwNPNlR902X0Xcbo21QvNzm9GaMr7F4hTBuDj7d9OGNFMXmOEf2BcJWqitubU2LRdPDpbybsc3KZXVzIcyOX+wrTXAEh4OqpDSb4KKU0yrVDkbOk9Qan1RcYx3TJKFZjmGkdXraLXrijm0ttXHNVWyEAAAAABqfVFxksXFEhjMlMPUrxf1ja7gibof1E49vZigAAAAAG3fbh12Whk9nL4UbO63msHLSF7V9bN5E6jPWFfv8AqQ4KWJpBpV+9ZsUqR18tkqbT3JtHRxFMua+CWpi1RdPODgpYnmSIFHqU3PpZK5D91BFSuyyne/YBZ1im9N+dIbQCiNY0XBBBEQiVduQ40xhSlRcpfWKM4Ay91b6S5dVjEQYIAgABNAAAAADwHR8AAAAAAKUAAAAAAAAABt324ddloZPZy+FGzut5rBy0he1fWzeROoz1hX7/AKkIAgABDAIAAABgX6kAAAAAAA8EAQcADgEBDwMBCQAJBGBfqQAAAAAAEREACgEHAwkLBAIMBgUNDggPEDcFAAAAAGBfqQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADjpV9nKsaKr8rJwoyXFUahbjXDDAIADwMBAAABCQ==",
    {
      "encoding": "base64",
      "maxRetries": 0,
      "skipPreflight": true,
      "preflightCommitment": "processed"
    }
  ],
  "id": "e9bc5827-6c16-4a92-9c19-fbeb91fe0bf6"
}

It returns the following:

{
  "jsonrpc": "2.0",
  "error": {
    "code": -32603,
    "message": "Internal error"
  },
  "id": "e9bc5827-6c16-4a92-9c19-fbeb91fe0bf6"
}

With debug mode switched on for the Solana signer, the logs are the following:

Submitting transactions 
myProject/node_modules/@solana/web3.js/src/connection.ts:5923
      throw new SendTransactionError(
            ^
SendTransactionError: failed to send transaction: Internal error
    at Connection.sendEncodedTransaction (myProject/node_modules/@solana/web3.js/src/connection.ts:5923:13)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Connection.sendRawTransaction (myProject/node_modules/@solana/web3.js/src/connection.ts:5880:20)
    at async Function.sendTxWithRetry (myProject/node_modules/@wormhole-foundation/sdk-solana/src/platform.ts:239:7)
    at async SolanaSendSigner.signAndSend (myProject/node_modules/@wormhole-foundation/sdk-solana/src/signer.ts:222:33)
    at async ssw (myProject/node_modules/@wormhole-foundation/sdk-connect/src/common.ts:66:22)
    at async signSendWait (myProject/node_modules/@wormhole-foundation/sdk-connect/src/common.ts:28:20)
    at async TokenTransfer.initiateTransfer (myProject/node_modules/@wormhole-foundation/sdk-connect/src/protocols/tokenBridge/tokenTransfer.ts:217:18)
    at async tokenTransfer (myProject/src/wormhole.ts:213:22)
    at async TestWormhole.test (myProject/src/wormhole.ts:62:7) {
  logs: undefined
}

  • I am using version 0.10.0 of the SDK

UPDATE 1

I was able to bridge successfully when providing the optional SolanaSendSignerOptions.PriorityFeeOptions values to the getSolanaSignAndSendSigner() function. However, even when providing very high fee values here:

priorityFee: {
  percentile: 1,
  percentileMultiple: 8,
  min: 600000,
  max: 800000,
}

It does not consistently successfully complete the solana transfer, failing with the same above SendTransactionError: failed to send transaction: Internal error error often.

Example failing RPC request:

{
  "method": "sendTransaction",
  "jsonrpc": "2.0",
  "params": [
    "A3VBhnlBKB60wrrR1ZXYzjI0o5vx8OOwiCwDieK17dwOKh8U4O9P7urMpLtpdigIPULHcXaxjefsYk6/2bS5xArOPXgtm+ijTYiJviZS/H/tN0nMAya8qSj/4j+4CmqNAtiNHFke34F4TzN4UF8snRv3zElWpmwSP3jSXDdLkLoGZG7pnhHDbgSr7G4uW34LAw+MbdERURKGKm5CMiHCwih9s/MAYU8IenegijpJrv1PWGEq9Le2UK3GPIZtwUdbBgMACxP56kBUYgAOMTKch6vLCb8nTts+fOZjYjTplxJ2m2bWCHdmuHktmCfaPJU93kBXXQ5iOgdRdTQMjfgeFvD4zARxvn4kj6kIiI+Yx5Tl/mRmvottB8YBaePOcz6VOAwOI5YafT5gXk9LuKbZCB885D0cNzrZwRyv7q4j/fgm9kkePx1UtVWgROY6CpYMKGKtGfo9cAxspQVJzsHCn2swzhWjf6N/sed8cgCXvuUFW4XHAzBRxMyCgsE36buusQaQuXzid1cFUQw28RxuMpgORU9x4nBqqj2s0Hl9IpOi3pFvOAabiFf+q4GE+2h/Y0YYwDXaxDncGus7VZig8AAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABlCFupQxL15UNNu6DymGjvNv/7IdYzoGFtcrRebm/O2AMGRm/lIRcy/+ytunLDm+e8jOW7xfcSayxDmzpAAAAAuvZcLrNL6TrjyTMzA082VH3TZfRdxujbVC83Ob0ZoyvsXiFMG4OPt304Y0UxeY4R/YFwlaqK25tTYtF08OlvJuxzcpldXMhzI5f7CtNcASHg6qkNJvgopTTKtUORs6T1BqfVFxjHdMkoVmOYaR1etoteuKObS21cc1VbIQAAAAAGp9UXGSxcUSGMyUw9SvF/WNruCJuh/UTj29mKAAAAAAbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCpDgpYmkGlX71mxSpHXy2SptPcm0dHEUy5r4JamLVF084OClieZIgUepTc+lkrkP3UEVK7LKd79gFnWKb0350htHip+1ko0God1oqBFf8ZIgEXqV39zPtg9LqB5SFTpiSUCAgCAAI0AAAAAPAdHwAAAAAApQAAAAAAAAAG3fbh12Whk9nL4UbO63msHLSF7V9bN5E6jPWFfv8AqQgCAAIMAgAAAGBfqQAAAAAAEAQCBwAPAQEQAwIJAAkEYF+pAAAAAAASEQALAgcDCQwEAQ0GBQ4PCBARNwUAAAAAYF+pAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOOlX2cqxoqvysnCjJcVRqFuNcMMAgAQAwIAAAEJCgAFAh+zAQAKAAkDwCcJAAAAAAA=",
    {
      "encoding": "base64",
      "maxRetries": 0,
      "skipPreflight": true,
      "preflightCommitment": "processed"
    }
  ],
  "id": "bddc0529-2401-4b16-a227-964f4db211c5"
}

Response:

{
  "jsonrpc": "2.0",
  "error": {
    "code": -32603,
    "message": "Internal error"
  },
  "id": "bddc0529-2401-4b16-a227-964f4db211c5"
}

This failing RPC call is after many RPC calls for the method getBlockHeight.


UPDATE 2

With manually set very high gas values, funds get sent to the bridge but initiateTransfer() still throws SendTransactionError: failed to send transaction: Internal error even though funds have been sent to the bridge. No transaction ID is returned either, so I can not programmatically start the recovery process either.

Transaction sending 0.0222 SOL to the bridge here.

Error from SDK:

myProject/statera/node_modules/@solana/web3.js/src/connection.ts:5923
      throw new SendTransactionError(
            ^
SendTransactionError: failed to send transaction: Internal error
    at Connection.sendEncodedTransaction (myProject/statera/node_modules/@solana/web3.js/src/connection.ts:5923:13)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Connection.sendRawTransaction (myProject/statera/node_modules/@solana/web3.js/src/connection.ts:5880:20)
    at async Function.sendTxWithRetry (myProject/statera/node_modules/@wormhole-foundation/sdk-solana/src/platform.ts:239:7)
    at async SolanaSendSigner.signAndSend (myProject/statera/node_modules/@wormhole-foundation/sdk-solana/src/signer.ts:231:75)
    at async ssw (myProject/statera/node_modules/@wormhole-foundation/sdk-connect/src/common.ts:66:22)
    at async signSendWait (myProject/statera/node_modules/@wormhole-foundation/sdk-connect/src/common.ts:28:20)
    at async TokenTransfer.initiateTransfer (myProject/statera/node_modules/@wormhole-foundation/sdk-connect/src/protocols/tokenBridge/tokenTransfer.ts:217:18)
    at async tokenTransfer (myProject/statera/src/wormhole.ts:217:20)
    at async TestWormhole.test (myProject/statera/src/wormhole.ts:62:7) {
  logs: undefined
}

RPC Call:

{
  "method": "sendTransaction",
  "jsonrpc": "2.0",
  "params": [
    "A7b1h4CIW/w/BskzMmW7ddhr3FoNPFGqKn8G6pIkEtfNbm354Zi6nCtdIkxWA7PV2+DZ4ZJhHyH+heVfgWIxqgxhisLkQHTMWKgHVT7eXnrXpOmYxOofmSSQrW61wO21PA16DP2hwh75zSa/4jGlth/MRbU2J8MiSGnPgvgLEyoGsC8ZA22NChjbk6jMxSFSQ+a9tCxip4QWTDkPFho45Ujp6MkDJ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AOOlX2cqxoqvysnCjJcVRqFuNcMMAgAQAwIAAAEJCgAFAh+zAQAKAAkDwCcJAAAAAAA=",
    {
      "encoding": "base64",
      "maxRetries": 0,
      "skipPreflight": true,
      "preflightCommitment": "processed"
    }
  ],
  "id": "077cc640-23e5-404c-8b48-adc5797ccf0a"
}

Result:

{
  "jsonrpc": "2.0",
  "error": {
    "code": -32603,
    "message": "Internal error"
  },
  "id": "077cc640-23e5-404c-8b48-adc5797ccf0a"
}
@wormhole-foundation wormhole-foundation deleted a comment Aug 13, 2024
@OwenKaneCypher
Copy link
Author

Also failures when trying to bridge WSOL on Ethereum to SOL on Solana when trying to claim assets on Solana:

Transfer error:  SendTransactionError: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x0
    at Connection.sendEncodedTransaction (myProject/node_modules/@solana/web3.js/src/connection.ts:5923:13)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Connection.sendRawTransaction (myProject/node_modules/@solana/web3.js/src/connection.ts:5880:20)
    at async Function.sendTxWithRetry (myProject/node_modules/@wormhole-foundation/sdk-solana/src/platform.ts:207:23)
    at async SolanaSendSigner.signAndSend (myProject/node_modules/@wormhole-foundation/sdk-solana/src/signer.ts:231:75)
    at async ssw (myProject/node_modules/@wormhole-foundation/sdk-connect/src/common.ts:66:22)
    at async signSendWait (myProject/node_modules/@wormhole-foundation/sdk-connect/src/common.ts:28:20)
    at async TokenTransfer.completeTransfer (myProject/node_modules/@wormhole-foundation/sdk-connect/src/protocols/tokenBridge/tokenTransfer.ts:276:25)
    at async tokenTransfer (myProject/src/wormhole.ts:233:23)
    at async TestWormhole.test (myProject/src/wormhole.ts:62:7) {
  logs: [
    'Program worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth invoke [1]',
    'Program log: Error: IoError(Custom { kind: InvalidInput, error: "Unexpected length of input" })',
    'Program worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth consumed 19627 of 23552 compute units',
    'Program worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth failed: custom program error: 0x0'
  ]
}

@obumnwabude
Copy link

Please confirm if this issue is on Mainnet or Testnet? If on Mainnet, could first try with the Testnet?

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

No branches or pull requests

2 participants