stampchain-io / btc_stamps

Bitcoin Stamps Indexer
https://stampchain.io
GNU Affero General Public License v3.0
14 stars 4 forks source link

At block height 856540, the OKX ledger data is inconsistent with the local ledger data #368

Open btcopenstamp opened 2 months ago

btcopenstamp commented 2 months ago

Describe the bug At block height 856540, the OKX ledger data is inconsistent with the local ledger data.

Branch/Release/Commit Hash of Problem Branch dev.

Screenshots Block height: 856540 TxHash: 530fe5025e88b4114c5b30e03765fe85d7d886757c40f7cf86c347900ad56def

Local 10001 10002 0,bc1qgclh6c403746fe0q2rhje8jyptau5rgqn5am59,0.999999999999999999; 0,bc1qw0tglrpjdnj7f2gtp39q8l0l6xxw8qpxkrqj8x,999999.000000000000000001;

OKX

{"data":{"hash":"9bd6c5c736583dbc253dbef0ff4e01cf0f8ef6b180754ca3f1f0c55c8d3f3f11","block_index":"856540","balance_data":"0,bc1qgclh6c403746fe0q2rhje8jyptau5rgqn5am59,0.999999999999999999;0,bc1qw0tglrpjdnj7f2gtp39q8l0l6xxw8qpxkrqj8x,999999;btmim,bc1q5nwav5mg97mft53prr8h5w06wrf7t3qk4n22ma,1599800;btmim,bc1qdwndflze4hzdupqkqsva446uddgf772l67ksps,3612000;btmim,bc1qpsqxyx0uq2q900q26vrudd7lgf8hhjk27u52aj,1600000;btmim,bc1qpyqd7nt848n9qlrcs7cs865yn58wzxuesdd6ql,39815120;dunk,bc1q93a6ajvqzm9c59lvnw8hvj3luql6z8j0e6qvme,110000000;dunk,bc1qzaxs8e44nfh9h39h34pfq3v9w8et2lvv62kmcc,10000000;luffy,bc1q2ax8z8mhle3q7f3sfm3p24hp2e525mfqsdn6j9,300000;luffy,bc1q74lkt7zer43nd4gza7ezdptecrfnfgzyvkkquf,1057636;luffy,bc1qe74e8923mwea4fcz5g0ngwj922d8y44t2cdfc8,200000;luffy,bc1qvulcnzfmc53dlwutv3hxjfq6ddg8uy354ytn9c,28405;mbtc,bc1q343ys4fl7p6q0rv29ualpvujwuvketntfhcte6,0;mbtc,bc1q3tnamajap0s8nde6fe5kt07l672zhnj2fpnmdf,0;mbtc,bc1q4kvhv2auv0szcdj05j25254nkng3lfz0cwg22d,0;mbtc,bc1qap4zk2fzejm88ttm7am53u9krmea8fwn8ewnl4,0;mbtc,bc1qfcsjmzdy9gz06mdzn9c5ekpkxlf28z4smx66ms,507492;mbtc,bc1qlacrffygd5p3xx4h3hs5g534aaa9dm6vecsuez,77326;mbtc,bc1qmc6hasntq62mw5pcn99s6ay2yfwq77fk5zg780,37801952;mbtc,bc1quknzpe9dlnhtas7yvzrnnklw9r6qh35rv36x6j,88621;mbtc,bc1qylz06lr0ryp0yh064me54lfrehwm7zemxrmj27,0;mobtc,bc1q0dpr0042q2ep5anmatwmqzpplzrpu5f5afsq0y,708420;mobtc,bc1qgh2avqkznjursqrd5anpx3k757les4j8gl095w,0;roro,bc1qj0egm0xjx2lk83gkk3u39ekct8zhyuysm4vc3t,28342603;roro,bc1qy5qu6ctz5vqsld860l36rjac0n0x8vr07apthy,100625;tp,bc1q2k4guqw2s4u046ulcwlplq2kyjg73ey0ykds67,59000000;tp,bc1q7pw84nj5xc2z2afcdf0purch8hw4e7zwfn90ts,0"}}

0,bc1qgclh6c403746fe0q2rhje8jyptau5rgqn5am59,0.999999999999999999; 0,bc1qw0tglrpjdnj7f2gtp39q8l0l6xxw8qpxkrqj8x,999999;

