stellar/django-polaris

polaris sep-31 send stuck at pending_sender state in kubernetes

kmpartner opened this issue · 5 comments

I have tried to test sep-31 sending using polaris (v1.0.2) in kubernetes cluster.

When I used demo-wallet and sep-31 send, transaction.asset.distribution_account is not defined and got an error in process_post_response function of sep31/transaction.py file.

when I used hard-coded transaction.asset.distribution_account value, transaction was created and send in stellar network worked.

But status in transaction did not change from pending_sender to pending_receiver and stacked this pending_sender. When analyzed network in browser's developer tool, in transaction object, stellar_account_id and stellar_transaction_id are still null.

How can I proceed to pending_receiver state and finish sep-31 send?

Hi @kmpartner, first I would highly recommend using the latest v1 release (v1.6.4).

Secondly, I just want to confirm that you're including the memo returned in the POST /transactions response when submitting the payment transaction to Stellar. Polaris uses this memo to match the payments made to it's distribution accounts to the record in the database.

If you've upgraded Polaris and are attaching the memo, but the payment is still not detected by Polaris, we may need to dig deeper but I suspect this will solve the problem.

Thank you for your response.
After upgrading v1.6.4, this problem was still not solved.

this is demo-wallet's post response of /transactions
{
"id": "905bfcf1-f627-4f0e-ad4c-96c83cc9801d",
"stellar_account_id": "GD2TGM6YDG3MXYB3IUU47KOQ64FT5I467HML6TU2SWYLSLRXMDXT3SQR",
"stellar_memo": "AAAAAAAAAAAAAAAAAAAAAJBb/PH2J08OrUyWyDzJgB0=",
"stellar_memo_type": "hash"
}

browser's network in developer tool
transaction: {id: "905bfcf1-f627-4f0e-ad4c-96c83cc9801d", status: "pending_sender", status_eta: null,…}
amount_fee: null
amount_in: "0.10"
amount_out: null
completed_at: null
external_transaction_id: null
id: "905bfcf1-f627-4f0e-ad4c-96c83cc9801d"
refunded: false
required_info_message: null
required_info_updates: null
started_at: "2021-10-20T18:44:14.417393-07:00"
status: "pending_sender"
status_eta: null
stellar_account_id: "GD2TGM6YDG3MXYB3IUU47KOQ64FT5I467HML6TU2SWYLSLRXMDXT3SQR"
stellar_memo: "AAAAAAAAAAAAAAAAAAAAAJBb/PH2J08OrUyWyDzJgB0="
stellar_memo_type: "hash"
stellar_transaction_id: null

This is the link of stellar transaction in test net work. the memo seems to be matched.
https://stellar.expert/explorer/testnet/tx/f113c8fbffef40a5539135361bec384214299685fe5c90e8ff4485a01ff959db

Is this problem of Watch transactions or polling problem?
I am afraid that, in my kubernetes cluster case, multiple commands (running server, watch transactions ... ) are executed in one container (pod), causing this problem.

Do I need to run in separate containers? If that is the case how can share data between containers. Because of my poor python django and sql database knowledge, sqlite (db service in docker-compose) for persistent data did not work well in my kubernetes cluster.

Generally, containerized services need to have one process per container. I know this is how Docker works, and our docker-compose.yml file shows how you can share data between docker containers using volumes. I'm not familiar enough with Kubernetes to give technical advise on data sharing between containers in that environment.

Thank you for your responses.
After databae is changed to Postgres, and running different processes in different containers, SEP-31 send seems to start working in my kubernetes cluster.

Sounds good, I'll close this issue for now then.