Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ Pfennig is the Cloneable Reference Implementation of [Bitmark](https://github.co
Pfennig benefits from being based on both the latest release of Bitmark, and the latest release of Bitcoin, with all BIPs unconditionally supported, all tests passing, and a clean code base.

For configuration details see the [wiki](https://github.com/project-bitmark/pfennig/wiki)


Genesis switch line 3174 of src/main.cpp
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 9)
define(_CLIENT_VERSION_REVISION, 4)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_BUILD, 3)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2015)
AC_INIT([Pfennig Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@bitmark.org],[bitmark])
AC_INIT([Pfennig Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@bitmark.org],[pfennig])
AC_CONFIG_AUX_DIR([src/build-aux])
AC_CONFIG_MACRO_DIR([src/m4])
AC_CANONICAL_HOST
Expand Down
60 changes: 60 additions & 0 deletions contrib/README.md~
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Wallet Tools
---------------------

### [BitRPC](/contrib/bitrpc) ###
Allows for sending of all standard Bitmark commands via RPC rather than as command line args.

### [SpendFrom](/contrib/spendfrom) ###

Use the raw transactions API to send coins received on a particular
address (or addresses).

Repository Tools
---------------------

### [Developer tools](/contrib/devtools) ###
Specific tools for developers working on this repository.
Contains the script `github-merge.sh` for merging github pull requests securely and signing them using GPG.

### [Linearize](/contrib/linearize) ###
Construct a linear, no-fork, best version of the blockchain.

### [PyMiner](/contrib/pyminer) ###

This is a 'getwork' CPU mining client for Bitmark. It is pure-python, and therefore very, very slow. The purpose is to provide a reference implementation of a miner, for study.

### [Qos](/contrib/qos) ###

A Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Bitmark network. This means one can have an always-on gamecreditsd instance running, and another local gamecreditsd/gamecredits-qt instance which connects to this node and receives blocks from it.

### [Seeds](/contrib/seeds) ###
Utility to generate the pnSeed[] array that is compiled into the client.

Build Tools and Keys
---------------------

### [Debian](/contrib/debian) ###
Contains files used to package gamecreditsd/gamecredits-qt
for Debian-based Linux systems. If you compile gamecreditsd/gamecredits-qt yourself, there are some useful files here.

### [Gitian-descriptors](/contrib/gitian-descriptors) ###
Gavin's notes on getting gitian builds up and running using KVM.

### [Gitian-downloader](/contrib/gitian-downloader)
Various PGP files of core developers.

### [MacDeploy](/contrib/macdeploy) ###
Scripts and notes for Mac builds.

Test and Verify Tools
---------------------

### [TestGen](/contrib/testgen) ###
Utilities to generate test vectors for the data-driven Bitmark tests.

### [Test Patches](/contrib/test-patches) ###
These patches are applied when the automated pull-tester
tests each pull and when master is tested using jenkins.

### [Verify SF Binaries](/contrib/verifysfbinaries) ###
This script attempts to download and verify the signature file SHA256SUMS.asc from SourceForge.
141 changes: 141 additions & 0 deletions contrib/bitmarkd.bash-completion~
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# bash programmable completion for gamecreditsd(1) and gamecredits-cli(1)
# Copyright (c) 2012,2014 Christian von Roques <roques@mti.ag>
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

have gamecreditsd && {

# call $gamecreditsd for RPC
_bitmark_rpc() {
# determine already specified args necessary for RPC
local rpcargs=()
for i in ${COMP_LINE}; do
case "$i" in
-conf=*|-proxy*|-rpc*)
rpcargs=( "${rpcargs[@]}" "$i" )
;;
esac
done
$gamecreditsd "${rpcargs[@]}" "$@"
}

# Add bitmark accounts to COMPREPLY
_bitmark_accounts() {
local accounts
accounts=$(_bitmark_rpc listaccounts | awk '/".*"/ { a=$1; gsub(/"/, "", a); print a}')
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) )
}

