Bitcoin Implementation in Scala
Go to file
Chris Stewart 3177ee405f
Move away from suredbits provided peers by default (#5390)
* Move away from suredbits provided peers by default

* Remove setting bitcoin-s.node.use-default-peers

* Don't allow peer to stay connected if it doesn't support compact filters

* Move disconnection logic into managePeerAfterInitialization()

* Remove reconnect() when we have no other peers, send getaddr message after we know we are keeping the peer connection

* Remove hasCf flag check, revert log

* Reduce inactivity-timeout to 5 minutes by default, shuffle peers in PeerFinder beforing pushing onto stack

* Add logic to disconnect AttemptToConnect peers after addr mesage is received

* Create PeerFinder.queryForPeerConnections(), call it directly from PeerManager on health checks rather than restarting PeerFinder

* scalafmt

* Move more logic into managePeerAfterInitalization()

* Don't set isPersistent for db peers by default

* Add call to queryForPeerConnections() inside of PeerManager.onDisconnect() to try to attempt to more peers when we have no more connections, fix MisBehavingPeer logic to not start sync, starting sync should happen in onDisconnect()

* Revert logback-test.xml

* Sort peers we are attempting to connect to by lastSeen parameter

* Refactor DoneSyncing.toHeaderSync() to return Option[HeaderSync] to represent the case where we don't have a peer to sync with

* scalafmt

* Remove duplicate PeerFinder.buildPeerData()
2024-02-20 12:12:57 -06:00
.github Add new macOS CI matrix to try and speed up mac jobs (#5364) 2024-01-20 18:20:35 -06:00
app 2024 01 28 Refactor PeerFinder.start() to avoid initializing connections (#5376) 2024-01-29 09:46:31 -06:00
app-commons
app-commons-test/src/test/scala/org/bitcoins/commons
async-utils/src/main/scala/org/bitcoins/asyncutil
async-utils-test/src/test/scala/org/bitcoins/asyncutil 2023 12 19 compiler opts (#5330) 2023-12-20 05:42:01 -06:00
bench
bitcoin-s-docs Update sbt-bloop to 1.5.11 (#5226) 2023-10-31 06:55:25 -05:00
bitcoind-rpc Add ChainApi.getBestChainTips() (#5338) 2023-12-31 16:54:40 -06:00
bitcoind-rpc-test
chain 2024 02 16 fix get filter sync marker from stop block header bug (#5401) 2024-02-17 06:26:55 -06:00
chain-test 2023 01 06 small chainhandler bug fixes (#5345) 2024-01-07 12:16:36 -06:00
clightning-rpc
clightning-rpc-test
core Fix handling invoice with minimal encoding of feature bits (#5405) 2024-02-19 08:37:18 -06:00
core-test Fix handling invoice with minimal encoding of feature bits (#5405) 2024-02-19 08:37:18 -06:00
crypto
crypto-test 2023 12 19 compiler opts (#5330) 2023-12-20 05:42:01 -06:00
db-commons Move away from suredbits provided peers by default (#5390) 2024-02-20 12:12:57 -06:00
db-commons-test/src/test 2023 12 19 compiler opts (#5330) 2023-12-20 05:42:01 -06:00
dlc-node Fix NullPointerException inside of DLCServer (#5287) 2023-11-07 09:11:49 -06:00
dlc-node-test
dlc-oracle/src/main
dlc-oracle-test/src/test/scala/org/bitcoins/dlc/oracle
dlc-wallet/src/main 2023 10 16 Implement WalletCallbackStreamManager, DLCWalletCallbackStreamManager (#5263) 2023-10-19 11:52:07 -05:00
dlc-wallet-test 2023 10 16 Implement WalletCallbackStreamManager, DLCWalletCallbackStreamManager (#5263) 2023-10-19 11:52:07 -05:00
docs Move away from suredbits provided peers by default (#5390) 2024-02-20 12:12:57 -06:00
eclair-rpc
eclair-rpc-test
esplora/src/main/scala/org/bitcoins/esplora
esplora-test/src/test/scala/org/bitcoins/esplora
fee-provider/src/main/scala/org/bitcoins/feeprovider
fee-provider-test/src/test/scala/org/bitcoins/feeprovider
key-manager 2023 12 19 compiler opts (#5330) 2023-12-20 05:42:01 -06:00
key-manager-test/src/test/scala/org/bitcoins/keymanager
lnd-rpc Lnd v0.17.3 (#5375) 2024-01-27 11:28:25 -06:00
lnd-rpc-test Lnd v0.17.3 (#5375) 2024-01-27 11:28:25 -06:00
lnurl/src/main/scala/org/bitcoins/lnurl Added LnURLClient accept header to request (#5318) 2023-12-06 09:52:56 -06:00
lnurl-test/src/test/scala/org/bitcoins/lnurl
node Move away from suredbits provided peers by default (#5390) 2024-02-20 12:12:57 -06:00
node-test 2024 02 18 peerfinder duplicate connect (#5403) 2024-02-18 11:47:32 -06:00
project Update sbt-scoverage to 2.0.10 (#5409) 2024-02-20 08:53:05 -06:00
release-notes
secp256k1-zkp@9dd53912dc
secp256k1jni
testkit Move away from suredbits provided peers by default (#5390) 2024-02-20 12:12:57 -06:00
testkit-core Make another instance of Gen[ECPrivateKey] be deterministic (#5353) 2024-01-14 12:01:06 -06:00
tor 2023 12 19 compiler opts (#5330) 2023-12-20 05:42:01 -06:00
tor-test/src/test/scala/org/bitcoins/tor
wallet 2023 10 19 recursive rescan state (#5269) 2023-10-24 08:13:45 -05:00
wallet-test Cancel polling job after walletTest is executed (#5379) 2024-01-31 10:24:44 -06:00
website Upgrade website dependencies (#5279) 2023-11-03 11:15:26 -05:00
zmq
.dockerignore
.gitignore
.gitmodules
.scalafmt.conf
build.sbt Remove oracle explorer client (#5308) 2023-11-22 10:27:29 -06:00
CONTRIBUTING.md
docker-compose.yml
Dockerfile
flyway.conf
inThisBuild.sbt
LICENSE
README.md
try-bitcoin-s.sh

Bitcoin-S logo Build Status Coverage Status Maven Central Gitter chat

Feature-rich toolkit for making Bitcoin and Lightning applications on the JVM.

For a complete guide on how to get started with Bitcoin-S, see our website at Bitcoin-S.org.

Contents

Running bitcoin-s

Docker

In this repo, you can just run

APP_PASSWORD=topsecret docker-compose up

which will spin up a docker environment that starts syncing the backend and will allow you to visit the web frontend of the wallet at localhost:3002

or you can build and run the electron app natively.

git clone https://github.com/bitcoin-s/bitcoin-s-ts.git
cd bitcoin-s-ts && ./build-wallet-electron.sh

Getting setup (developers)

For a complete guide on how to get setup with bitcoin-s, see our Getting setup.

This link is intended for setting up development of bitcoin-s. If you want to just install bitcoin-s rather than develop, see Getting started above.

Adding bitcoin-s to your library

The latest release of bitcoin-s is 1.9.7, here is how you can use the dependencies in your projects:

libraryDependencies += "org.bitcoin-s" % "bitcoin-s-secp256k1jni" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-core" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-crypto" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-chain" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-dlc-oracle" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-oracle-explorer-client" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-app-commons" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-db-commons" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-fee-provider" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-bitcoind-rpc" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-eclair-rpc" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-lnd-rpc" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-key-manager" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-node" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-dlc-node" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-wallet" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-dlc-wallet" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-testkit-core" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-testkit" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-zmq" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-tor" % "1.9.7"

libraryDependencies += "org.bitcoin-s" %% "bitcoin-s-cli" % "1.9.7"

Docker images

We publish docker images to docker hub on every PR merge and tag on github. You can obtain the images for both the app server and oracle server on these docker hub repos

bitcoin-s docker hub repo

oracle-server docker hub repo

Contributing

Bitcoin-S is an open source project where anyone is welcome to contribute. All contributions are encouraged and appreciated, whether that is code, testing, documentation or something else entirely.

See here for more information.

Good first issues

Here is a list of good first issues that contain bugs which have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with the bitcoin-s contribution process.

License

Bitcoin-s is MIT licensed, as found in the LICENSE file.