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

feat: address page support node-connect mode #391

Merged

Conversation

PainterPuppets
Copy link

@PainterPuppets PainterPuppets commented Jun 27, 2024

Copy link

vercel bot commented Jun 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ckb-explorer-frontend-in-magickbase-repo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 10, 2024 11:25am

src/pages/Address/styled.tsx Outdated Show resolved Hide resolved
@FrederLu
Copy link

FrederLu commented Jul 4, 2024

https://ckb-explorer-frontend-in-magickbase-repo-epkr0oa3n-magickbase.vercel.app/address/ckt1qzq2p8k2ymthe6sltf55w8zefqd7wsz0a06qa6g03pkrd22g8pd42qtaqqqqqyqqqqq9jqqqqpwsqqqqfyqqqqqsqqqqqvqqqqqrzqqqqzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqg5qqqqptz8d3wnv5vqyz53mgjs4m6afapasylrkpsqqqqqmcggt45w3qxrfkxhl3wykrw75tfchkt5f9vfzl4d7355yy8r5xql6ugfy
image
image

https://ckb-explorer-frontend-in-magickbase-repo-epkr0oa3n-magickbase.vercel.app/address/ckt1qyqrpp98atnkx060dh3mhj7txvxgvj3rszeqd4lwxl

1、If paging is not required, the Load more button at the bottom should not be displayed, and No more data should be displayed directly. Now the current transaction data is 5, and the Load more button is displayed, but the data does not increase after clicking it.


image image

2、Missing transaction statistics and Pending Transactions (0) information.


image image

3、There is a problem with the data output[3] in the Node mode.


https://ckb-explorer-frontend-in-magickbase-repo-epkr0oa3n-magickbase.vercel.app/address/ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqfssjn74emr8a8kmcame09nxryxfg3cpvsz27yt9
image

image

4、The transaction address is missing icons (->/O) on the left and right.

@PainterPuppets
Copy link
Author

PainterPuppets commented Jul 5, 2024

https://ckb-explorer-frontend-in-magickbase-repo-epkr0oa3n-magickbase.vercel.app/address/ckt1qzq2p8k2ymthe6sltf55w8zefqd7wsz0a06qa6g03pkrd22g8pd42qtaqqqqqyqqqqq9jqqqqpwsqqqqfyqqqqqsqqqqqvqqqqqrzqqqqzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqg5qqqqptz8d3wnv5vqyz53mgjs4m6afapasylrkpsqqqqqmcggt45w3qxrfkxhl3wykrw75tfchkt5f9vfzl4d7355yy8r5xql6ugfy image image

https://ckb-explorer-frontend-in-magickbase-repo-epkr0oa3n-magickbase.vercel.app/address/ckt1qyqrpp98atnkx060dh3mhj7txvxgvj3rszeqd4lwxl

1、If paging is not required, the Load more button at the bottom should not be displayed, and No more data should be displayed directly. Now the current transaction data is 5, and the Load more button is displayed, but the data does not increase after clicking it.

image image
2、Missing transaction statistics and Pending Transactions (0) information.

image image
3、There is a problem with the data output[3] in the Node mode.

https://ckb-explorer-frontend-in-magickbase-repo-epkr0oa3n-magickbase.vercel.app/address/ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqfssjn74emr8a8kmcame09nxryxfg3cpvsz27yt9 image

image 4、The transaction address is missing icons (->/O) on the left and right.
  1. The fetch tx by node-rpc are waterfall streaming, there's no way to know how many tx there are.

About peding tx: the node-rpc can only fetch all the tx in the tx pool, there's no way to filter and aggregate by address, and if we filter and aggregate on the front-end, there's a performance issue if there's more tx (for example, when build inscriptions before)

  1. This cell is an xudt cell, and according to normal logic it should show the udt amount, so it feels logically fine, maybe we should show it as XUDT amount (ckb capacity)

  2. These two icons show where the cell was generated from and the state of consumption, there is no way for the node-rpc to provide this feature, so it is removed

@Keith-CY
Copy link
Member

Keith-CY commented Jul 5, 2024