_gamecreditsd() {
local cur prev words=() cword
local gamecreditsd

# save and use original argument to invoke gamecreditsd
# gamecreditsd might not be in $PATH
gamecreditsd="$1"

COMPREPLY=()
_get_comp_words_by_ref -n = cur prev words cword

if ((cword > 4)); then
case ${words[cword-4]} in
signrawtransaction)
COMPREPLY=( $( compgen -W "ALL NONE SINGLE ALL|ANYONECANPAY NONE|ANYONECANPAY SINGLE|ANYONECANPAY" -- "$cur" ) )
return 0
;;
esac
fi

if ((cword > 3)); then
case ${words[cword-3]} in
addmultisigaddress)
_bitmark_accounts
return 0
;;
gettxout|importprivkey)
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
return 0
;;
esac
fi

if ((cword > 2)); then
case ${words[cword-2]} in
addnode)
COMPREPLY=( $( compgen -W "add remove onetry" -- "$cur" ) )
return 0
;;
getblock|getrawtransaction|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction)
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
return 0
;;
move|setaccount)
_bitmark_accounts
return 0
;;
esac
fi

case "$prev" in
backupwallet|dumpwallet|importwallet)
_filedir
return 0
;;
getmempool|lockunspent|setgenerate)
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
return 0
;;
getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany)
_bitmark_accounts
return 0
;;
esac

case "$cur" in
-conf=*|-pid=*|-loadblock=*|-wallet=*|-rpcsslcertificatechainfile=*|-rpcsslprivatekeyfile=*)
cur="${cur#*=}"
_filedir
return 0
;;
-datadir=*)
cur="${cur#*=}"
_filedir -d
return 0
;;
-*=*) # prevent nonsense completions
return 0
;;
*)
local helpopts commands

# only parse --help if senseful
if [[ -z "$cur" || "$cur" =~ ^- ]]; then
helpopts=$($gamecreditsd --help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
fi

# only parse help if senseful
if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then
commands=$(_bitmark_rpc help 2>/dev/null | awk '{ print $1; }')
fi

COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) )

# Prevent space if an argument is desired
if [[ $COMPREPLY == *= ]]; then
compopt -o nospace
fi
return 0
;;
esac
}

complete -F _gamecreditsd gamecreditsd gamecredits-cli
}

# Local variables:
# mode: shell-script
# sh-basic-offset: 4
# sh-indent-comment: t
# indent-tabs-mode: nil
# End:
# ex: ts=4 sw=4 et filetype=sh
4 changes: 2 additions & 2 deletions contrib/bitrpc/bitrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@


if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:RPCPORT")
access = ServiceProxy("http://127.0.0.1:40001")
else:
access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:RPCPORT")
access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:40001")
cmd = sys.argv[1].lower()

if cmd == "backupwallet":
Expand Down
4 changes: 2 additions & 2 deletions contrib/gitian-descriptors/deps-linux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "bitmark"
name: "pfennig"
suites:
- "precise"
architectures:
Expand Down Expand Up @@ -95,4 +95,4 @@ script: |
done
#
cd $STAGING
find include lib bin host | sort | zip -X@ $OUTDIR/bitmark-deps-linux${GBUILD_BITS}-gitian-r9.zip
find include lib bin host | sort | zip -X@ $OUTDIR/pfennig-deps-linux${GBUILD_BITS}-gitian-r9.zip
98 changes: 98 additions & 0 deletions contrib/gitian-descriptors/deps-linux.yml~
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
name: "gamecredits"
suites:
- "precise"
architectures:
- "i386"
- "amd64"
packages:
- "g++"
- "unzip"
- "zip"
- "pkg-config"
- "libtool"
- "faketime"
- "bsdmainutils"
reference_datetime: "2013-06-01 00:00:00"
remotes: []
files:
- "openssl-1.0.1k.tar.gz"
- "miniupnpc-1.9.20140701.tar.gz"
- "qrencode-3.4.3.tar.bz2"
- "protobuf-2.5.0.tar.bz2"
- "db-4.8.30.NC.tar.gz"
script: |
STAGING="$HOME/install"
TEMPDIR="$HOME/tmp"
OPTFLAGS='-O2'
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
export FAKETIME=$REFERENCE_DATETIME
export TZ=UTC
export LIBRARY_PATH="$STAGING/lib"
# Integrity Check
echo "8f9faeaebad088e772f4ef5e38252d472be4d878c6b3a2718c10a4fcebe7a41c openssl-1.0.1k.tar.gz" | sha256sum -c
echo "26f3985bad7768b8483b793448ae49414cdc4451d0ec83e7c1944367e15f9f07 miniupnpc-1.9.20140701.tar.gz" | sha256sum -c
echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98 qrencode-3.4.3.tar.bz2" | sha256sum -c
echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 protobuf-2.5.0.tar.bz2" | sha256sum -c
echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz" | sha256sum -c

