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

[FR] Ability to filter out txs without a direct use of lock #1835

Open
phroi opened this issue Jan 4, 2025 · 6 comments
Open

[FR] Ability to filter out txs without a direct use of lock #1835

phroi opened this issue Jan 4, 2025 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@phroi
Copy link
Contributor

phroi commented Jan 4, 2025

Hello ckb explorer folks 🤗

There seems to be a strange issue: the page dedicated to PW_Lock actually displays secp256k1_blake160 txs.

Love & Peace, Phroi

@phroi
Copy link
Contributor Author

phroi commented Jan 4, 2025

P.S.: it's even more strange, it displays txs from any kind of lock. If I have to guess, likely the underlying get_cells search_key search parameter is not set up correctly, so it doesn't filter correctly 🤔

@Keith-CY Keith-CY self-assigned this Jan 13, 2025
@Keith-CY Keith-CY added the bug Something isn't working label Jan 13, 2025
@Keith-CY
Copy link
Collaborator

Hi @phroi

Sorry for replying late.

These transactions, e.g. https://explorer.nervos.org/en/transaction/0x2cdce5b0831748a9ef3883531f949240b551063ba556874f9ada5ff758edceb2

are listed on the PW Lock page because they reference PW_LOCK as one of their dependencies

image

even though PW Lock might not work at all.

However, from he perspective of the transactions, it's challenging to determine if a cell in the dependencies is actually used, as it might be relied on indirectly.

@phroi
Copy link
Contributor Author

phroi commented Jan 15, 2025

Hey @Keith-CY, thank you for taking your time to investigate the issue!

I didn't notice at all those Cell Deps, very interesting problem 🤔

On the other side, it also means that a party could inflate the number of txs linked by to a certain script by just including it as Cell Deps, which seems not too different from what is happening right now.

Closing for now as I don't see a clear solution. If something comes to mind I'll reopen this issue.

Love & Peace, Phroi

@phroi phroi closed this as completed Jan 15, 2025
@phroi phroi changed the title PW_Lock page actually displays secp256k1_blake160 txs [FR] Ability to filter out txs without a direct use of lock Jan 31, 2025
@phroi
Copy link
Contributor Author

phroi commented Jan 31, 2025

Every time that I have to double check the Explorer for txs containing a particular script, it's a mess until I remember that Nervos Explorer also includes txs that have no cells containing the script in question, but that still include it as CellDep... The Explorer assumptions are reasonable, but the result is confusing.

So my Feature Request would be: would it be possible to add a switch in the interface?

  • Restricted mode: only txs containing the Script in question as Cell are displayed (New Default)
  • Extended mode: only txs containing the Script in question as Cell Dep are displayed

@Keith-CY what's your take on this?

Love & Peace, Phroi

@phroi phroi reopened this Jan 31, 2025
@Keith-CY
Copy link
Collaborator

Keith-CY commented Feb 5, 2025

Every time that I have to double check the Explorer for txs containing a particular script, it's a mess until I remember that Nervos Explorer also includes txs that have no cells containing the script in question, but that still include it as CellDep... The Explorer assumptions are reasonable, but the result is confusing.

So my Feature Request would be: would it be possible to add a switch in the interface?

  • Restricted mode: only txs containing the Script in question as Cell are displayed (New Default)
  • Extended mode: only txs containing the Script in question as Cell Dep are displayed

@Keith-CY what's your take on this?

Love & Peace, Phroi

It's quite reasonable, and we can add a filter for direct/indirect references, and ideas from @poor-defined

@poor-defined
Copy link

@zmcNotafraid You can check the details here.

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

4 participants