An alternative full node implementation of LBRY's blockchain written in Go (golang)
9880cf4646
Previously a new goroutine was launched for each notification in order to avoid blocking chain from continuing while the notification is being processed. This approach had a couple of issues. First, since goroutines are not guaranteed to execute in any given order, the notifications were no longer handled in the same order as they were sent. For the current code, this is not a problem, but upcoming code that handles a transaction memory pool, the order needs to be correct. Second, goroutines are relatively cheap, but it's still quite a bit of overhead to launch 3-4 goroutines per block. This commit modifies the handling code to have a single sink executing in a separate goroutine. The main handler then adds the notifications to a queue which is processed by the sink. This approach retains the non-blocking behavior of the previous approach, but also keeps the order correct and, as an additional benefit, is also more efficient. |
||
---|---|---|
.gitignore | ||
addrmanager.go | ||
addrmanager_test.go | ||
blockmanager.go | ||
btcd.go | ||
config.go | ||
discovery.go | ||
LICENSE | ||
logclosure.go | ||
mruinvmap.go | ||
params.go | ||
peer.go | ||
README.md | ||
rpcserver.go | ||
sample-btcd.conf | ||
server.go | ||
signal.go | ||
upgrade.go | ||
version.go |
btcd
btcd is an alternative full node bitcoin implementation written in Go (golang).
This project is currently under active development and is not production ready yet.
TODO
The following is a list of major items remaining before production release:
- Implement multi-peer support
- Implement transaction mempool & relay
- Complete address manager
- Documentation
- A lot of code cleanup
- Optimize