XRPL-Labs / xrpld-hooks

ISC License
94 stars 28 forks source link

Hook Explorer shows repeated all-zero namespace #53

Closed vbar closed 2 years ago

vbar commented 2 years ago

Issue Description

At https://hooks-testnet-v2-explorer.xrpl-labs.com/rawGPM8xR8y7Mqtu6vrzMEuR3NWpjVpHsx

zero

Steps to Reproduce

Unclear, not seen with other accounts - but this one had been used for testing Hooks Builder.

Expected Result

Even if Hooks Builder uses a zero namespace somehow, I think they should be combined.

RichardAH commented 2 years ago

Finally investigating this (and other long standing bugs).

> {"command":"account_info", "account":"rawGPM8xR8y7Mqtu6vrzMEuR3NWpjVpHsx"}
< {"result":{"account_data":{"Account":"rawGPM8xR8y7Mqtu6vrzMEuR3NWpjVpHsx","Balance":"6288463001","Flags":0,"HookNamespaces":["0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","529905A954655178A2963A52CD990B7C7ED0FEB6978C5494FE0FDAE0251A6962","A0800997EB2FED3F3B33D86DE629F548449450ECF40530106224132D616061BE"],"HookStateCount":3,"LedgerEntryType":"AccountRoot","MintedNFTokens":1,"OwnerCount":6,"PreviousTxnID":"FEBFA82C1D31C38813B258239713B2EA0B8692DDCB7BFD5097CF84E66409E673","PreviousTxnLgrSeq":5388859,"Sequence":941927,"index":"795BC072B307BAB8A04F80FAAFDB80247706A4FED33FDDDC6C0A97DC85145990"},"ledger_current_index":5472909,"validated":false},"status":"success","type":"response"}
> {"command":"ledger_entry", "account_root":"rawGPM8xR8y7Mqtu6vrzMEuR3NWpjVpHsx"}
< {"result":{"index":"795BC072B307BAB8A04F80FAAFDB80247706A4FED33FDDDC6C0A97DC85145990","ledger_current_index":5472935,"node":{"Account":"rawGPM8xR8y7Mqtu6vrzMEuR3NWpjVpHsx","Balance":"6288463001","Flags":0,"HookNamespaces":["0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","0000000000000000000000000000000000000000000000000000000000000000","529905A954655178A2963A52CD990B7C7ED0FEB6978C5494FE0FDAE0251A6962","A0800997EB2FED3F3B33D86DE629F548449450ECF40530106224132D616061BE"],"HookStateCount":3,"LedgerEntryType":"AccountRoot","MintedNFTokens":1,"OwnerCount":6,"PreviousTxnID":"FEBFA82C1D31C38813B258239713B2EA0B8692DDCB7BFD5097CF84E66409E673","PreviousTxnLgrSeq":5388859,"Sequence":941927,"index":"795BC072B307BAB8A04F80FAAFDB80247706A4FED33FDDDC6C0A97DC85145990"},"validated":false},"status":"success","type":"response"}

Because the ledger entry returns the same as the account_info, this isn't a display bug but rather an actual bug in the way the namespace vector is managed. I will investigate and fix

RichardAH commented 2 years ago

I think this will be fixed by https://github.com/XRPL-Labs/xrpld-hooks/commit/d81cc2104be6bfb5c4e49b2197520c975f310ccf

RichardAH commented 2 years ago

Should be fixed now on testnet. Accounts that already have 'all 0' entries need to run an NSDELETE to clean it up. Example transaction: https://hooks-testnet-v2-explorer.xrpl-labs.com/tx/B66DAAE133A0D5FE048146DBE28055FC5980F9F6C44E0F52354AF0A2BFA87E2B After it's cleaned up it should not come back. Please reopen if still broken.

f1f47a23 commented 2 years ago

OwnerCount: 2, is ok?

https://hooks-testnet-v2-explorer.xrpl-labs.com/raRQbJZ2LYTspsrrm64MHwhHgqVLSuCrXu/objects