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

[Bug] Offer Trade Status Not Updating Upon Fulfillment (remains pending accept) #18330

Closed
BrandtH22 opened this issue Jul 17, 2024 · 9 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@BrandtH22
Copy link
Contributor

What happened?

A user created an offer file via a walletConnect connection, that offer was accepted and the user has received the requested assets.

image

The user confirmed that the offer is no longer valid via the check_offer_validity endpoint but the cli response of get_all_offers and also the GUI display of the offer still indicate pending_accept

This is the offer in question:

offer1qqr83wcuu2rykcmqvpsxvgqqkted7tg5zhd3ng809q3d8tyukakvu6adj4qc7fywuckny4ekv7a4urznqah60r5wkn3k7wyv366glr45lu07ggldjz6tmgr7j4glpl4mzu0acw7dexmwjn5jl0hz8ecnlg35cck944hz007c2gelllcza7rsdfn8zuk7zc0ex80uacxncuxgvfv7mux8ukc2l6vz25hwdfjdl00qlkr4yfw0szzqx6wl72xav8z6tenk246uwk48hhvj309le95u845tkyn2z4ewzvf6he8ekpps82lr7lx87lqsjlkpqt0lnct9lcs5hmqupnm0mandvr9xkeu4tj6jektym58s8l6cumycwc8e5t60lqvx3jff9qnz9d7lm095jt3f9l9zcn69f0vuej7xelwvs26x9ldycj6v4fx5ej6w9qhjrjeuf09ugn3mf2kj6twwynynmnxg90958j37frx2ut9ffmzz5vfd8rrj50ptcf9r923l9fpz50f9elwuej7f9eyvenzve095ej7veyk5un7tea9z6t2teykugjs8qhn2vfgcjhjptma07q6eyz4cqt4qsdjuqqx2trc0f07nka0kwvmennkw4a4vmu4ffsfw0ml09rnf69fuc95ffn7zwl3z7mlllfjuvry2f5fwv3fykyjnzf939adj3tel8lslpzsgdlu335z05y3jemv4f8q8rgjzktspjxu3jz67acaa8anna03ac60d8xhkx9ml6kw87wh2amze6xllx46zulvc79j87y3vlh7whuhk2d0lg6yk4l7lzumnsw4xa8e6kd4ahkk9zdkvuka0tj08n6t6x7tvy7n5gcyj2nuwec5gmn3gz9cvll73ryjk9cuf8ce54y9jal5w54u4adtnzjy84r047u8zhnf6jlyt4ukay9flxu0s524kmd6y7hgd5gx9dr4pw4mywemxgenkvphaenx87wnhagtwc5f4un0ezvy0mxswhjh2fpwn73utzude6ksklmxmeutjehjl0f7vhssu4xsch7qfe4uqj665vplw7rzj2gau3zz9rlll9uczuhh0wedm8jhu8feh4w53nt6jzuuky4vctkkljn32h8m3mm0x4cs823e9cdfw7ls76p00jalmtme6m9l75l24cne684u64w0nyz0y88h4qwycp59xrq52gpmddw8kgl2e6wh2ljq6hl8k6lzkche4kgu4vmac0f70rjved0lymw8h49wgv2dg8rjmas7erahf40pe0v9mv4hwnzckxwa8ukghpcw00u6qu830v3spp9378txsgc7cwrvxargprw7xr5wtafmszlxh30ewdl2gmzn0m6wekmvcwfjxm3t25vd38sauxv68tn5ef505nwkpmmmwk26tuapwhtjmzp4vz4kwpl7slukknuc7t5qh9m8l97gpwk0h7f6xnsnyvahlxgjl86meh4akhnjdgj9s0pamqhhd66aw6rdhyz4pujsclnfd0kt7u0selltjy4z4mdld42ta0ttcm22hcek428le4j9tdfq92dhlzl2p4xf6tc83r0m00pct9tr0mst2wne4j8es4k9lyej7c58lavsz9ag44r903luz70a7l0vd79vhfnuklw4u9nknmmd5htzvva0h4d4su03feelhlu59ulh7h7x7r3v455pqe392zcef3u75qx48590n40zk0l9806vmsuwhh6memf4nreytj8za4wcea20eam07tvlmyea07mm9ptshassq3cc8lr78mlw5yfrt4j4tvx6wwyarlzlmmglavpzemxwuzpt8knljk05lglyxvpsx3qa50jce5ffzmsw2qz5ggcpepax353pgq5ukgsda2n6waxuw3dj88n5gmhmun56574ukkgf6ahqnrvlq9wnf7vuwhemk7ctj6fhpznq2lrfzw83jvyfnluc46dyq07uu0yfsx4c6t7a4jcp3l5g6h5pdghye98e7s5mhnrkfemyaxwm9t9lkw70ssc6zk9mmklhjwqpvqersc2qjy3l

