Skip to content

Conversation

setavenger
Copy link
Owner

@setavenger setavenger commented Aug 20, 2025

Introducing a fully concurrent syncing process. Took some inspiration in libbitcoin's append only philosophy. gRPC reduces bandwidth and grPC streaming shows great performance increases with regards to pulling data as a client.

Pebble is used as key value store. Data model will be explained later

Bugs:

  • Some blocks seem to not be indexed (missing 19 block from 100,000->250,000 signet). Probably due to no checks with regards to chain index integrity
  • Reorgs: not handled yet. Goal -> Ignore during initial sync. Check if previous blockhash was processed during continuous indexing

We are now using the proper cmd, internal, pkg structure.
The fucntions and information flow within the program will still need to
be overhauled.
Redesigned to have byte slices/arrays instead of strings for almost
all relevant fields
- Might have to fix some naming conventons
- This will also greatly benefit from general type clean up
- benchmarking incoming
Sqlite is still a complete bottleneck, despite adding batched block
insertions and dropping indexes while writing initially. Only 50% speed
improvements up to now
write is not the bottleneck at all, it's pulling blocks
- Massive speed ups in initial sync
- We need to adjust apis and remove legacy code
Working endpoints:
- GetInfo
- GetBestBlockHeight
- GetBlockHashByHeight
- TweaksArray ("unpruned" index)
- TweaksIndexArray (cut-through)
- Streaming Endpoints (only tweak data is included)

Todos:
- Make dust query for tweaks and utxos
- Refactor v1 endpoint to use DB interface
- Remove core/, dblevel/
@macgyver13
Copy link

macgyver13 commented Aug 21, 2025

blindbit-oracle communication with bitcoin node now requires rest to be enabled in bitcoin.conf
rest=1

blindbit.toml changes:
http = "127.0.0.1:8000"
http_host = "127.0.0.1:8000"
grpc_host = "127.0.0.1:50051"

validate gRPC endpoint using grpcurl:
grpcurl -plaintext 127.0.0.1:50051 list
grpcurl -plaintext 127.0.0.1:50051 blindbit.oracle.v1.OracleService.GetInfo

# bitcoin core rest endpoint
# note: requires bitcoin core PR #32540 (already merged to master but in a release yet)
# default: ""
core_rest_endpoint = "http://127.0.01:38332"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing . between 01

macgyver13

This comment was marked as resolved.

@macgyver13

This comment was marked as resolved.

@setavenger setavenger force-pushed the db-rpc-rest-overhaul branch from 8262ddc to 990db64 Compare August 21, 2025 20:09
@setavenger
Copy link
Owner Author

This patch resolved endpoint errors for me on commit [86192ad]

Should be fixed now

"flag"
"fmt"
"path"
"runtime"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runtime library not used

@macgyver13
Copy link

This patch seems to address the outpoint index issue causing duplicate tweaks for a block
duplicate_tweak.patch

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.

2 participants