@reinamora137 The balance of token 0 for the address bc1qw0tglrpjdnj7f2gtp39q8l0l6xxw8qpxkrqj8x shows an inconsistency between OKX and the local data.

btcopenstamp commented 2 months ago

@reinamora137 Besides block height 856540, the same issue occurred at block height 857351 and 857436, where the balance returned by the OKX interface was incorrect.

Block height 857351

The data returned by the OKX interface:

{"data":{"hash":"08187ead911f0f587214d066cd0ca218900fac51061a64948a5f371bbc139710","block_index":"857351","balance_data":"btcb,bc1q5fa5l0jd5fvl6xu6t84nqtta35c7rpv6hq2xay,1000;btcb,bc1qjre5v7n3zvplpfe9f3edaptrnscrgq8d3xm2af,19996900;gfg,bc1q6uxccyfqdnl6sfkjeu3qf7xqshjyfe22s4tc2t,2381158.9339814865805;gfg,bc1qvy45lll3wg8azyt8dzw6p8ey6yhf6rvy9n6lga,1564479.0660185134195;luffy,bc1p06hwjygzfn08w9w7klt3eugl3atf0lad0tscq5pcrdswnptk2auqk7jyrh,10000;luffy,bc1qe9cxc20yeq2vzqsfnczpjds3mk4eg0htwy56g0,11455000;luffy,bc1qtv0hkdv3j3l8nr4cseums5znemq86q4s9hdm62,45330002;mbtc,bc1qxcksppfmrk5yuxxu63u8rljhn6v0xmugpgpl5k,100000;mbtc,bc1qz4y9wulph0mt2n2kvhfmv9lxwt6rwk2uh3653n,0;mobtc,bc1q6yf7cdd6z0qsex3y44xzkgwpv84d7ekr5zjjc8,858689;mobtc,bc1qqjrg0930mtywfm2rdj5heu8lwm3vqgrww25tz2,0;nami,bc1q7pahm0xkzqzmfnmv2y0jpd9aax5a7dxav8m3xv,0;nami,bc1qay0vtmf54tjpygwyatec2wvx65gdexuhpqt635,8833334;opiec,bc1qaclkt4x5emagxqfc9dkdsxezv9e6ly6vffdkh5,6845000"}}

OKX API Data:

btcb,bc1q5fa5l0jd5fvl6xu6t84nqtta35c7rpv6hq2xay,1000.000000000000000000;btcb,bc1qjre5v7n3zvplpfe9f3edaptrnscrgq8d3xm2af,19996900.000000000000000000;gfg,bc1q6uxccyfqdnl6sfkjeu3qf7xqshjyfe22s4tc2t,2381158.933981486580500000;gfg,bc1qvy45lll3wg8azyt8dzw6p8ey6yhf6rvy9n6lga,1564479.066018513419500000;luffy,bc1p06hwjygzfn08w9w7klt3eugl3atf0lad0tscq5pcrdswnptk2auqk7jyrh,10000.000000000000000000;luffy,bc1qe9cxc20yeq2vzqsfnczpjds3mk4eg0htwy56g0,11455000.000000000000000000;luffy,bc1qtv0hkdv3j3l8nr4cseums5znemq86q4s9hdm62,45330002.000000000000000000;mbtc,bc1qxcksppfmrk5yuxxu63u8rljhn6v0xmugpgpl5k,100000.000000000000000000;mbtc,bc1qz4y9wulph0mt2n2kvhfmv9lxwt6rwk2uh3653n,0.000000000000000000;mobtc,bc1q6yf7cdd6z0qsex3y44xzkgwpv84d7ekr5zjjc8,858689.000000000000000000;mobtc,bc1qqjrg0930mtywfm2rdj5heu8lwm3vqgrww25tz2,0.000000000000000000;nami,bc1q7pahm0xkzqzmfnmv2y0jpd9aax5a7dxav8m3xv,0.000000000000000000;nami,bc1qay0vtmf54tjpygwyatec2wvx65gdexuhpqt635,8833334.000000000000000000;opiec,bc1qaclkt4x5emagxqfc9dkdsxezv9e6ly6vffdkh5,6845000.000000000000000000