ckb-explorer-frontend-in-magickbase-repo-epkr0oa3n-magickbase.vercel.app/address/ckt1qzq2p8k2ymthe6sltf55w8zefqd7wsz0a06qa6g03pkrd22g8pd42qtaqqqqqyqqqqq9jqqqqpwsqqqqfyqqqqqsqqqqqvqqqqqrzqqqqzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqg5qqqqptz8d3wnv5vqyz53mgjs4m6afapasylrkpsqqqqqmcggt45w3qxrfkxhl3wykrw75tfchkt5f9vfzl4d7355yy8r5xql6ugfy image image
ckb-explorer-frontend-in-magickbase-repo-epkr0oa3n-magickbase.vercel.app/address/ckt1qyqrpp98atnkx060dh3mhj7txvxgvj3rszeqd4lwxl
1、If paging is not required, the Load more button at the bottom should not be displayed, and No more data should be displayed directly. Now the current transaction data is 5, and the Load more button is displayed, but the data does not increase after clicking it.
image image
2、Missing transaction statistics and Pending Transactions (0) information.
image image
3、There is a problem with the data output[3] in the Node mode.
ckb-explorer-frontend-in-magickbase-repo-epkr0oa3n-magickbase.vercel.app/address/ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqfssjn74emr8a8kmcame09nxryxfg3cpvsz27yt9 image
image
4、The transaction address is missing icons (->/O) on the left and right.

  1. The fetch tx by node-rpc are waterfall streaming, there's no way to know how many tx there are.

About peding tx: the node-rpc can only fetch all the tx in the tx pool, there's no way to filter and aggregate by address, and if we filter and aggregate on the front-end, there's a performance issue if there's more tx (for example, when build inscriptions before)

  1. This cell is an xudt cell, and according to normal logic it should show the udt amount, so it feels logically fine, maybe we should show it as XUDT amount (ckb capacity)
  2. These two icons show where the cell was generated from and the state of consumption, there is no way for the node-rpc to provide this feature, so it is removed

For point 4. showing the from of inputs and to of outputs
It's partially feasible with RPC https://github.com/nervosnetwork/ckb/tree/develop/rpc#method-get_live_cell
If the RPC returns null, the output has been used by some transaction. The live/dead status can be determined.

@FrederLu
Copy link

FrederLu commented Jul 5, 2024

1、If paging is not required, the Load more button at the bottom should not be displayed, and No more data should be displayed directly. Now the current transaction data is 5, and the Load more button is displayed, but the data does not increase after clicking it.

Now the paging logic is OK, but should we also display 25 data items on a single page to keep it consistent with the non-Node mode? Now there are 10 data items on a single page. @PainterPuppets cc @Keith-CY

  1. The fetch tx by node-rpc are waterfall streaming, there's no way to know how many tx there are.

About peding tx: the node-rpc can only fetch all the tx in the tx pool, there's no way to filter and aggregate by address, and if we filter and aggregate on the front-end, there's a performance issue if there's more tx (for example, when build inscriptions before)

  1. This cell is an xudt cell, and according to normal logic it should show the udt amount, so it feels logically fine, maybe we should show it as XUDT amount (ckb capacity)
  2. These two icons show where the cell was generated from and the state of consumption, there is no way for the node-rpc to provide this feature, so it is removed

The third question is how do we display the data? @Keith-CY

@Keith-CY
Copy link
Member

Keith-CY commented Jul 5, 2024

1、If paging is not required, the Load more button at the bottom should not be displayed, and No more data should be displayed directly. Now the current transaction data is 5, and the Load more button is displayed, but the data does not increase after clicking it.

Now the paging logic is OK, but should we also display 25 data items on a single page to keep it consistent with the non-Node mode? Now there are 10 data items on a single page. @PainterPuppets cc @Keith-CY

  1. The fetch tx by node-rpc are waterfall streaming, there's no way to know how many tx there are.

About peding tx: the node-rpc can only fetch all the tx in the tx pool, there's no way to filter and aggregate by address, and if we filter and aggregate on the front-end, there's a performance issue if there's more tx (for example, when build inscriptions before)

  1. This cell is an xudt cell, and according to normal logic it should show the udt amount, so it feels logically fine, maybe we should show it as XUDT amount (ckb capacity)
  2. These two icons show where the cell was generated from and the state of consumption, there is no way for the node-rpc to provide this feature, so it is removed

The third question is how do we display the data? @Keith-CY

The outputs[3] cell has xudt type script so it should be displayed with xudt amount. The preview is correct while the display of testnet is incorrect

@PainterPuppets
Copy link
Author

PainterPuppets commented Jul 5, 2024

