ArweaveTeam / arweave

The Arweave server and App Developer Toolkit.
https://www.arweave.org
GNU General Public License v2.0
920 stars 205 forks source link

Transaction doesn't appear in pending list #283

Open APshenkin opened 3 years ago

APshenkin commented 3 years ago

I build transaction to send some funds between accounts

{
    "format": 2,
    "id": "PrTlOjxQYJZmOJjEwcdz6j_-LaxaUmNa3THmnobSElM",
    "last_tx": "rxchIjzzdHzhBi6iJ7XjVURdr14hv_VxxMdfIb8-EdtNzfUB9mEZ_GY2d6AVCKwR",
    "owner": "ILmrC5N0JSvpgEGi72lTdDBa00bM+ERJ0cLwpDoVfAhoAHnYzoqSafSGQtl1Uo5+mjweX224MotXKJkdFB1SjycHE9Nwton7Afgg3RQ0gOVCGJ5DZqsiAsHOjG8Ow9FZZMsRfW6nIfmr12GTZUgQpgXMiDO6PynA76foZCbisyUagWqWqu00g1ShkgUUhBG5687bHqxZwvAAnauyacyA2BxFILugx/UTQ20BK9SghbJTMntjJbU3KsTPVvO1lSrcRZDUFaEcIEtcCnwfGBRHxmE4jIp0XoDZZi4nIPAQLZDpfLdX1WlTR2o7xhJjS8JN8c7P8C6FQHHFl07YzT46HnLggRZGYSijqX0gpZ9/bIi1J+fM8ysWqYt6DkLXohwur10NyXUtvk1aCPjvGiXFtlaO9CRRSGRRNIKehcHifq5TJHMgAt/x+ztfu0HiChRk25w/cf+3jDb4nZZ5g8cXNuFg87SDYva3KZPrax87OslOi1T7z6N66wEJtStyuZZGq1g8KtkfubEJb0qSidYsNEMV+6DCUmS1PCc20LQ/c0SH9oATsFuOlcq74LazLMQ85xWYkBUo+Pd6JFZemjcpMhExSfvskv4Ukfv6OnlYkkFVABARzezbBfJkTNMO/0uAjN2RT2cRtW0pDx820dM+juRjCZ6zWMBru25CtBOMO8c=",
    "tags": [],
    "target": "lLKrX4uT5bEewbWmSA7cEjEz0L1oqOahdTCc_5p7TDk",
    "quantity": "1000",
    "data_size": "0",
    "data_root": "",
    "reward": "16461774",
    "signature": "DEHZ5R9Mk_qHCJbfcVFJcsSn5K4OHLL9f0hxVDFBxAxPwJ7NaEuSCwXq0E-Fe2d3oz6WqTm8ejhk8zmc4efKq8FsUco6o6GmOrYPXEsCRkVWMOisj-ApOugBSWkJY2RqNsBpBh8YtTPHXsSBXpApxBT5HGszt6W_H0Q_6F9419t51uxLoQaY6jcv9L__8bQAB753eG6KrcIfGYCh1y4X6RjuQd3XArw-5KbmOVmPLJGhY-zG4lGoKHdRoy_Eqbwg-a-E8swGml2j8xNxXISvB93C6LUS2Oe63aT587ZYPkVTitRsum7Gt8GVlUlXjJ9SyuiQ_Z0kExHXLJ_aH6b8XixCuDBfDtobxWk48znEh0IdaXvwd63n3JD8YJ5pDfEt7TYdBODal5q85YdiLbNBcYhBemJUAT7wXOtzsNj-IO0Xb75JZsgkRV-gbC9rXa2eH34xK6Nga5v5FxktqXoIpdJcmjPhAl8snPZYWQVq3kt2_ZcDr2sKAQYdw-p-qhPpQCeKFqdKHgc_63O7W_NvsFSOXTxvfhMRftaHBw_WEp3T1hzz8oEU1W8qRtA-OpayxexIJqFHKwBY96TPj5C0QV_xsfmMJW9yz3KeggeM-rYcM1zvA9uXZCDwjV-34o6HjOzVKMuIVh_XttDYSjW4GkN9FhOoK2VAHXM5VuE-CBo"
}

When I try to publish it via curl --request POST 'https://arweave.net/tx'

I receive 200 OK, but tx doesn't appear in pending list https://arweave.net/tx/pending

This transaction is valid and was tested with JS library:

await arweave.transactions.verify(tx)

Key and Signature were created with 3-party libraries (not via JS library)

So I have two questions:

  1. Why POST 'https://arweave.net/tx' doesn't return errors in any cases (if you send useless data or empty body it also return 200 OK)
  2. What's wrong with my transaction (why it's valid in JS code, but doesn't accept by node)
ldmberman commented 3 years ago

@APshenkin hi, arweave.net proxies API requests to several nodes; when you query https://arweave.net/tx/pending, it will pick one of them. It could happen that your tx got stuck in the distribution queue of another node. Normally though, they share them quickly. But if the network is busy, the tx may expire there.

if you send useless data or empty body it also return 200 OK

It's totally up to you which data to attach. It can have no data as well, e.g. if you just transfer tokens.

APshenkin commented 3 years ago

@ldmberman it doesn't seems that there is issue with query. I tried to send transaction many times. Also when I tried to send tx that was generated by JS library it completes with success.

It's totally up to you which data to attach. It can have no data as well, e.g. if you just transfer tokens.

I mean that you can send bad tx (with bad signature or without some parameters) and it will return 200 ok every time