#
tar xzf openssl-1.0.1k.tar.gz
cd openssl-1.0.1k
# need -fPIC to avoid relocation error in 64 bit builds
./config no-shared no-zlib no-dso no-krb5 --openssldir=$STAGING -fPIC
# need to build OpenSSL with faketime because a timestamp is embedded into cversion.o
make
make install_sw
cd ..
#
tar xzfm miniupnpc-1.9.20140701.tar.gz
cd miniupnpc-1.9.20140701
# miniupnpc is always built with -fPIC
INSTALLPREFIX=$STAGING make $MAKEOPTS install
rm -f $STAGING/lib/libminiupnpc.so* # no way to skip shared lib build
cd ..
#
tar xjf qrencode-3.4.3.tar.bz2
cd qrencode-3.4.3
unset FAKETIME # unset fake time during configure, as it does some clock sanity tests
# need --with-pic to avoid relocation error in 64 bit builds
./configure --prefix=$STAGING --enable-static --disable-shared --with-pic --without-tools --disable-dependency-tracking
# Workaround to prevent re-configuring by make; make all files have a date in the past
find . -print0 | xargs -r0 touch -t 200001010000
export FAKETIME=$REFERENCE_DATETIME
make $MAKEOPTS install
cd ..
#
tar xjf protobuf-2.5.0.tar.bz2
cd protobuf-2.5.0
mkdir -p $STAGING/host/bin
unset FAKETIME # unset fake time during configure, as it does some clock sanity tests
# need --with-pic to avoid relocation error in 64 bit builds
./configure --prefix=$STAGING --bindir=$STAGING/host/bin --enable-static --disable-shared --with-pic --without-zlib
# Workaround to prevent re-configuring by make; make all files have a date in the past
find . -print0 | xargs -r0 touch -t 200001010000
export FAKETIME=$REFERENCE_DATETIME
make $MAKEOPTS install
cd ..
#
tar xzf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix
# need --with-pic to avoid relocation error in 64 bit builds
../dist/configure --prefix=$STAGING --enable-cxx --disable-shared --with-pic
# Workaround to prevent re-configuring by make; make all files have a date in the past
find . -print0 | xargs -r0 touch -t 200001010000
make $MAKEOPTS library_build
make install_lib install_include
cd ../..
# post-process all generated libraries to be deterministic
# extract them to a temporary directory then re-build them deterministically
for LIB in $(find $STAGING -name \*.a); do
rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
ar xv $LIB | cut -b5- > /tmp/list.txt
rm $LIB
ar crsD $LIB $(cat /tmp/list.txt)
done
#
cd $STAGING
find include lib bin host | sort | zip -X@ $OUTDIR/gamecredits-deps-linux${GBUILD_BITS}-gitian-r9.zip
4 changes: 2 additions & 2 deletions contrib/gitian-descriptors/deps-win.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "bitmark-deps"
name: "pfennig-deps"
suites:
- "precise"
architectures:
Expand Down Expand Up @@ -124,5 +124,5 @@ script: |
done
#
cd $INSTALLPREFIX
find include lib | sort | zip -X@ $OUTDIR/bitmark-deps-win$BITS-gitian-r16.zip
find include lib | sort | zip -X@ $OUTDIR/pfennig-deps-win$BITS-gitian-r16.zip
done # for BITS in
Loading