ckb-explorer-frontend-in-magickbase-repo-epkr0oa3n-magickbase.vercel.app/address/ckt1qzq2p8k2ymthe6sltf55w8zefqd7wsz0a06qa6g03pkrd22g8pd42qtaqqqqqyqqqqq9jqqqqpwsqqqqfyqqqqqsqqqqqvqqqqqrzqqqqzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqg5qqqqptz8d3wnv5vqyz53mgjs4m6afapasylrkpsqqqqqmcggt45w3qxrfkxhl3wykrw75tfchkt5f9vfzl4d7355yy8r5xql6ugfy image image
ckb-explorer-frontend-in-magickbase-repo-epkr0oa3n-magickbase.vercel.app/address/ckt1qyqrpp98atnkx060dh3mhj7txvxgvj3rszeqd4lwxl
1、If paging is not required, the Load more button at the bottom should not be displayed, and No more data should be displayed directly. Now the current transaction data is 5, and the Load more button is displayed, but the data does not increase after clicking it.
image image
2、Missing transaction statistics and Pending Transactions (0) information.
image image
3、There is a problem with the data output[3] in the Node mode.
ckb-explorer-frontend-in-magickbase-repo-epkr0oa3n-magickbase.vercel.app/address/ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqfssjn74emr8a8kmcame09nxryxfg3cpvsz27yt9 image
image
4、The transaction address is missing icons (->/O) on the left and right.

  1. The fetch tx by node-rpc are waterfall streaming, there's no way to know how many tx there are.

About peding tx: the node-rpc can only fetch all the tx in the tx pool, there's no way to filter and aggregate by address, and if we filter and aggregate on the front-end, there's a performance issue if there's more tx (for example, when build inscriptions before)

  1. This cell is an xudt cell, and according to normal logic it should show the udt amount, so it feels logically fine, maybe we should show it as XUDT amount (ckb capacity)
  2. These two icons show where the cell was generated from and the state of consumption, there is no way for the node-rpc to provide this feature, so it is removed

For point 4. showing the from of inputs and to of outputs It's partially feasible with RPC https://github.com/nervosnetwork/ckb/tree/develop/rpc#method-get_live_cell If the RPC returns null, the output has been used by some transaction. The live/dead status can be determined.

In this case the list will send more requests, for example, a list with 10 tx might have 30 cells and require 30 requests to get the live status. should we do this?

@Keith-CY
Copy link
Member

Keith-CY commented Jul 9, 2024

ckb-explorer-frontend-in-magickbase-repo-epkr0oa3n-magickbase.vercel.app/address/ckt1qzq2p8k2ymthe6sltf55w8zefqd7wsz0a06qa6g03pkrd22g8pd42qtaqqqqqyqqqqq9jqqqqpwsqqqqfyqqqqqsqqqqqvqqqqqrzqqqqzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqg5qqqqptz8d3wnv5vqyz53mgjs4m6afapasylrkpsqqqqqmcggt45w3qxrfkxhl3wykrw75tfchkt5f9vfzl4d7355yy8r5xql6ugfy image image
ckb-explorer-frontend-in-magickbase-repo-epkr0oa3n-magickbase.vercel.app/address/ckt1qyqrpp98atnkx060dh3mhj7txvxgvj3rszeqd4lwxl
1、If paging is not required, the Load more button at the bottom should not be displayed, and No more data should be displayed directly. Now the current transaction data is 5, and the Load more button is displayed, but the data does not increase after clicking it.
image image
2、Missing transaction statistics and Pending Transactions (0) information.
image image
3、There is a problem with the data output[3] in the Node mode.
ckb-explorer-frontend-in-magickbase-repo-epkr0oa3n-magickbase.vercel.app/address/ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqfssjn74emr8a8kmcame09nxryxfg3cpvsz27yt9 image
image
4、The transaction address is missing icons (->/O) on the left and right.

  1. The fetch tx by node-rpc are waterfall streaming, there's no way to know how many tx there are.

About peding tx: the node-rpc can only fetch all the tx in the tx pool, there's no way to filter and aggregate by address, and if we filter and aggregate on the front-end, there's a performance issue if there's more tx (for example, when build inscriptions before)

  1. This cell is an xudt cell, and according to normal logic it should show the udt amount, so it feels logically fine, maybe we should show it as XUDT amount (ckb capacity)
  2. These two icons show where the cell was generated from and the state of consumption, there is no way for the node-rpc to provide this feature, so it is removed

For point 4. showing the from of inputs and to of outputs It's partially feasible with RPC nervosnetwork/ckb@develop/rpc#method-get_live_cell If the RPC returns null, the output has been used by some transaction. The live/dead status can be determined.

In this case the list will send more requests, for example, a list with 10 tx might have 30 cells and require 30 requests to get the live status. should we do this?

The node-connection mode works as a fallback in case the server is down, or a solution to connect to the local node, I think the traffic is tolerant, especially when it's connected to a local node.

Besides, the performance can be optimized by batching the RPC calls.

@PainterPuppets PainterPuppets force-pushed the address_page_support_node_mode branch from 0791b00 to a8983c8 Compare July 10, 2024 09:35
@Keith-CY Keith-CY merged commit 65b5020 into Magickbase:develop Jul 11, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support node-connection mode
3 participants