Skip to content

Commit

Permalink
Merge pull request #107 from ElementsProject/refresh
Browse files Browse the repository at this point in the history
Add Changes From Liquid, Bitcoin
  • Loading branch information
jtimon committed Feb 2, 2017
2 parents 20a84b8 + 8736efe commit edaaa8b
Show file tree
Hide file tree
Showing 300 changed files with 10,039 additions and 7,597 deletions.
18 changes: 9 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
*.tar.gz

*.exe
src/bitcoin
src/bitcoind
src/bitcoin-cli
src/bitcoin-tx
src/test/test_bitcoin
src/qt/test/test_bitcoin-qt
src/elements
src/elementsd
src/elements-cli
src/elements-tx
src/test/test_elements
src/qt/test/test_elements-qt

# autoreconf
Makefile.in
Expand Down Expand Up @@ -74,12 +74,12 @@ src/qt/test/moc*.cpp
# Compilation and Qt preprocessor part
*.qm
Makefile
bitcoin-qt
Bitcoin-Qt.app
elements-qt
Elements-Qt.app

# Unit-tests
Makefile.test
bitcoin-qt_test
elements-qt_test
src/test/buildenv.py

# Resources cpp
Expand Down
19 changes: 8 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
Contributing to Bitcoin Core
Contributing to Elements Core
============================

The Bitcoin Core project operates an open contributor model where anyone is welcome to contribute towards development in the form of peer review, testing and patches. This document explains the practical process and guidelines for contributing.

Firstly in terms of structure, there is no particular concept of “Core developers” in the sense of privileged people. Open source often naturally revolves around meritocracy where longer term contributors gain more trust from the developer community. However, some hierarchy is necessary for practical purposes. As such there are repository “maintainers” who are responsible for merging pull requests as well as a “lead maintainer” who is responsible for the release cycle, overall merging, moderation and appointment of maintainers.
The Elements Core project operates an open contributor model where anyone is welcome to contribute towards development in the form of peer review, testing and patches. This document explains the practical process and guidelines for contributing.

In Contrast to Bitcoin Core, this repository is property of Blockstream Inc. which means that acceptance of contributions comes down to one of the privelaged "maintainers" of the repository. These maintainers are responsible for merging pull requests as well as a “lead maintainer” who is responsible for the release cycle, overall merging, moderation and appointment of maintainers. The intention is however to follow a very similar meritocratic model to Bitcoin Core's, meaning that all contributions are welcome, and a history of high-quality contributions will likely pull more weight than otherwise.

Contributor Workflow
--------------------
Expand Down Expand Up @@ -81,9 +80,9 @@ Project maintainers aim for a quick turnaround on refactoring pull requests, so
"Decision Making" Process
-------------------------

The following applies to code changes to the Bitcoin Core project (and related projects such as libsecp256k1), and is not to be confused with overall Bitcoin Network Protocol consensus changes.
The following applies to code changes to the Elements Core project (and related projects such as libsecp256k1).

Whether a pull request is merged into Bitcoin Core rests with the project merge maintainers and ultimately the project lead.
Whether a pull request is merged into Elements Core rests with the project merge maintainers and ultimately the project lead.

Maintainers will take into consideration if a patch is in line with the general principles of the project; meets the minimum standards for inclusion; and will judge the general consensus of contributors.

Expand All @@ -96,8 +95,7 @@ In general, all pull requests must:
- not break the existing test suite;
- where bugs are fixed, where possible, there should be unit tests demonstrating the bug and also proving the fix. This helps prevent regression.

Patches that change Bitcoin consensus rules are considerably more involved than normal because they affect the entire ecosystem and so must be preceded by extensive mailing list discussions and have a numbered BIP. While each case will be different, one should be prepared to expend more time and effort than for other kinds of patches because of increased peer review and consensus building requirements.

Changes to the consensus ruleset will likely be denied unless it is a direct security issue. In this case the issue should be sent to one of the project maintainers in private using secure communication if possible. Blockstream reserves the right to include additional feature softforks to a currently-running network, and hardforking changes for new networks.

###Peer Review

