-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support node-connection mode #526
Support node-connection mode #526
Comments
@Keith-CY Here's a draft about which features should be accessible within user-defined node mode |
@homura @yanguoyu @Daryl-L are familiar with CKB node RPC and have experienced debugging dapp locally, please help check if this node-connection mode satisfies development with devnet. |
After looking at the difference between the current
const ReactComponent = ({ blockNumber }: { blockNumber: string }) => {
const { data: blockData } = useQuery(['block', blockNumber], () => rpc.getBlockByNumber(blockNumber))
const { data: blockInfo } = useQuery(['block-info', blockNumber], () => explorerService.api.fetchBlock(blockNumber))
return (
<>
{/* render block data */}
<>{blockData.xxxx}</>
{/* render block info if info returned */}
{blockInfo && <>{blockInfo.xxx}</>}
</>
)
}
const fetchfetchBlock = async (blockNumber: number) => {
const explorerData = await explorerService.api.fetchBlock(blockNumber)
if (explorerData) return explorerData
const rpcData = await rpc.getBlockByNumber(blockNumber)
return mapRpcDataToExplorerData(rpcData)
}
const ReactComponent = ({ blockNumber }: { blockNumber: string }) => {
const { data: blockInfo } = useQuery(['block-info', blockNumber], () => fetchfetchBlock(blockNumber))
return (
<>
{/* render */}
<>{blockInfo.xxxx}</>
{/* rendering fields that may not exist */}
{blockInfo.xxx && <>{blockInfo.xxx}</>}
</>
)
} I prefer the first explicit request, so that it's easier to troubleshoot if the explorer's api returns a different value. |
I'll start on this this week and expect to be able to submit the |
@Keith-CY @PainterPuppets is it possible to configure node mode using url? like I want this since I want to integrate the explorer in offckb for devnet environment, so user can open with one command without manually configuring from the website |
We will deploy another page for this case, so users will be clearly informed that data are not from the *official* source |
@PainterPuppets Hi Tao, Could you link your related PRs in one comment with their range including not-started ones? 可以把已经提交的和计划要开始的PR(我记得有两个一个Home Page,还有一个地址详情页?)都贴在一个地方吗 |
home & transaction: Magickbase/ckb-explorer-frontend#350 block: Magickbase/ckb-explorer-frontend#390 address: Magickbase/ckb-explorer-frontend#391 |
hi, where can I set the node url?
and where can i find this page? |
@RetricSu Hi Su, |
During the Omiga inscription launch, the performance of CKB explorer was frankly impacted, as shown in the screenshot
There were more than 500 blocks to catch up with.
This latency really bothered users because they could not tell which one was down, the chain or the explorer. Even with the new alert on the top revealed that chain worked well, they are still lost the ability to view their transactions timely.
For this case, I would suggest adding a node-connection mode.
By do these, the page could fallback to a simple view with all necessary information when the explorer hasn't finished the data processing.
The text was updated successfully, but these errors were encountered: