Sia
Sia copied to clipboard
GET /explorer/blocks/height response not consistent
BUG REPORT
Stack Trace or error message
GET /explorer/blocks/151739 the block fields are all empty, except transactions
Expected Behavior
GET /explorer/blocks/151738 is expected response
How to reproduce it (as minimally and precisely as possible)
Environment
- Sia version: Git master
- OS: Linux
The explorer says the block 151739 hash is 0000000000000000780e884a62fc626afe5a16b7dc7baf5d2e6062bfa4b3b010 https://explorer.siahub.info/block/151739
Then the GET /explorer/hashes/0000000000000000780e884a62fc626afe5a16b7dc7baf5d2e6062bfa4b3b010 return {"message":"unrecognized hash used as input to /explorer/hash"}
Maybe the explorer module didn't full index all the blocks?
explorer module is buggy and laggy, need total rework. Or something like.
So you can only delete explorer DB and build it again until it will work correctly.
Are there any methods to get public transaction info without explorer module? How does the official Sia explorer website work?
Official made by Luxor (@eddiewang) They did some fixes in explorer module: https://github.com/LuxorLabs/Sia/tree/luxor-explorer
I did my custom build too for SiaHub, but just as new endpoint in api, not via explorer fixes. https://github.com/S-anasol/Sia/tree/siahub
without explorer module
use explorer api :D https://siahub.readme.io/v1.0/reference#block
If there are fixes, why don't the team merge to the official sia repo?
We're not confident the fixes are an overall step in the right direction. Anything we merge, we'll be stuck with for a long time, and the fixes had issues and inconsistencies of their own.
better the devil you know than the one you don't, I guess.
Another contributor is taking a stab at making their own explorer module. I'm not sure how far they are or how committed, but they know the codebase well and have a good shot at making something that's better than everything else currently available.
fingers crossed
I have got a panic log
goroutine 1 [running]:
runtime/debug.Stack(0x446007, 0x0, 0xc42b8b0e00)
/snap/go/1688/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/snap/go/1688/src/runtime/debug/stack.go:16 +0x22
github.com/NebulousLabs/Sia/build.Critical(0xc42b8b0ea8, 0x2, 0x2)
/home/one/GOPATH/src/github.com/NebulousLabs/Sia/build/critical.go:16 +0x93
github.com/NebulousLabs/Sia/modules/explorer.(*Explorer).ProcessConsensusChange(0xc420097c80, 0xc914d81931bbde74, 0x612a5aa14c8e1cb8, 0x4f3ad19124dc71a3, 0xc740bc5209ecd807, 0xc44c602d80, 0x1, 0x1, 0xc47e416a80, 0x2, ...)
/home/one/GOPATH/src/github.com/NebulousLabs/Sia/modules/explorer/update.go:282 +0xd4
github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).managedInitializeSubscribe.func2(0xc48529a0e0, 0xad6b38, 0xc48529a0e0)
/home/one/GOPATH/src/github.com/NebulousLabs/Sia/modules/consensus/subscribe.go:187 +0x236
github.com/NebulousLabs/Sia/vendor/github.com/coreos/bbolt.(*DB).View(0xc420156780, 0xc443479378, 0x0, 0x0)
/home/one/GOPATH/src/github.com/NebulousLabs/Sia/vendor/github.com/coreos/bbolt/db.go:704 +0x90
github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).managedInitializeSubscribe(0xc42018c780, 0xb3d420, 0xc420097c80, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc420155490, 0x5d35f2)
/home/one/GOPATH/src/github.com/NebulousLabs/Sia/modules/consensus/subscribe.go:176 +0x264
github.com/NebulousLabs/Sia/modules/consensus.(*ConsensusSet).ConsensusSetSubscribe(0xc42018c780, 0xb3d420, 0xc420097c80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/one/GOPATH/src/github.com/NebulousLabs/Sia/modules/consensus/subscribe.go:216 +0xee
github.com/NebulousLabs/Sia/modules/explorer.New(0xb47e80, 0xc42018c780, 0xc420022400, 0x18, 0x18, 0x1a, 0x0)
/home/one/GOPATH/src/github.com/NebulousLabs/Sia/modules/explorer/explorer.go:80 +0x197
main.(*Server).loadModules(0xc4200c20f0, 0xad6ec0, 0xc42008c300)
/home/one/GOPATH/src/github.com/NebulousLabs/Sia/cmd/siad/server.go:514 +0x194d
main.startDaemon(0x0, 0x0, 0xaa9599, 0xe, 0xa998e6, 0x5, 0xa998eb, 0x5, 0x0, 0x7ffd642457a4, ...)
/home/one/GOPATH/src/github.com/NebulousLabs/Sia/cmd/siad/daemon.go:188 +0x2b3
main.startDaemonCmd(0xc420101b80, 0xc420070780, 0x0, 0x4)
/home/one/GOPATH/src/github.com/NebulousLabs/Sia/cmd/siad/daemon.go:236 +0x162
github.com/spf13/cobra.(*Command).execute(0xc420101b80, 0xc42001e150, 0x4, 0x4, 0xc420101b80, 0xc42001e150)
/home/one/GOPATH/src/github.com/spf13/cobra/command.go:766 +0x2c1
github.com/spf13/cobra.(*Command).ExecuteC(0xc420101b80, 0xac72e3, 0x3b, 0xc4200bbb80)
/home/one/GOPATH/src/github.com/spf13/cobra/command.go:852 +0x30a
github.com/spf13/cobra.(*Command).Execute(0xc420101b80, 0xefb640, 0xaae618)
/home/one/GOPATH/src/github.com/spf13/cobra/command.go:800 +0x2b
main.main()
/home/one/GOPATH/src/github.com/NebulousLabs/Sia/cmd/siad/main.go:174 +0x6fe
Critical error: explorer update failed: runtime error: invalid memory address or nil pointer dereference
Please submit a bug report here: https://github.com/NebulousLabs/Sia/issues