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

Unable to complete a transaction on mainnet #725

Closed
PvtSec opened this issue Jul 10, 2024 · 5 comments
Closed

Unable to complete a transaction on mainnet #725

PvtSec opened this issue Jul 10, 2024 · 5 comments

Comments

@PvtSec
Copy link

PvtSec commented Jul 10, 2024

  • Trying to transfer an amount to another address with destination tag
  • But end up with following expection on signing/submission
  • Python version: 3.10.12
  • xrp-py version : xrpl-py==2.6.0

Base Code:

from xrpl.wallet import Wallet
from xrpl.models import Payment
from xrpl.utils import xrp_to_drops
from xrpl.account import get_balance
from xrpl.clients import JsonRpcClient
from xrpl.constants import CryptoAlgorithm
from xrpl.transaction import submit_and_wait, autofill_and_sign

JSON_RPC_URL = "https://s1.ripple.com:51234/"
client = JsonRpcClient(JSON_RPC_URL)

from_wallet = Wallet.from_seed(seed="REDACTED", algorithm=CryptoAlgorithm.SECP256K1)
balance = get_balance(from_wallet.address, client)
allowed_amount = balance - int(xrp_to_drops(10))

payment = Payment(
    amount = f"{allowed_amount}",
    account = from_wallet.address,
    destination="REDACTED",
    destination_tag=10101010,
)

signed_tx = autofill_and_sign(payment, client, from_wallet)

try:
    tx_response = submit_and_wait(signed_tx, client)
    print("Transaction Successfull")
except Exception as e:
    print("Transaction Failed", e)

Traceback:

Traceback (most recent call last):
  File "/xrpl/Transact/XRP/main_tx.py", line 24, in <module>
    signed_tx = autofill_and_sign(payment, client, from_wallet)
  File "/xrpl/Transact/XRP/venv/lib/python3.10/site-packages/xrpl/transaction/main.py", line 99, in autofill_and_sign
    return asyncio.run(
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/xrpl/Transact/XRP/venv/lib/python3.10/site-packages/xrpl/asyncio/transaction/main.py", line 142, in autofill_and_sign
    return sign(await autofill(transaction, client), wallet, multisign=False)
  File "/xrpl/Transact/XRP/venv/lib/python3.10/site-packages/xrpl/asyncio/transaction/main.py", line 245, in autofill
    ledger_sequence = await get_latest_validated_ledger_sequence(client)
  File "/xrpl/Transact/XRP/venv/lib/python3.10/site-packages/xrpl/asyncio/ledger/main.py", line 29, in get_latest_validated_ledger_sequence
    raise XRPLRequestFailureException(response.result)
xrpl.asyncio.clients.exceptions.XRPLRequestFailureException: Request failed, notSupported: Not supported field 'full'


  • But the same thing works on testnet RPC.
  • Should be something related with mainnet ?
@mvadari
Copy link
Collaborator

mvadari commented Jul 10, 2024

The problem should be resolved by switching to xrplcluster.com instead as your node.

This problem is fixed in this PR: #722

@PvtSec
Copy link
Author

PvtSec commented Jul 10, 2024

The problem should be resolved by switching to xrplcluster.com instead as your node.

This problem is fixed in this PR: #722

oh I see, in the meantime switched to js library actually with the same node. That went fine.
Anyways closing this issue!

@PvtSec PvtSec closed this as completed Jul 10, 2024
@ckeshava
Copy link
Collaborator

@mvadari How does xrplcluster.com help with this issue? Is that cluster using a different version of rippled? This appears to be an error thrown from rippled about a deprecated field.

@mvadari
Copy link
Collaborator

mvadari commented Jul 10, 2024

@mvadari How does xrplcluster.com help with this issue? Is that cluster using a different version of rippled? This appears to be an error thrown from rippled about a deprecated field.

It's a Clio error - Clio is no longer supporting the deprecated field(s). See #722 for more info.

@mvadari
Copy link
Collaborator

mvadari commented Jul 12, 2024

This issue has been resolved on the Clio side.

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

3 participants