2019-01-05 16:40:51 +01:00
|
|
|
import sbt.Credentials
|
|
|
|
import sbt.Keys.publishTo
|
|
|
|
|
2018-11-15 19:13:26 +01:00
|
|
|
cancelable in Global := true
|
2018-08-26 18:54:10 +02:00
|
|
|
|
2018-11-18 17:01:52 +01:00
|
|
|
lazy val commonCompilerOpts = {
|
|
|
|
List(
|
|
|
|
"-Xmax-classfile-name",
|
|
|
|
"128"
|
|
|
|
)
|
|
|
|
}
|
|
|
|
//https://docs.scala-lang.org/overviews/compiler-options/index.html
|
|
|
|
lazy val compilerOpts = Seq(
|
|
|
|
"-target:jvm-1.8",
|
|
|
|
"-encoding",
|
|
|
|
"UTF-8",
|
|
|
|
"-unchecked",
|
|
|
|
"-feature",
|
|
|
|
"-deprecation",
|
|
|
|
"-Xfuture",
|
|
|
|
"-Ywarn-dead-code",
|
|
|
|
"-Ywarn-unused-import",
|
|
|
|
"-Ywarn-value-discard",
|
|
|
|
"-Ywarn-unused",
|
|
|
|
"-unchecked",
|
|
|
|
"-deprecation",
|
|
|
|
"-feature"
|
|
|
|
) ++ commonCompilerOpts
|
|
|
|
|
|
|
|
lazy val testCompilerOpts = commonCompilerOpts
|
2018-08-26 18:54:10 +02:00
|
|
|
|
2019-01-05 16:40:51 +01:00
|
|
|
|
|
|
|
|
2018-08-26 18:54:10 +02:00
|
|
|
lazy val commonSettings = List(
|
2018-11-18 17:01:52 +01:00
|
|
|
scalacOptions in Compile := compilerOpts,
|
2019-01-08 16:29:06 +01:00
|
|
|
|
2018-11-18 17:01:52 +01:00
|
|
|
scalacOptions in Test := testCompilerOpts,
|
2019-01-10 16:07:18 +01:00
|
|
|
|
2018-12-09 20:43:31 +01:00
|
|
|
assemblyOption in assembly := (assemblyOption in assembly).value
|
2018-12-14 20:09:53 +01:00
|
|
|
.copy(includeScala = false),
|
|
|
|
|
|
|
|
bintrayOrganization := Some("bitcoin-s"),
|
|
|
|
|
|
|
|
bintrayRepository := "bitcoin-s-core",
|
|
|
|
|
2018-12-15 17:09:52 +01:00
|
|
|
licenses += ("MIT", url("http://opensource.org/licenses/MIT")),
|
|
|
|
|
2019-01-05 16:40:51 +01:00
|
|
|
resolvers += Resolver.bintrayRepo("bitcoin-s", "bitcoin-s-core"),
|
|
|
|
|
|
|
|
resolvers += Resolver.jcenterRepo,
|
|
|
|
|
|
|
|
resolvers += "oss-jfrog-artifactory-snapshot" at "https://oss.jfrog.org/artifactory/oss-snapshot-local",
|
|
|
|
|
|
|
|
credentials ++= List(
|
|
|
|
//for snapshot publishing
|
|
|
|
//http://szimano.org/automatic-deployments-to-jfrog-oss-and-bintrayjcentermaven-central-via-travis-ci-from-sbt/
|
|
|
|
Credentials(Path.userHome / ".bintray" / ".artifactory"),
|
|
|
|
|
|
|
|
//sbt bintray plugin
|
|
|
|
//release publshing
|
|
|
|
Credentials(Path.userHome / ".bintray" / ".credentials")
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
|
|
publishTo := {
|
|
|
|
//preserve the old bintray publishing stuff here
|
|
|
|
//we need to preserve it for the publishTo settings below
|
|
|
|
val bintrayPublish = publishTo.value
|
|
|
|
if (isSnapshot.value) {
|
|
|
|
Some("Artifactory Realm" at
|
|
|
|
"https://oss.jfrog.org/artifactory/oss-snapshot-local;build.timestamp=" + new java.util.Date().getTime)
|
|
|
|
} else {
|
|
|
|
bintrayPublish
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
bintrayReleaseOnPublish := !isSnapshot.value,
|
|
|
|
|
|
|
|
//fix for https://github.com/sbt/sbt/issues/3519
|
|
|
|
updateOptions := updateOptions.value.withGigahorse(false)
|
2018-12-15 17:09:52 +01:00
|
|
|
|
2018-08-26 18:54:10 +02:00
|
|
|
)
|
Lightning Network (#256)
* Implementation of LnCurrencyUnit
Fix unary and unneeded comments.
Refactor and change arithmetic to use PicoBitcoins.
Add property based testing for LnCurrencyUnits
Refactor LnCurrencyUnits after code review
Fix case and change LnPolicy to val
Remove division and add Unit tests
* Add additional unit tests and deserialization
* WIP: Implement LnHumanReadablePart (#190)
* Initial Implementation of LnHumanReadablePart
* Add unit tests and improve deserialization from string
* Refactor LnParams and LnHrp. Add requirements for instantiating LnHrp.
* Clean up and re-organize things
Re-working LnHumanReadablePart.fromString
Fix unnecessary pattern match
Removing test case
* Created eclairRpc project (#193)
Added getinfo functionality
Added connect functionality
Added most of the rpcs
Added send and checkpayment functionality
Added updaterelayfee functionality
Fixed compile errors
Ran scalafmt
Added DaemonInstance and start/stop methods
Added TestUtil
Added open test
Fixed typo in allUpdates
Fixed ChannelResult
Add eclair prefix to rpc stuff
open channel unit test passing
Adding instructions to grab default eclair in build
Add zmq config to bitcoin.conf
rename test log files, bump timeouts on connections
Add eclair-rpc README, rework some RpcUtil/TestUtil stuff for async
fixing bug in precious block, addressing code review
Address more code review comments
* Add NodeId, NodeUri, ChannelId (#196)
refactor json serializing methods to SerializerUtil, add more types
* Adding LnCurrencyUnit types to rpc api, fixing bug where eclair tests were not binding to a random port for zmq (#198)
Remove start stuff
* Adding more rpc tests, testing open, payment over channel, and closing of the channel (#199)
Add checkpayment tests
Address code review, create EclairTestUtil.createNodPair
* Two way eclair transactions sanity test (#200)
* Added a test for sending payments in both directions
* Updated travis bitcoin core version
* Initial LnInvoice Implementation (#194)
Start typing some ln invoice stuff
Add support for Fallback Address encoding
Part 1: Breaking out Bech32 specific functions into a util class, don't embed in Bech32Address
re-naming fromBase8ToBase5 -> from8BitTo5bit
Part 1: Breaking out Bech32 specific functions into a util class, don't embed in Bech32Address
rework ln invoices tags
fix more method names in Bech32
Rename ScriptPubKeyTag -> NodeIdTag
All invoice tags tests passing except weird serialization order one
Address code review, add some more comments
rename 'LnInvoiceTags' -> 'LnInvoiceTaggedFields'
create a UInt5 type to represent all of the bech32 data structures
Passing all serialization in the BOLT11 examples
First cut at deserialization
* Adding bitcoin-s types to the eclair-rpc, fixing bug with decoding numbers, refactoring more things (#204)
* Switch bech32 p2wpkh hash from RipdeMd160 -> Sha256Hash160Digest (#206)
* Add testkit project / dependency (#209)
fix core-gen build.sbt name
* add correct dependencies to testkit (#210)
* Get dep name right (#211)
* Add serialization symmetry property for LnInvoice, fixing various bugs in LnInvoice data structures, adding generators for various LnInvoice data structures (#217)
* Reworking AuthCredentials and Instances so that we can read from config files (#218)
add core files that were missing
* Reworking a lot of testkit data structures to be more helpful for testing (#219)
Add missing EclairApi file
remove noisy log
* Rebase onto master, fix testkit compile issues
* Simplify LnCurrencyUnit, add MilliSatoshis, refactor EclairRpc to use… (#226)
* Simplify LnCurrencyUnit, add MilliSatoshis, refactor EclairRpc to use MilliSatoshis
* Add some helper functions around millisatoshis for comparing them to other things
* more tests / helper methods, at generator for millisatoshis
* Fix typo
* Fix comparison operators for millisatoshis, add Writes for MilliSatos… (#227)
* Fix comparison operators for millisatoshis, add Writes for MilliSatoshis in JsonWriters
* re-add comparison operators to LnCurrencyUnit for convinience
* Add millisatoshi reads (#228)
* Updating version of eclair to https://github.com/ACINQ/eclair/releases/download/v0.2-beta8/eclair-node-0.2-beta8-52821b8.jar (#229)
* Derive nodeId from ln invoice signature, move nodeid case class into … (#230)
* Derive nodeId from ln invoice signature, move nodeid case class into the core project
* Add missing assert
* Fix null pointer exception that could occurred during requiring the invoice's signature to valid. This could occurr if a user tried to construct an invoice with an invalid signature (#233)
* Turn down logging / remove logging (#235)
* Cleaned up eclair conf (#237)
* Cleaned up eclair conf
* Added test for bad auth and Reads for LnInvoice
* WIP: rebase onto master with new compiler opts
fix more compiler warnings with testkit
* fix new compiler warnings for scalac 2.12.x on ln (#253)
* fix new compiler warnings for scalac 2.12.x on ln
* fix missing p2wpkhoutput in rawoutput testkit/CreditingTxGen.scala
* First cut at code review for the ln branch (#258)
Fix bug in parsing the LnTagPrefix.CltvExpiry, add properties that check if the NodeIdTag is given explicitly to the invoice
remove dumb invariants
revert version
* 2018 12 4 ln code review rd2 (#259)
* Amend EclairRpc test case for confirming that channel is closed
* Add final check to test case to make sure the bitcoind wallet received funds when closing channel
* Address Torkel's code review
* Addresses some review on #256 (#260)
* Docstring cleanup, small nits
* Refactors some redudant data, nested if => switch
* Fixes SO error by reversing remowal of `new`
* Fixes a couple of bugs
* map.get instead of list.find
* StringBuilder in HRP
* Rework NetworkParam to LnParam
* Cleanup
* Renames file to match trait/object name
* Docstring cleanup, pure formatting
* Simplifies a few expressions, doesn't change semantics
* Adds overloaded findRoute method instead of Either[NodeId, LnInvoice]
* Eclair cleanup
* Address concerns from Chris
* Type annotation to match case
* Address nadav's code review
2018-12-08 17:03:24 +01:00
|
|
|
|
2018-05-02 20:13:42 +02:00
|
|
|
lazy val root = project
|
2018-12-09 20:43:31 +01:00
|
|
|
.in(file("."))
|
|
|
|
.aggregate(
|
|
|
|
secp256k1jni,
|
|
|
|
core,
|
|
|
|
coreTest,
|
|
|
|
zmq,
|
|
|
|
rpc,
|
|
|
|
bench,
|
|
|
|
eclairRpc,
|
2019-01-08 16:29:06 +01:00
|
|
|
testkit,
|
|
|
|
doc
|
2018-12-09 20:43:31 +01:00
|
|
|
)
|
|
|
|
.settings(commonSettings: _*)
|
2019-01-10 16:07:18 +01:00
|
|
|
.settings(crossScalaVersions := Nil)
|
2018-05-02 20:13:42 +02:00
|
|
|
|
2018-12-14 20:09:53 +01:00
|
|
|
|
2018-05-02 20:13:42 +02:00
|
|
|
lazy val secp256k1jni = project
|
|
|
|
.in(file("secp256k1jni"))
|
2018-08-26 18:54:10 +02:00
|
|
|
.settings(commonSettings: _*)
|
2018-12-11 21:38:17 +01:00
|
|
|
.settings(
|
2018-12-14 20:09:53 +01:00
|
|
|
libraryDependencies ++= Deps.secp256k1jni,
|
2019-01-10 16:07:18 +01:00
|
|
|
unmanagedResourceDirectories in Compile += baseDirectory.value / "natives",
|
|
|
|
//since this is not a scala module, we have no code coverage
|
|
|
|
//this also doesn't place nice with scoverage, see
|
|
|
|
//https://github.com/scoverage/sbt-scoverage/issues/275
|
|
|
|
coverageEnabled := false
|
2018-12-11 21:38:17 +01:00
|
|
|
)
|
2018-05-02 20:13:42 +02:00
|
|
|
.enablePlugins()
|
|
|
|
|
|
|
|
lazy val core = project
|
|
|
|
.in(file("core"))
|
|
|
|
.enablePlugins()
|
2018-08-26 18:54:10 +02:00
|
|
|
.settings(commonSettings: _*)
|
2018-05-02 20:13:42 +02:00
|
|
|
.dependsOn(
|
|
|
|
secp256k1jni
|
|
|
|
)
|
|
|
|
|
|
|
|
lazy val coreTest = project
|
|
|
|
.in(file("core-test"))
|
|
|
|
.enablePlugins()
|
2018-08-26 18:54:10 +02:00
|
|
|
.settings(commonSettings: _*)
|
2019-01-10 16:07:18 +01:00
|
|
|
.settings(skip in publish := true)
|
2018-05-02 20:13:42 +02:00
|
|
|
.dependsOn(
|
|
|
|
core,
|
|
|
|
)
|
|
|
|
|
|
|
|
lazy val zmq = project
|
|
|
|
.in(file("zmq"))
|
|
|
|
.enablePlugins()
|
2018-08-26 18:54:10 +02:00
|
|
|
.settings(commonSettings: _*)
|
2018-05-02 20:13:42 +02:00
|
|
|
.dependsOn(
|
|
|
|
core
|
|
|
|
)
|
|
|
|
|
2018-05-24 20:43:27 +02:00
|
|
|
lazy val rpc = project
|
|
|
|
.in(file("rpc"))
|
|
|
|
.enablePlugins()
|
2018-08-26 18:54:10 +02:00
|
|
|
.settings(commonSettings: _*)
|
2018-05-24 20:43:27 +02:00
|
|
|
.dependsOn(
|
2018-12-15 17:09:52 +01:00
|
|
|
core
|
2018-12-09 20:43:31 +01:00
|
|
|
)
|
2018-05-24 20:43:27 +02:00
|
|
|
|
2018-11-21 21:01:03 +01:00
|
|
|
lazy val bench = project
|
|
|
|
.in(file("bench"))
|
|
|
|
.enablePlugins()
|
2018-12-09 20:43:31 +01:00
|
|
|
.settings(assemblyOption in assembly := (assemblyOption in assembly).value
|
|
|
|
.copy(includeScala = true))
|
2018-12-14 20:09:53 +01:00
|
|
|
.settings(commonSettings: _*)
|
|
|
|
.settings(
|
|
|
|
libraryDependencies ++= Deps.bench,
|
2019-01-10 16:07:18 +01:00
|
|
|
name := "bitcoin-s-bench",
|
|
|
|
skip in publish := true
|
2018-12-14 20:09:53 +01:00
|
|
|
)
|
2018-11-21 21:01:03 +01:00
|
|
|
.dependsOn(core)
|
|
|
|
|
Lightning Network (#256)
* Implementation of LnCurrencyUnit
Fix unary and unneeded comments.
Refactor and change arithmetic to use PicoBitcoins.
Add property based testing for LnCurrencyUnits
Refactor LnCurrencyUnits after code review
Fix case and change LnPolicy to val
Remove division and add Unit tests
* Add additional unit tests and deserialization
* WIP: Implement LnHumanReadablePart (#190)
* Initial Implementation of LnHumanReadablePart
* Add unit tests and improve deserialization from string
* Refactor LnParams and LnHrp. Add requirements for instantiating LnHrp.
* Clean up and re-organize things
Re-working LnHumanReadablePart.fromString
Fix unnecessary pattern match
Removing test case
* Created eclairRpc project (#193)
Added getinfo functionality
Added connect functionality
Added most of the rpcs
Added send and checkpayment functionality
Added updaterelayfee functionality
Fixed compile errors
Ran scalafmt
Added DaemonInstance and start/stop methods
Added TestUtil
Added open test
Fixed typo in allUpdates
Fixed ChannelResult
Add eclair prefix to rpc stuff
open channel unit test passing
Adding instructions to grab default eclair in build
Add zmq config to bitcoin.conf
rename test log files, bump timeouts on connections
Add eclair-rpc README, rework some RpcUtil/TestUtil stuff for async
fixing bug in precious block, addressing code review
Address more code review comments
* Add NodeId, NodeUri, ChannelId (#196)
refactor json serializing methods to SerializerUtil, add more types
* Adding LnCurrencyUnit types to rpc api, fixing bug where eclair tests were not binding to a random port for zmq (#198)
Remove start stuff
* Adding more rpc tests, testing open, payment over channel, and closing of the channel (#199)
Add checkpayment tests
Address code review, create EclairTestUtil.createNodPair
* Two way eclair transactions sanity test (#200)
* Added a test for sending payments in both directions
* Updated travis bitcoin core version
* Initial LnInvoice Implementation (#194)
Start typing some ln invoice stuff
Add support for Fallback Address encoding
Part 1: Breaking out Bech32 specific functions into a util class, don't embed in Bech32Address
re-naming fromBase8ToBase5 -> from8BitTo5bit
Part 1: Breaking out Bech32 specific functions into a util class, don't embed in Bech32Address
rework ln invoices tags
fix more method names in Bech32
Rename ScriptPubKeyTag -> NodeIdTag
All invoice tags tests passing except weird serialization order one
Address code review, add some more comments
rename 'LnInvoiceTags' -> 'LnInvoiceTaggedFields'
create a UInt5 type to represent all of the bech32 data structures
Passing all serialization in the BOLT11 examples
First cut at deserialization
* Adding bitcoin-s types to the eclair-rpc, fixing bug with decoding numbers, refactoring more things (#204)
* Switch bech32 p2wpkh hash from RipdeMd160 -> Sha256Hash160Digest (#206)
* Add testkit project / dependency (#209)
fix core-gen build.sbt name
* add correct dependencies to testkit (#210)
* Get dep name right (#211)
* Add serialization symmetry property for LnInvoice, fixing various bugs in LnInvoice data structures, adding generators for various LnInvoice data structures (#217)
* Reworking AuthCredentials and Instances so that we can read from config files (#218)
add core files that were missing
* Reworking a lot of testkit data structures to be more helpful for testing (#219)
Add missing EclairApi file
remove noisy log
* Rebase onto master, fix testkit compile issues
* Simplify LnCurrencyUnit, add MilliSatoshis, refactor EclairRpc to use… (#226)
* Simplify LnCurrencyUnit, add MilliSatoshis, refactor EclairRpc to use MilliSatoshis
* Add some helper functions around millisatoshis for comparing them to other things
* more tests / helper methods, at generator for millisatoshis
* Fix typo
* Fix comparison operators for millisatoshis, add Writes for MilliSatos… (#227)
* Fix comparison operators for millisatoshis, add Writes for MilliSatoshis in JsonWriters
* re-add comparison operators to LnCurrencyUnit for convinience
* Add millisatoshi reads (#228)
* Updating version of eclair to https://github.com/ACINQ/eclair/releases/download/v0.2-beta8/eclair-node-0.2-beta8-52821b8.jar (#229)
* Derive nodeId from ln invoice signature, move nodeid case class into … (#230)
* Derive nodeId from ln invoice signature, move nodeid case class into the core project
* Add missing assert
* Fix null pointer exception that could occurred during requiring the invoice's signature to valid. This could occurr if a user tried to construct an invoice with an invalid signature (#233)
* Turn down logging / remove logging (#235)
* Cleaned up eclair conf (#237)
* Cleaned up eclair conf
* Added test for bad auth and Reads for LnInvoice
* WIP: rebase onto master with new compiler opts
fix more compiler warnings with testkit
* fix new compiler warnings for scalac 2.12.x on ln (#253)
* fix new compiler warnings for scalac 2.12.x on ln
* fix missing p2wpkhoutput in rawoutput testkit/CreditingTxGen.scala
* First cut at code review for the ln branch (#258)
Fix bug in parsing the LnTagPrefix.CltvExpiry, add properties that check if the NodeIdTag is given explicitly to the invoice
remove dumb invariants
revert version
* 2018 12 4 ln code review rd2 (#259)
* Amend EclairRpc test case for confirming that channel is closed
* Add final check to test case to make sure the bitcoind wallet received funds when closing channel
* Address Torkel's code review
* Addresses some review on #256 (#260)
* Docstring cleanup, small nits
* Refactors some redudant data, nested if => switch
* Fixes SO error by reversing remowal of `new`
* Fixes a couple of bugs
* map.get instead of list.find
* StringBuilder in HRP
* Rework NetworkParam to LnParam
* Cleanup
* Renames file to match trait/object name
* Docstring cleanup, pure formatting
* Simplifies a few expressions, doesn't change semantics
* Adds overloaded findRoute method instead of Either[NodeId, LnInvoice]
* Eclair cleanup
* Address concerns from Chris
* Type annotation to match case
* Address nadav's code review
2018-12-08 17:03:24 +01:00
|
|
|
lazy val eclairRpc = project
|
|
|
|
.in(file("eclair-rpc"))
|
|
|
|
.enablePlugins()
|
|
|
|
.settings(commonSettings: _*)
|
|
|
|
.dependsOn(
|
|
|
|
core,
|
|
|
|
rpc
|
|
|
|
)
|
|
|
|
|
|
|
|
lazy val testkit = project
|
|
|
|
.in(file("testkit"))
|
|
|
|
.enablePlugins()
|
|
|
|
.settings(commonSettings: _*)
|
|
|
|
.dependsOn(
|
|
|
|
core,
|
|
|
|
rpc,
|
|
|
|
eclairRpc
|
|
|
|
)
|
|
|
|
|
2018-12-14 20:09:53 +01:00
|
|
|
|
2019-01-08 16:29:06 +01:00
|
|
|
lazy val doc = project
|
|
|
|
.in(file("doc"))
|
|
|
|
.settings(
|
|
|
|
name := "bitcoin-s-doc",
|
2019-01-10 16:07:18 +01:00
|
|
|
libraryDependencies ++= Deps.doc,
|
|
|
|
skip in publish := true
|
2019-01-08 16:29:06 +01:00
|
|
|
)
|
|
|
|
.dependsOn(
|
|
|
|
secp256k1jni,
|
|
|
|
core
|
|
|
|
)
|
|
|
|
|
2018-05-02 20:13:42 +02:00
|
|
|
publishArtifact in root := false
|