StampChain Data:

btcb,bc1q5fa5l0jd5fvl6xu6t84nqtta35c7rpv6hq2xay,1000.000000000000000000;btcb,bc1qjre5v7n3zvplpfe9f3edaptrnscrgq8d3xm2af,19996900.000000000000000000;gfg,bc1q6uxccyfqdnl6sfkjeu3qf7xqshjyfe22s4tc2t,2381158.933981486580524364;gfg,bc1qvy45lll3wg8azyt8dzw6p8ey6yhf6rvy9n6lga,1564479.066018513419475636;luffy,bc1p06hwjygzfn08w9w7klt3eugl3atf0lad0tscq5pcrdswnptk2auqk7jyrh,10000.000000000000000000;luffy,bc1qe9cxc20yeq2vzqsfnczpjds3mk4eg0htwy56g0,11455000.000000000000000000;luffy,bc1qtv0hkdv3j3l8nr4cseums5znemq86q4s9hdm62,45330002.000000000000000000;mbtc,bc1qxcksppfmrk5yuxxu63u8rljhn6v0xmugpgpl5k,100000.000000000000000000;mbtc,bc1qz4y9wulph0mt2n2kvhfmv9lxwt6rwk2uh3653n,0.000000000000000000;mobtc,bc1q6yf7cdd6z0qsex3y44xzkgwpv84d7ekr5zjjc8,858689.000000000000000000;mobtc,bc1qqjrg0930mtywfm2rdj5heu8lwm3vqgrww25tz2,0.000000000000000000;nami,bc1q7pahm0xkzqzmfnmv2y0jpd9aax5a7dxav8m3xv,0.000000000000000000;nami,bc1qay0vtmf54tjpygwyatec2wvx65gdexuhpqt635,8833334.000000000000000000;opiec,bc1qaclkt4x5emagxqfc9dkdsxezv9e6ly6vffdkh5,6845000.000000000000000000

Mismatch: OKX API gfg,bc1q6uxccyfqdnl6sfkjeu3qf7xqshjyfe22s4tc2t,2381158.933981486580500000 gfg,bc1qvy45lll3wg8azyt8dzw6p8ey6yhf6rvy9n6lga,1564479.066018513419500000

StampChain Indexer gfg,bc1q6uxccyfqdnl6sfkjeu3qf7xqshjyfe22s4tc2t,2381158.933981486580524364 gfg,bc1qvy45lll3wg8azyt8dzw6p8ey6yhf6rvy9n6lga,1564479.066018513419475636

Block height 857436

The data returned by the OKX interface:

{"data":{"hash":"999bf62b8db4e0666a4da9fa61bea65ce002c0fdb460284eac040777c252a320","block_index":"857436","balance_data":"0,bc1qaclkt4x5emagxqfc9dkdsxezv9e6ly6vffdkh5,370000;0,bc1qf87nvtaqq80hzylsal6w4s05qv7myxgptlndgj,300000;ant,bc1p0n2380qk0lgvfr3x3rcrps8cu9xjf2qwtstz68rj06zyauvd7ktst338t3,2300000;ant,bc1qup28hvnr2xna6mdyvzk7xxplsgzxn8v7glluqv,9000000;flush,bc1q9mk985qxe5dyl68ujxf7a6l6js6ajx8sqmckym,400000;flush,bc1qklw3nkg5velv9k7vqgcw9ceflreu6q0rh9rkq9,300000;geek,bc1qjgwjdf0nrkgt2vu8cwe29xc29re5s7u29fkwt3,2500000;geek,bc1qwcqv7rk4yrkmzy3tpwr0tj5kdlf5a5ull64jzc,91600000;gfg,bc1q6uxccyfqdnl6sfkjeu3qf7xqshjyfe22s4tc2t,1881158.9339814865805;gfg,bc1qaaxtwtcwd5ycl4ljkp5zc24dr464ccwr94yhrm,500000;luffy,bc1q5uvwgh7s9d0e0sqgnz8ntwrewwnfe708y4wkex,33333;luffy,bc1qcr5ektyjrg834yf3apyuj2w06gmd0fhtj7ujkl,66667;luffy,bc1qfqygfmhvx6zqe26wxyk00mfsg09w93lzxfx45j,150000;luffy,bc1qmdddj96wfcec8ss63m3y4ey26e52pm8mzrrp5d,490000;luffy,bc1qvckc45tu36nwj0gakx90uxpgt0a795ss5gl26u,140000;luffy,bc1qxcejzl9jejtqswywlz360yxhk54sz3mk57r3hw,14440000;luffy,bc1qy67xm5j0rt88yr9pg7lgh0nt20kqtc4f8l87yy,883230;luffy,bc1qycdlvuyq44alkwfsd4nf4pkt8vr6lxhljdetan,3297.508;opiec,bc1q7eylzmj9pfy6tg0hx6rzwae89jyvx3fyy9ca4v,1962250;opiec,bc1qd4rvve65f9w0y4g7g53q228rql56tg66lvs5dq,3750000;opiec,bc1qu7njshyt8fsslaxlhfu76tgh5xsjfwenwry7qj,12357500;opiec,bc1qy7g83l9xu2cz2mhyu07dq0vxpzzdcgayu30lne,3750000"}}