Expand All @@ -115,10 +113,9 @@ Project maintainers reserve the right to weigh the opinions of peer reviewers us

Where a patch set affects consensus critical code, the bar will be set much higher in terms of discussion and peer review requirements, keeping in mind that mistakes could be very costly to the wider community. This includes refactoring of consensus critical code.

Where a patch set proposes to change the Bitcoin consensus, it must have been discussed extensively on the mailing list and IRC, be accompanied by a widely discussed BIP and have a generally widely perceived technical consensus of being a worthwhile change based on the judgement of the maintainers.

Where a patch set proposes to change the Elements consensus, it must have been discussed extensively on the github thread, and receive a larger number of ACKs, including multiple tested ACKs from maintainers.

Release Policy
--------------

The project leader is the release manager for each Bitcoin Core release.
The project leader is the release manager for each Elements Core release.
8 changes: 4 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ $(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
$(MKDIR_P) $(@D)
$(INSTALL_DATA) $< $@

$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
$(OSX_APP)/Contents/MacOS/Elements-Qt: $(BITCOIN_QT_BIN)
$(MKDIR_P) $(@D)
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@

Expand All @@ -93,7 +93,7 @@ $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings:

OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
$(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
$(OSX_APP)/Contents/MacOS/Bitcoin-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings
$(OSX_APP)/Contents/MacOS/Elements-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings

osx_volname:
echo $(OSX_VOLNAME) >$@
Expand All @@ -111,7 +111,7 @@ $(APP_DIST_DIR)/Applications:
@rm -f $@
@cd $(@D); $(LN_S) /Applications $(@F)

$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Elements-Qt

$(OSX_DMG): $(APP_DIST_EXTRAS)
$(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "$(OSX_VOLNAME)" -no-pad -r -dir-mode 0755 -apple -o $@ dist
Expand All @@ -126,7 +126,7 @@ $(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): $(OSX_BACKGROUND_IMAGE_DPIF
$(APP_DIST_DIR)/.DS_Store: $(OSX_DSSTORE_GEN)
$(PYTHON) $< "$@" "$(OSX_VOLNAME)"

$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Elements-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -translations-dir=$(QT_TRANSLATION_DIR) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2

deploydir: $(APP_DIST_EXTRAS)
Expand Down
104 changes: 40 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,81 +1,57 @@
Bitcoin Core integration/staging tree
=====================================
The Elements Project
=================================
This is the integration and staging tree for the Elements Project, a series of
improvements and extensions to the Bitcoin protocol.

[![Build Status](https://travis-ci.org/bitcoin/bitcoin.svg?branch=master)](https://travis-ci.org/bitcoin/bitcoin)
What is the Elements Project?
-----------------
Elements is an open source collaborative project where we work on a collection
of experiments to more rapidly bring technical innovation to Bitcoin. Elements
are features that are proposed and developed in this technical community that in
arbitrary combinations can be fashioned into sidechains.

https://bitcoincore.org
https://github.com/ElementsProject/elementsproject.github.io

Learn more on [the Elements Project website](https://www.elementsproject.org).

What is Bitcoin?
----------------
https://www.bitcoin.org

Bitcoin is an experimental digital currency that enables instant payments to
Bitcoin is an experimental new digital currency that enables instant payments to
anyone, anywhere in the world. Bitcoin uses peer-to-peer technology to operate
with no central authority: managing transactions and issuing money are carried
out collectively by the network. Bitcoin Core is the name of open source
out collectively by the network. Elements Alpha is the name of open source
software which enables the use of this currency.

For more information, as well as an immediately useable, binary version of
the Bitcoin Core software, see https://bitcoin.org/en/download, or read the
[original whitepaper](https://bitcoincore.org/bitcoin.pdf).

License
-------

Bitcoin Core is released under the terms of the MIT license. See [COPYING](COPYING) for more
information or see https://opensource.org/licenses/MIT.
the Bitcoin Core software, see https://www.bitcoin.org/en/download.

Development Process
-------------------

The `master` branch is regularly built and tested, but is not guaranteed to be
completely stable. [Tags](https://github.com/bitcoin/bitcoin/tags) are created
regularly to indicate new official, stable release versions of Bitcoin Core.
What is Elements?
----------------

The contribution workflow is described in [CONTRIBUTING.md](CONTRIBUTING.md).
Compared to Bitcoin itself, it adds the following features:
* [Confidential Transactions][confidential-transactions]
* [Additional opcodes][opcodes]
* [Deterministic Peg][deterministic-peg]
* [Signed Blocks][signed-blocks]

The developer [mailing list](https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev)
should be used to discuss complicated or controversial changes before working
on a patch set.
Previous elements that have been integrated into Core:
* [Segregated Witness][segregated-witness]
* [Relative Lock Time][relative-lock-time]

Developer IRC can be found on Freenode at #bitcoin-core-dev.
Elements deferred for additional research and standardization:
* [Schnorr Signatures][schnorr-signatures]

Testing
License
-------

Testing and code review is the bottleneck for development; we get more pull
requests than we can review and test on short notice. Please be patient and help out by testing
other people's pull requests, and remember this is a security-critical project where any mistake might cost people
lots of money.

### Automated Testing

Developers are strongly encouraged to write [unit tests](/doc/unit-tests.md) for new code, and to
submit new unit tests for old code. Unit tests can be compiled and run
(assuming they weren't disabled in configure) with: `make check`

There are also [regression and integration tests](/qa) of the RPC interface, written
in Python, that are run automatically on the build server.
These tests can be run (if the [test dependencies](/qa) are installed) with: `qa/pull-tester/rpc-tests.py`

The Travis CI system makes sure that every pull request is built for Windows, Linux, and OS X, and that unit/sanity tests are run automatically.

### Manual Quality Assurance (QA) Testing

Changes should be tested by somebody other than the developer who wrote the
code. This is especially important for large or high-risk changes. It is useful
to add a test plan to the pull request description if testing the changes is
not straightforward.

Translations
------------

Changes to translations as well as new translations can be submitted to
[Bitcoin Core's Transifex page](https://www.transifex.com/projects/p/bitcoin/).

Translations are periodically pulled from Transifex and merged into the git repository. See the
[translation process](doc/translation_process.md) for details on how this works.

**Important**: We do not accept translation changes as GitHub pull requests because the next
pull from Transifex would automatically overwrite them again.

Translators should also subscribe to the [mailing list](https://groups.google.com/forum/#!forum/bitcoin-translators).
Elements is released under the terms of the MIT license. See [COPYING](COPYING) for more
information or see http://opensource.org/licenses/MIT.

[confidential-transactions]: https://www.elementsproject.org/elements/confidential-transactions
[segregated-witness]: https://www.elementsproject.org/elements/segregated-witness
[relative-lock-time]: https://www.elementsproject.org/elements/relative-lock-time
[schnorr-signatures]: https://www.elementsproject.org/elements/schnorr-signatures
[opcodes]: https://www.elementsproject.org/elements/opcodes
[deterministic-peg]: https://www.elementsproject.org/elements/deterministic-pegs
[signed-blocks]: https://www.elementsproject.org/elements/signed-blocks
11 changes: 5 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2016)
define(_COPYRIGHT_HOLDERS,[The %s developers])
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitcoin Core]])
AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/bitcoin/bitcoin/issues],[bitcoin],[https://bitcoincore.org/])
AC_INIT([Elements Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION._CLIENT_VERSION_BUILD],[https://github.com/ElementsProject/elements/issues],[elements])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
AC_CONFIG_AUX_DIR([build-aux])
Expand Down Expand Up @@ -227,9 +225,9 @@ AC_ARG_WITH([utils],

AC_ARG_WITH([libs],
[AS_HELP_STRING([--with-libs],
[build libraries (default=yes)])],
[build libraries (default=no)])],
[build_bitcoin_libs=$withval],
[build_bitcoin_libs=yes])
[build_bitcoin_libs=no])

AC_ARG_WITH([daemon],
[AS_HELP_STRING([--with-daemon],
Expand Down Expand Up @@ -1109,11 +1107,12 @@ PKGCONFIG_LIBDIR_TEMP="$PKG_CONFIG_LIBDIR"
unset PKG_CONFIG_LIBDIR
PKG_CONFIG_LIBDIR="$PKGCONFIG_LIBDIR_TEMP"


if test x$need_bundled_univalue = xyes; then
AC_CONFIG_SUBDIRS([src/univalue])
fi

ac_configure_args="${ac_configure_args} --disable-shared --with-pic --with-bignum=no --enable-module-recovery"
ac_configure_args="${ac_configure_args} --disable-shared --with-pic --with-bignum=no --enable-experimental --enable-module-recovery --enable-module-schnorr --enable-module-ecdh --enable-module-rangeproof"
AC_CONFIG_SUBDIRS([src/secp256k1])

AC_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion contrib/debian/watch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Run the "uscan" command to check for upstream updates and more.
version=3
# use qa.debian.org redirector; see man uscan
opts=uversionmangle=s/(\d)(alpha|beta|rc)/$1~$2/,dversionmangle=s/~dfsg\d*// \
opts=uversionmangle=s/(\d)(alpha|beta|core|rc)/$1~$2/,dversionmangle=s/~dfsg\d*// \
http://githubredir.debian.net/github/bitcoin/bitcoin v(.*).tar.gz
10 changes: 5 additions & 5 deletions contrib/gitian-descriptors/gitian-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ packages:
- "ca-certificates"
- "python"
remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin"
- "url": "https://github.com/ElementsProject/elements.git"
"dir": "elements"
files: []
script: |
Expand Down Expand Up @@ -83,6 +83,7 @@ script: |
create_global_faketime_wrappers "2000-01-01 12:00:00"
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
export PATH=${WRAP_DIR}:${PATH}
cd elements
EXTRA_INCLUDES_BASE=$WRAP_DIR/extra_includes
mkdir -p $EXTRA_INCLUDES_BASE
Expand Down Expand Up @@ -113,7 +114,6 @@ script: |
chmod +x ${WRAP_DIR}/${prog}
done
cd bitcoin
BASEPREFIX=`pwd`/depends
# Build dependencies for each host
for i in $HOSTS; do
Expand All @@ -135,13 +135,13 @@ script: |
./autogen.sh
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/
make dist
SOURCEDIST=`echo bitcoin-*.tar.gz`
SOURCEDIST=`echo elements-*.tar.gz`
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
# Correct tar file order
mkdir -p temp
pushd temp
tar xf ../$SOURCEDIST
find bitcoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
find elements-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
popd
ORIGPATH="$PATH"
Expand Down
13 changes: 7 additions & 6 deletions contrib/gitian-descriptors/gitian-osx-signer.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
---
name: "bitcoin-dmg-signer"
name: "elements-dmg-signer"
suites:
- "trusty"
architectures:
- "amd64"
packages:
- "faketime"
reference_datetime: "2016-01-01 00:00:00"
remotes:
- "url": "https://github.com/bitcoin-core/bitcoin-detached-sigs.git"
- "url": "https://github.com/ElementsProject/gitian.sigs.ep.git"
"dir": "signature"
files:
- "bitcoin-osx-unsigned.tar.gz"
- "elements-osx-unsigned.tar.gz"
script: |
WRAP_DIR=$HOME/wrapped
mkdir -p ${WRAP_DIR}
Expand All @@ -27,11 +28,11 @@ script: |
chmod +x ${WRAP_DIR}/${prog}
done
UNSIGNED=bitcoin-osx-unsigned.tar.gz
SIGNED=bitcoin-osx-signed.dmg
UNSIGNED=elements-osx-unsigned.tar.gz
SIGNED=elements-osx-signed.dmg
tar -xf ${UNSIGNED}
OSX_VOLNAME="$(cat osx_volname)"
./detached-sig-apply.sh ${UNSIGNED} signature/osx
${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "${OSX_VOLNAME}" -no-pad -r -dir-mode 0755 -apple -o uncompressed.dmg signed-app
${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "Elements-Sidechain" -no-pad -r -apple -o uncompressed.dmg signed-app
${WRAP_DIR}/dmg dmg uncompressed.dmg ${OUTDIR}/${SIGNED}
Loading

0 comments on commit edaaa8b

Please sign in to comment.