Comments (9)
Reopening because this is a race condition issue, and thus hard to reproduce. Here is the PR that fixes it in xrpl.js: XRPLF/xrpl.js#1883
from xrpl-py.
Do you happen to have a stack trace of the error or code snippet which can reproduce the problem?
from xrpl-py.
It doesn't actually call in quick succession - there is a 4-second delay between submitting the transaction and retrieving it for the first time.
from xrpl-py.
Closing as unable to reproduce - if you manage to reproduce happy to reopen! :)
from xrpl-py.
Would be great if we could get a fix for this incorporated into xrpl.py. I'm receiving the txnNotFound error for every OfferCreate transaction I submit notwithstanding them actually showing up on the ledger.
from xrpl-py.
I'm getting this same failure too. Code that reproduces it:
from xrpl.clients import JsonRpcClient
from xrpl.wallet.main import Wallet
from xrpl.models.requests import AccountNFTs
from xrpl.models.transactions import Memo, NFTokenCancelOffer, NFTokenMint
from xrpl.transaction import safe_sign_and_autofill_transaction
from xrpl.transaction import send_reliable_submission
from xrpl.utils import drops_to_xrp, hex_to_str, str_to_hex
client = JsonRpcClient("http://xls20-sandbox.rippletest.net:51234")
# rBYSPwS3zvB2wu1nb5rxvU5gSuh5qgYW8V
wallet = Wallet("sh69ae5M5k7JhYpMmCoPVAz27456p", 0)
mint_args = {
"account": "rBYSPwS3zvB2wu1nb5rxvU5gSuh5qgYW8V",
"flags": 8,
"uri": "",
"memos": [Memo.from_dict({"memo_data": str_to_hex("Minted by Dealer")})],
"transfer_fee": 0,
"token_taxon": 0,
}
mint = NFTokenMint.from_dict(mint_args)
my_tx_payment_signed = safe_sign_and_autofill_transaction(mint, wallet, client)
tx_response = send_reliable_submission(my_tx_payment_signed, client)
pprint(tx_response)
Traceback:
Traceback (most recent call last):
File "cards-dealer.py", line 27, in <module>
tx_response = send_reliable_submission(my_tx_payment_signed, client)
File "/Users/mhamilton/Development/demos/venv/lib/python3.8/site-packages/xrpl/transaction/reliable_submission.py", line 32, in send_reliable_submission
return asyncio.run(async_send_reliable_submission(transaction, client))
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/Users/mhamilton/Development/demos/venv/lib/python3.8/site-packages/xrpl/asyncio/transaction/reliable_submission.py", line 93, in send_reliable_submission
return await _wait_for_final_transaction_outcome(
File "/Users/mhamilton/Development/demos/venv/lib/python3.8/site-packages/xrpl/asyncio/transaction/reliable_submission.py", line 37, in _wait_for_final_transaction_outcome
transaction_response = await get_transaction_from_hash(transaction_hash, client)
File "/Users/mhamilton/Development/demos/venv/lib/python3.8/site-packages/xrpl/asyncio/transaction/ledger.py", line 50, in get_transaction_from_hash
raise XRPLRequestFailureException(response.result)
xrpl.asyncio.clients.exceptions.XRPLRequestFailureException: Request failed, txnNotFound: Transaction not found.
from xrpl-py.
I'm getting this same failure too. Code that reproduces it:
from xrpl.clients import JsonRpcClient from xrpl.wallet.main import Wallet from xrpl.models.requests import AccountNFTs from xrpl.models.transactions import Memo, NFTokenCancelOffer, NFTokenMint from xrpl.transaction import safe_sign_and_autofill_transaction from xrpl.transaction import send_reliable_submission from xrpl.utils import drops_to_xrp, hex_to_str, str_to_hex client = JsonRpcClient("http://xls20-sandbox.rippletest.net:51234") # rBYSPwS3zvB2wu1nb5rxvU5gSuh5qgYW8V wallet = Wallet("sh69ae5M5k7JhYpMmCoPVAz27456p", 0) mint_args = { "account": "rBYSPwS3zvB2wu1nb5rxvU5gSuh5qgYW8V", "flags": 8, "uri": "", "memos": [Memo.from_dict({"memo_data": str_to_hex("Minted by Dealer")})], "transfer_fee": 0, "token_taxon": 0, } mint = NFTokenMint.from_dict(mint_args) my_tx_payment_signed = safe_sign_and_autofill_transaction(mint, wallet, client) tx_response = send_reliable_submission(my_tx_payment_signed, client) pprint(tx_response)
Traceback:
Traceback (most recent call last): File "cards-dealer.py", line 27, in <module> tx_response = send_reliable_submission(my_tx_payment_signed, client) File "/Users/mhamilton/Development/demos/venv/lib/python3.8/site-packages/xrpl/transaction/reliable_submission.py", line 32, in send_reliable_submission return asyncio.run(async_send_reliable_submission(transaction, client)) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/asyncio/runners.py", line 43, in run return loop.run_until_complete(main) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "/Users/mhamilton/Development/demos/venv/lib/python3.8/site-packages/xrpl/asyncio/transaction/reliable_submission.py", line 93, in send_reliable_submission return await _wait_for_final_transaction_outcome( File "/Users/mhamilton/Development/demos/venv/lib/python3.8/site-packages/xrpl/asyncio/transaction/reliable_submission.py", line 37, in _wait_for_final_transaction_outcome transaction_response = await get_transaction_from_hash(transaction_hash, client) File "/Users/mhamilton/Development/demos/venv/lib/python3.8/site-packages/xrpl/asyncio/transaction/ledger.py", line 50, in get_transaction_from_hash raise XRPLRequestFailureException(response.result) xrpl.asyncio.clients.exceptions.XRPLRequestFailureException: Request failed, txnNotFound: Transaction not found.
@hammertoe I debugged your code and found the submitted transaction's engine_result is temMALFORMED
; so it looks like your transaction was malformed. I changed the uri
param to be non-empty string and it worked:
"uri": str_to_hex("NFT mint test")
@aditya-stb Therefore, I believe this bug is reproduced when waiting for the final outcome on a submitted malformed transaction. Going to create a PR that verifies a submitted transaction is valid (not malformed) before waiting for its final outcome.
from xrpl-py.
Closing this issue. Feel free to reopen if you can still reproduce this issue.
from xrpl-py.
race condition issue checked and solved (4 api calls till raising error) #500
from xrpl-py.
Related Issues (20)
- [Bug]: Unable to create a sell offer using `NFTokenCreateOffer` HOT 2
- [Feature]: Simplify NFTokens lookup HOT 4
- BookOffers( ) Method Help HOT 6
- `Wallet` should throw a clearer error message when given an invalid seed
- `AccountObjectType` is missing `NFT_OFFER` HOT 2
- Check for empty `NFTokenMinter` in `AccountSet_get_errors`
- add `timeout` parameter to network client `request` method
- Add RPC/WS ports to server_info HOT 1
- Support `featureXRPFees` amendment HOT 2
- Missing parameters for type in Ledger and LedgerData requests HOT 3
- Event loop warnings in CI
- Improve integration test coverage
- Async Client Doesn't Handle Internet Disconnection HOT 4
- Look into switching linter to ruff
- Add integration test support for clio-only APIs
- Add `nftoken_id`, `nftoken_ids` and `offer_id` meta fields into NFT Tx responses HOT 1
- Automate updating our docker container with the latest amendments HOT 1
- remove build_version check to autofill network_id
- Remove support for Python 3.7 HOT 2
- [2.0] `classic_address` isn't typed properly HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xrpl-py.