Version

2.4.2

What platform are you using?

macOS

What ui mode are you using?

GUI

Relevant log output

CLI output of get_all_offers:

{
  "offers": null,
  "success": true,
  "trade_records": [
    {
      "accepted_at_time": null,
      "coins_of_interest": [
        {
          "amount": 21010000000000,
          "parent_coin_info": "0x7c458f5a7ecac543f00a77dbf5a306f5286b08abb0d5c7a3c999acfe90def277",
          "puzzle_hash": "0x1c02527364df40cdf846290d6cbd70b579b898b8b70939c45713f3fc28c1c771"
        }
      ],
      "confirmed_at_index": 0,
      "created_at_time": 1721084014,
      "is_my_offer": true,
      "pending": {
        "xch": 21010000000000
      },
      "sent": 0,
      "sent_to": [],
      "status": "PENDING_ACCEPT",
      "summary": {
        "fees": 0,
        "infos": {
          "4be13035cda2a40c04f89f3e30f2f16800a449f630fb3911f89a147745323f8b": {
            "also": {
              "also": {
                "owner": "()",
                "transfer_program": {
                  "launcher_id": "0x4be13035cda2a40c04f89f3e30f2f16800a449f630fb3911f89a147745323f8b",
                  "royalty_address": "0xbc25310fb8609e03308ad4ab592d4e4138e8b14284a1fd69d8e9acd3efca364b",
                  "royalty_percentage": "500",
                  "type": "royalty transfer program"
                },
                "type": "ownership"
              },
              "metadata":

CLI Output of check_offer_validity:

{
  "id": "0x54469a45b4f762d6696e1723836ada01100e94d17438428554e291a55e41d630",
  "success": true,
  "valid": false
}

CLI Output of get_offer_summary:

{
  "id": "0x54469a45b4f762d6696e1723836ada01100e94d17438428554e291a55e41d630",
  "success": true,
  "summary": {
    "additions": [
      "83e99eb72cb4b99123601c258a9e27655d6862438f321b0ae4bc5e5c6ff7432a",
      "9904b7044ccb60439f263d21115bda98d114a8b80fdcd423e8d74e0415dd21a4",
      "099524d1a36985848a4533967f26369eaca3945160606dcaaa236a581cea8d01",
      "91d4039177e5093aeda6e2bd74ee4663f8995f741815279065578440bffe3396"
    ],
    "fees": 0,
    "infos": {
      "4be13035cda2a40c04f89f3e30f2f16800a449f630fb3911f89a147745323f8b": {
        "also": {
          "also": {
            "owner": "()",
            "transfer_program": {
              "launcher_id": "0x4be13035cda2a40c04f89f3e30f2f16800a449f630fb3911f89a147745323f8b",
              "royalty_address": "0xbc25310fb8609e03308ad4ab592d4e4138e8b14284a1fd69d8e9acd3efca364b",
              "royalty_percentage": "500",
              "type": "royalty transfer program"
            },
            "type": "ownership"
          },
"metadata": "0xffff75ffc08068747470733a2f2f6e667473746f726167652e6c696e6b2f697066732f62616679626569667370776c36616e6e6133667a75756d7369346d69706e666e326368797379646b71327435687732716e62327a3277627232756d2f6d696e7463686961696e66696e697465636f6e677275656e746d616368696e656172742e706e67ffc06a697066733a2f2f62616679626569667370776c36616e6e6133667a75756d7369346d69706e666e326368797379646b71327435687732716e62327a3277627232756d2f6d696e7463686961696e66696e697465636f6e677275656e746d616368696e656172742e706e6780ffff68a0e5ff42f6facd690c423e7ebcafb512680717cfd3b8965b9436a21491fe17c85dffff826d75ffc06668747470733a2f2f6e667473746f726167652e6c696e6b2f697066732f62616679626569667370776c36616e6e6133667a75756d7369346d69706e666e326368797379646b71327435687732716e62327a3277627232756d2f6d657461646174612e6a736f6effc050697066733a2f2f62616679626569667370776c36616e6e6133667a75756d7369346d69706e666e326368797379646b71327435687732716e62327a3277627232756d2f6d657461646174612e6a736f6e80ffff826c7580ffff82736e01ffff82737401ffff826d68a0e9becc86f9b5e36d96876ceb5da3f5299fcb5addd1b9b1fe8089a5e168e4bf6280",
          "type": "metadata",
          "updater_hash": "0xfe8a4b4e27a2e29a4d3fc7ce9d527adbcaccbab6ada3903ccf3ba9a769d2d78b"
        },
        "launcher_id": "0x4be13035cda2a40c04f89f3e30f2f16800a449f630fb3911f89a147745323f8b",
        "launcher_ph": "0xeff07522495060c066f66f32acc2a77e3a3e737aca8baea4d1a64ea4cdc13da9",
        "type": "singleton"
      }
    },
    "offered": {
      "xch": 20000000000000
    },
    "removals": [
      "4f48e3f74654197c3a7ab7319442cf9a0bd6fe05601d1db95370cc2bff21e79e",
      "83e99eb72cb4b99123601c258a9e27655d6862438f321b0ae4bc5e5c6ff7432a"
    ],
    "requested": {
      "4be13035cda2a40c04f89f3e30f2f16800a449f630fb3911f89a147745323f8b": 1
    },
    "valid_times": {
      "max_height": null,
      "max_time": 1721688788,
      "min_height": null,
      "min_time": null
    }
  }
}
@BrandtH22 BrandtH22 added the bug Something isn't working label Jul 17, 2024
@wjblanke
Copy link
Contributor

Quex it looks like the node knows the status (check_offer_validity) but the wallet does not? Is there a way to make sure these are coherent.

@Quexington
Copy link
Contributor

I know it's been a minute but does the user have an incoming transaction for the NFT marked as confirmed? I wouldn't think so but it'd be interesting to check.

Without reproducibility, I'm tempted to just chalk this up to a flaky error. It's very difficult to pin down exactly what could have gone wrong, maybe a failure on the full node part to notify a wallet of a specific coin before restarting, maybe some sort of database race, maybe a peer disconnects during the function call, I'm not sure. Rest assured if the user has the assets they can soft cancel the offer in order to bring their UX into (partial) agreement with reality.

@Quexington
Copy link
Contributor

Quex it looks like the node knows the status (check_offer_validity) but the wallet does not? Is there a way to make sure these are coherent.

check_offer_validity is checking a much stricter subset of information than the wallet is when it syncs it. It's easier for that endpoint to say "this is no longer valid" than for the wallet to say "here's what happened with this".

@BrandtH22
Copy link
Contributor Author

I know it's been a minute but does the user have an incoming transaction for the NFT marked as confirmed? I wouldn't think so but it'd be interesting to check.

Without reproducibility, I'm tempted to just chalk this up to a flaky error. It's very difficult to pin down exactly what could have gone wrong, maybe a failure on the full node part to notify a wallet of a specific coin before restarting, maybe some sort of database race, maybe a peer disconnects during the function call, I'm not sure. Rest assured if the user has the assets they can soft cancel the offer in order to bring their UX into (partial) agreement with reality.

Hey Quex, yes the user does have a confirmed transaction with the NFT and the NFT is visible in the users wallet. I will have them soft cancel the offer but this will lead the GUI to indicate the offer was cancelled and not accepted.

The user is connecting their wallet to a local trusted full node.

Would it be possible to have the wallet re-verify whether offers are valid via the offer validity endpoint?

@wjblanke
Copy link
Contributor

Maybe we can have an on demand option

@Quexington
Copy link
Contributor

Would it be possible to have the wallet re-verify whether offers are valid via the offer validity endpoint?

As I said, the validity check has an easier job to do that syncing the state of an offer does. If you called check_offer_validity it wouldn't be able to tell you whether it was accepted/cancelled/or failed. The only way I could think of to get it to mark it correctly would be to resync but keep your offer state somehow. Actually I think this might be what the config option to resync does so you could try that.

@syedsaif666
Copy link

I created an NFT sell offer for W1 and on W2 I loaded the offer file and accepted it. Screenshot attached of W2 attached below:
paste

but when I go back to W1 I see that the NFT has been correctly transferred but the offer status is still "Pending Accept". Screenshot of W1 below:
paste (1)

Note that both wallets were using the full node fully synced and wallet synced as visible in the screenshots

Version
2.4.3-rc3

What platform are you using?
Windows 11

What ui mode are you using?
GUI

@chia-rschmidt
Copy link

chia-rschmidt commented Aug 18, 2024

Saw this in RC3 as well on Ubuntu 22.04 for multiple types of offers. Offer remains in pending accept even though it is no longer valid. Log is attached.

TC-Oscar-Date
TC-Oscar-Date.log

@wjblanke
Copy link
Contributor

Should be fixed in main, if not please reopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants