atomicals / atomicals-electrumx

Electrumx Atomicals Indexer Server
MIT License
186 stars 56 forks source link

[Notice] 1.3.8.x need reindex #108

Closed dubuqingfeng closed 6 months ago

dubuqingfeng commented 9 months ago

tx:

https://mempool.space/zh/tx/6de82a789040954655faf66c854287519546d4302a43eb8e1f122f37173057a2

https://ep.atomicals.xyz/proxy/blockchain.atomicals.get_block_txs?params=[820551]&pretty

"result": [ "1af8163a112f0c03ab3302181af1dcdf93d3608a0108fffe74948a2dfd004fc5", "7590eedcc4327d951ab6901be8355931e32cfb26755079fe90fd6d94b04cb15e", "6de82a789040954655faf66c854287519546d4302a43eb8e1f122f37173057a2", "1e2e3a7b981f0ac7771f6e72f760510480a7b6800bdffd48305b83cd86fe22db", "37138fc4c3187ecdfad7764fcd050842606227d4b4ad489ad54f1141d3c327de",

image

https://ep.atomicalmarket.com/proxy/blockchain.atomicals.get_block_txs?params=[820551]&pretty
https://ep.nextdao.xyz/proxy/blockchain.atomicals.get_block_txs?params=[820551]&pretty

"result": [ "1af8163a112f0c03ab3302181af1dcdf93d3608a0108fffe74948a2dfd004fc5", "7590eedcc4327d951ab6901be8355931e32cfb26755079fe90fd6d94b04cb15e", "1e2e3a7b981f0ac7771f6e72f760510480a7b6800bdffd48305b83cd86fe22db", "37138fc4c3187ecdfad7764fcd050842606227d4b4ad489ad54f1141d3c327de",

After version 1.3.8.x, I believe there has been a change in the logic of b'dmpay, which resulted in this situation being recognized normally afterwards. The specific code is as follows:

            # Check if there were any payments for dmitems in tx
                if self.create_or_delete_subname_payment_output_if_valid(tx_hash, tx, tx_num, height, atomicals_operations_found_at_inputs, atomicals_spent_at_inputs,  b'dmpay', self.dmpay_data_cache, self.get_expected_dmitem_payment_info, False):
                    self.logger.debug(f'advance_txs: found valid dmitem payment create_or_delete_subname_payment_output_if_valid {hash_to_hex_str(tx_hash)}')
                    has_at_least_one_valid_atomicals_operation = True

The previous version should not have recognized this transaction.

The other issue:

https://github.com/atomicals/atomicals-electrumx/issues/90

atomicals commented 9 months ago

Checking

atomicals commented 9 months ago

Let's resync from 808080 and confirm.

There was a bug in master that incorrectly excluded a txid

atomicals commented 9 months ago

Can you please compare against...

https://ep.atomicals.xyz/proxy/blockchain.atomicals.get_global?pretty&params=[33000]

dubuqingfeng commented 9 months ago

We can synchronize from 808080 and match up with ep.atomicals.xyz It is also through this method to compare the differences gradually rising from 1.3.7.5. Therefore, the ep.atomicals.xyz was also made to synchronize from 808080 to now And the others don't And this transaction should be considered as an atomic transaction, right?

6de82a789040954655faf66c854287519546d4302a43eb8e1f122f37173057a2

14c04cda9d6ea6e84e0143871c9a8e495be346a428091555b6af72b1cb1d2a90

If not, then it should be fixed.