bee icon indicating copy to clipboard operation
bee copied to clipboard

Mismatched Immutable Flag

Open ldeffenb opened this issue 2 years ago • 5 comments

Context

1.18.2 on goerli testnet

Summary

I have a testnet node that has had this stamp for some time now:

  "stamps": [
    {
      "batchID": "45ef9e72cad000467d828bd82b769f63ff848f216013c1866c0270533bc879e3",
      "utilization": 49,
      "usable": true,
      "label": "",
      "depth": 22,
      "amount": "10000000000",
      "bucketDepth": 16,
      "blockNumber": 9446968,
      "immutableFlag": false,
      "exists": true,
      "batchTTL": 1326582
    }

I noticed some errors about this stamp being immutable, so I queried the /batches from the same node. That response says:

    {
      "batchID": "45ef9e72cad000467d828bd82b769f63ff848f216013c1866c0270533bc879e3",
      "value": "5045859328",
      "start": 10116420,
      "owner": "62b32288d5292708de7443f78f6714c95e4c75ff",
      "depth": 22,
      "bucketDepth": 16,
      "immutable": true,
      "batchTTL": 1326582
    },

Expected behavior

I would expect the /stamps and /batches to have the same value for immutable.

Actual behavior

/stamps says it is NOT immutable but /batches says it IS immutable

Steps to reproduce

I wish I knew!

Possible solution

I need to see if I can query the postage contract to see what it says about this stamp, and maybe even track down the purchase transaction to see what it says as well.

ldeffenb avatar Dec 19 '23 05:12 ldeffenb

Contract says the batch IS immutable: image

ldeffenb avatar Dec 19 '23 05:12 ldeffenb

The batch was last updated via a copyBatch transaction that shows also that it IS immutable: https://goerli.etherscan.io/tx/0xf9d38c1cd70565accbf3ff815a717e0d5a41a727a79905ea5b3f7bebfee255f1 image

ldeffenb avatar Dec 19 '23 05:12 ldeffenb

Ah, but the batch was created as NOT immutable! Something in the transfer of the batch between the original and the current contract managed to set the immutable flag on this batch! https://goerli.etherscan.io/tx/0xcdbde8176680b60ea016ab5755d68b74fdbbf577b7ee65c50ba16746a8d31049#eventlog image

ldeffenb avatar Dec 19 '23 05:12 ldeffenb

The transfer was made with a scraper made in Golang. It reads data from chain, saves it in JSON, and then we have another batch operation that reads that data and creates new stamps from it. Problem is that I am not sure If i have that test migration data anywhere to compare, will try to find it and compare.

I can assume 2 possibilities. that the scrapper got the wrong info somehow, and that the importer didn't read the info properly.

0xCardiE avatar Feb 01 '24 15:02 0xCardiE

First glance didnt give me wrong info. Some test scrapping looks like these, which looks ok

image

0xCardiE avatar Feb 01 '24 15:02 0xCardiE