OKX API Data:

0,bc1qaclkt4x5emagxqfc9dkdsxezv9e6ly6vffdkh5,370000.000000000000000000;0,bc1qf87nvtaqq80hzylsal6w4s05qv7myxgptlndgj,300000.000000000000000000;ant,bc1p0n2380qk0lgvfr3x3rcrps8cu9xjf2qwtstz68rj06zyauvd7ktst338t3,2300000.000000000000000000;ant,bc1qup28hvnr2xna6mdyvzk7xxplsgzxn8v7glluqv,9000000.000000000000000000;flush,bc1q9mk985qxe5dyl68ujxf7a6l6js6ajx8sqmckym,400000.000000000000000000;flush,bc1qklw3nkg5velv9k7vqgcw9ceflreu6q0rh9rkq9,300000.000000000000000000;geek,bc1qjgwjdf0nrkgt2vu8cwe29xc29re5s7u29fkwt3,2500000.000000000000000000;geek,bc1qwcqv7rk4yrkmzy3tpwr0tj5kdlf5a5ull64jzc,91600000.000000000000000000;gfg,bc1q6uxccyfqdnl6sfkjeu3qf7xqshjyfe22s4tc2t,1881158.933981486580500000;gfg,bc1qaaxtwtcwd5ycl4ljkp5zc24dr464ccwr94yhrm,500000.000000000000000000;luffy,bc1q5uvwgh7s9d0e0sqgnz8ntwrewwnfe708y4wkex,33333.000000000000000000;luffy,bc1qcr5ektyjrg834yf3apyuj2w06gmd0fhtj7ujkl,66667.000000000000000000;luffy,bc1qfqygfmhvx6zqe26wxyk00mfsg09w93lzxfx45j,150000.000000000000000000;luffy,bc1qmdddj96wfcec8ss63m3y4ey26e52pm8mzrrp5d,490000.000000000000000000;luffy,bc1qvckc45tu36nwj0gakx90uxpgt0a795ss5gl26u,140000.000000000000000000;luffy,bc1qxcejzl9jejtqswywlz360yxhk54sz3mk57r3hw,14440000.000000000000000000;luffy,bc1qy67xm5j0rt88yr9pg7lgh0nt20kqtc4f8l87yy,883230.000000000000000000;luffy,bc1qycdlvuyq44alkwfsd4nf4pkt8vr6lxhljdetan,3297.508000000000000000;opiec,bc1q7eylzmj9pfy6tg0hx6rzwae89jyvx3fyy9ca4v,1962250.000000000000000000;opiec,bc1qd4rvve65f9w0y4g7g53q228rql56tg66lvs5dq,3750000.000000000000000000;opiec,bc1qu7njshyt8fsslaxlhfu76tgh5xsjfwenwry7qj,12357500.000000000000000000;opiec,bc1qy7g83l9xu2cz2mhyu07dq0vxpzzdcgayu30lne,3750000.000000000000000000

StampChain Data:

0,bc1qaclkt4x5emagxqfc9dkdsxezv9e6ly6vffdkh5,370000.000000000000000000;0,bc1qf87nvtaqq80hzylsal6w4s05qv7myxgptlndgj,300000.000000000000000000;ant,bc1p0n2380qk0lgvfr3x3rcrps8cu9xjf2qwtstz68rj06zyauvd7ktst338t3,2300000.000000000000000000;ant,bc1qup28hvnr2xna6mdyvzk7xxplsgzxn8v7glluqv,9000000.000000000000000000;flush,bc1q9mk985qxe5dyl68ujxf7a6l6js6ajx8sqmckym,400000.000000000000000000;flush,bc1qklw3nkg5velv9k7vqgcw9ceflreu6q0rh9rkq9,300000.000000000000000000;geek,bc1qjgwjdf0nrkgt2vu8cwe29xc29re5s7u29fkwt3,2500000.000000000000000000;geek,bc1qwcqv7rk4yrkmzy3tpwr0tj5kdlf5a5ull64jzc,91600000.000000000000000000;gfg,bc1q6uxccyfqdnl6sfkjeu3qf7xqshjyfe22s4tc2t,1881158.933981486580524364;gfg,bc1qaaxtwtcwd5ycl4ljkp5zc24dr464ccwr94yhrm,500000.000000000000000000;luffy,bc1q5uvwgh7s9d0e0sqgnz8ntwrewwnfe708y4wkex,33333.000000000000000000;luffy,bc1qcr5ektyjrg834yf3apyuj2w06gmd0fhtj7ujkl,66667.000000000000000000;luffy,bc1qfqygfmhvx6zqe26wxyk00mfsg09w93lzxfx45j,150000.000000000000000000;luffy,bc1qmdddj96wfcec8ss63m3y4ey26e52pm8mzrrp5d,490000.000000000000000000;luffy,bc1qvckc45tu36nwj0gakx90uxpgt0a795ss5gl26u,140000.000000000000000000;luffy,bc1qxcejzl9jejtqswywlz360yxhk54sz3mk57r3hw,14440000.000000000000000000;luffy,bc1qy67xm5j0rt88yr9pg7lgh0nt20kqtc4f8l87yy,883230.000000000000000000;luffy,bc1qycdlvuyq44alkwfsd4nf4pkt8vr6lxhljdetan,3297.508000000000000000;opiec,bc1q7eylzmj9pfy6tg0hx6rzwae89jyvx3fyy9ca4v,1962250.000000000000000000;opiec,bc1qd4rvve65f9w0y4g7g53q228rql56tg66lvs5dq,3750000.000000000000000000;opiec,bc1qu7njshyt8fsslaxlhfu76tgh5xsjfwenwry7qj,12357500.000000000000000000;opiec,bc1qy7g83l9xu2cz2mhyu07dq0vxpzzdcgayu30lne,3750000.000000000000000000

Mismatch: OKX API gfg,bc1q6uxccyfqdnl6sfkjeu3qf7xqshjyfe22s4tc2t,1881158.933981486580500000

StampChain Indexer gfg,bc1q6uxccyfqdnl6sfkjeu3qf7xqshjyfe22s4tc2t,1881158.933981486580524364

reinamora137 commented 2 months ago

this appears to be the problematic transaction for 'gfg'

+------------------------------------------------------------------+-------------+----------------------------+----------------------------+----------------------------+
| tick                                                             | block_index | amt                        | creator_bal                | destination_bal            |
+------------------------------------------------------------------+-------------+----------------------------+----------------------------+----------------------------+
| 04f5c2b996afb56d64013fdd8a17d9440ff479677cefb714c0f206b56583d495 |      857134 | 7000000.000000000000000000 | 3945638.000000000000000000 | 7000000.000000000000000000 |
| b7f3f621421da072ecc48df94efe34bf55da7b7d0da88e901352e8cac5b5b0cb |      857351 | 1564479.066018513419475636 | 2381158.933981486580524364 | 1564479.066018513419475636 |
| d28b5599d7d505db988a1f4d0f35708e238f2a3b4e4c47bb40288f3a4ec89764 |      857436 |  500000.000000000000000000 | 1881158.933981486580524364 |  500000.000000000000000000 |
+------------------------------------------------------------------+-------------+----------------------------+----------------------------+----------------------------+
dubuqingfeng commented 2 months ago

get.in progress.