Skip to content

Commit 706b9f6

Browse files
authored
Merge pull request #95 from Divicoin/documentation
Documentation
2 parents 5a0f666 + 9ba6497 commit 706b9f6

59 files changed

Lines changed: 983 additions & 205 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
.vs
33
.vscode/
44
*.creator.user
5+
doxygen/*
6+
developer_stuff
7+
documents/*
58
doxygen/
6-
developer_stuff/

README.md

Lines changed: 52 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,62 @@
33
DIVI Core integration/staging repository
44
=====================================
55

6-
We wish to make it as easy to participate in Divi development as possible. Open source software typically has very high but hidden barriers to entry to each project due to the massive and normally undocumented state space of potential operating systems, pre-loaded packages and other development environment details. Further, regression testing turns into a nightmare if developers have used even slightly different versions of the same operating system or one of the normally numerous packages – much less different packages or a different operating system. Life has gotten better with the Gitian builds used to ensure identical certified release packages to combat malware but setting up a Gitian build is still a dark art.
6+
https://diviproject.org
77

8-
The advent of lightweight, cross-platform containers make it, not just possible but, easy to develop and run the exact same software across all non-mobile platforms – including both major and minor cloud providers. DIVI is built and run inside a Docker container so *anyone* can install the free community version of Docker on their Windows, Mac or Linux machine and immediately build and run the DIVI software. Development for the iPhone and Android wallets is unfortunately far more difficult due to an ongoing lack of a unified standard – but that is something that we will look at in the future with the increasing availability and sophistication of environments like Ionic or Xamarin.
8+
## What is Divi?
9+
---
910

10-
To build divi:
11-
1. Ensure docker is installed on your machine (https://store.docker.com/search?type=edition&offering=community)
12-
2. Create a directory and copy the divi/docker directory into it
13-
3. docker build -t [your tag name] .
11+
Divi is a next-generation blockchain protocol that enables any user to begin earning, sending, and spending cryptocurrency easily, without the need for advanced technical knowledge. Divi uses a state-of-the-art Proof of Stake consensus mechanism that offers opportunities for users to stake their coins or allocate their coins to Masternodes, which secure the network and verify transactions.
1412

15-
If you don't want to build divi
16-
1. Ensure docker is installed on your machine (https://store.docker.com/search?type=edition&offering=community)
17-
2. docker pull caldwellsw/divi:base
13+
For more information, as well as an immediately usable version of the Divi Project software, visit our website's [download page](https://diviproject.org/downloads), or read our [whitepaper](https://wiki.diviproject.org/#whitepaper).
1814

19-
To run divi and connect to the testnet
20-
1. docker run -it -p51472:51472 [your tag name or caldwellsw/divi:base]
21-
2. divid -debug
22-
3. divi-cli addnode dt01.westus.cloudapp.azure.com add
23-
4. divi-cli addnode dt02.westus.cloudapp.azure.com add
24-
5. divi-cli getpeerinfo
15+
## License
16+
---
2517

26-
* It may take some time before you see other nodes in the testnet.
18+
Divi Core is released under the terms of the MIT license. See https://opensource.org/licenses/MIT for more information.
2719

20+
## Developing
21+
---
22+
23+
The `master0` branch is regularly built and tested by Divi's core development team, and is typically the most stable version of the software, but this cannot be guaranteed at any given time.
24+
25+
## Building
26+
---
27+
28+
To build from source on UNIX systems, follow these instructions.
29+
30+
### System requirements
31+
32+
C++ compilers are memory-hungry. It is recommended to have at least 1 GB of
33+
memory available when compiling DIVI Core. With 512MB of memory or less
34+
compilation will take much longer due to swap thrashing.
35+
36+
### Dependencies
37+
38+
These dependencies are required:
39+
40+
Library | Purpose | Description
41+
------------|------------------|----------------------
42+
libssl | SSL Support | Secure communications
43+
libboost | Boost | C++ Library
44+
45+
Optional dependencies:
46+
47+
Library | Purpose | Description
48+
------------|------------------|----------------------
49+
miniupnpc | UPnP Support | Firewall-jumping support
50+
libdb4.8 | Berkeley DB | Wallet storage (only needed when wallet enabled)
51+
qt | GUI | GUI toolkit (only needed when GUI enabled)
52+
protobuf | Payments in GUI | Data interchange format used for payment protocol (only needed when GUI enabled)
53+
libqrencode | QR codes in GUI | Optional for generating QR codes (only needed when GUI enabled)
54+
55+
For the versions used in the release, see [release-process.md](./divi/doc/release-process.md) under *Fetch and build inputs*.
56+
57+
For additional information about dependencies see [build-unix.md](./divi/doc/build-unix.md)
58+
```
59+
./autogen.sh
60+
./configure --disable-tests --without-gui
61+
make
62+
make install # optional
63+
```
2864

divi/contrib/gitian-descriptors/gitian-linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ packages:
2525
- "python"
2626
reference_datetime: "2018-03-20 00:00:00"
2727
remotes:
28-
- "url": "https://github.com/divicoin/divi.git"
28+
- "url": "https://github.com/Divicoin/Divi.git"
2929
"dir": "divi"
3030
files: []
3131
script: |
3232
3333
WRAP_DIR=$HOME/wrapped
3434
HOSTS="x86_64-linux-gnu"
35-
CONFIGFLAGS="--without-gui --disable-zerocoin --enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests"
35+
CONFIGFLAGS="--without-gui --disable-tests --disable-zerocoin --enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests"
3636
FAKETIME_HOST_PROGS=""
3737
FAKETIME_PROGS="date ar ranlib nm"
3838
HOST_CFLAGS="-O2 -g"

divi/contrib/gitian-descriptors/gitian-osx.yml

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ packages:
2828
- "python-setuptools"
2929
- "fonts-tuffy"
3030
remotes:
31-
- "url": "https://github.com/divicoin/divi.git"
31+
- "url": "https://github.com/Divicoin/Divi.git"
3232
"dir": "divi"
3333
files:
34-
- "MacOSX10.11.sdk.tar.gz"
34+
- "MacOSX10.9.sdk.tar.xz"
3535
script: |
3636
WRAP_DIR=$HOME/wrapped
3737
HOSTS="x86_64-apple-darwin11"
38-
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage"
38+
CONFIGFLAGS="--disable-tests --without-gui --enable-reduce-exports --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage"
3939
FAKETIME_HOST_PROGS=""
4040
FAKETIME_PROGS="ar ranlib date dmg genisoimage"
4141
@@ -83,11 +83,11 @@ script: |
8383
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
8484
export PATH=${WRAP_DIR}:${PATH}
8585
86-
cd divi
86+
cd divi/divi
8787
BASEPREFIX=`pwd`/depends
8888
8989
mkdir -p ${BASEPREFIX}/SDKs
90-
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.11.sdk.tar.gz
90+
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.9.sdk.tar.xz
9191
9292
# Build dependencies for each host
9393
for i in $HOSTS; do
@@ -124,27 +124,10 @@ script: |
124124
mkdir -p ${INSTALLPATH}
125125
tar --strip-components=1 -xf ../$SOURCEDIST
126126
127-
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
127+
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CXXFLAGS="-g" CFLAGS="-g"
128128
make ${MAKEOPTS}
129-
make install-strip DESTDIR=${INSTALLPATH}
130-
131-
make osx_volname
132-
make deploydir
133-
OSX_VOLNAME="$(cat osx_volname)"
134-
mkdir -p unsigned-app-${i}
135-
cp osx_volname unsigned-app-${i}/
136-
cp contrib/macdeploy/detached-sig-apply.sh unsigned-app-${i}
137-
cp contrib/macdeploy/detached-sig-create.sh unsigned-app-${i}
138-
cp ${BASEPREFIX}/${i}/native/bin/dmg ${BASEPREFIX}/${i}/native/bin/genisoimage unsigned-app-${i}
139-
cp ${BASEPREFIX}/${i}/native/bin/${i}-codesign_allocate unsigned-app-${i}/codesign_allocate
140-
cp ${BASEPREFIX}/${i}/native/bin/${i}-pagestuff unsigned-app-${i}/pagestuff
141-
mv dist unsigned-app-${i}
142-
pushd unsigned-app-${i}
143-
find . | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-osx-unsigned.tar.gz
144-
popd
145-
146-
make deploy
147-
${WRAP_DIR}/dmg dmg "${OSX_VOLNAME}.dmg" ${OUTDIR}/${DISTNAME}-osx-unsigned.dmg
129+
#make install-strip DESTDIR=${INSTALLPATH}
130+
make install DESTDIR=${INSTALLPATH}
148131
149132
cd installed
150133
find . -name "lib*.la" -delete
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
name: "divi-raspberry-0.1"
3+
enable_cache: true
4+
suites:
5+
- "precise"
6+
architectures:
7+
- "amd64"
8+
packages:
9+
- "g++-multilib"
10+
- "git-core"
11+
- "pkg-config"
12+
- "autoconf2.13"
13+
- "libtool"
14+
- "automake"
15+
- "faketime"
16+
- "bsdmainutils"
17+
- "binutils-gold"
18+
reference_datetime: "2017-01-01 00:00:00"
19+
remotes:
20+
- "url": "https://github.com/Divicoin/Divi.git"
21+
"dir": "divi"
22+
files:
23+
- "raspberrypi-tools.tar.gz"
24+
script: |
25+
WRAP_DIR=$HOME/wrapped
26+
export BUILD_DIR=`pwd`
27+
HOSTS="arm-linux-gnueabihf"
28+
CONFIGFLAGS="--enable-upnp-default --without-gui --disable-tests --disable-zerocoin --enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests"
29+
FAKETIME_HOST_PROGS=""
30+
FAKETIME_PROGS="date ar ranlib nm strip"
31+
32+
mkdir -p ${BUILD_DIR}/toolchain
33+
tar -C ${BUILD_DIR}/toolchain -xf ${BUILD_DIR}/raspberrypi-tools.tar.gz
34+
export TOOLCHAIN_BIN=${BUILD_DIR}/toolchain/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin
35+
export PATH=$PATH:$TOOLCHAIN_BIN
36+
37+
export QT_RCC_TEST=1
38+
export GZIP="-9n"
39+
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
40+
export TZ="UTC"
41+
export BUILD_DIR=`pwd`
42+
mkdir -p ${WRAP_DIR}
43+
if test -n "$GBUILD_CACHE_ENABLED"; then
44+
export SOURCES_PATH=${GBUILD_COMMON_CACHE}
45+
export BASE_CACHE=${GBUILD_PACKAGE_CACHE}
46+
mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
47+
fi
48+
49+
# Create global faketime wrappers
50+
for prog in ${FAKETIME_PROGS}; do
51+
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
52+
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
53+
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
54+
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
55+
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
56+
chmod +x ${WRAP_DIR}/${prog}
57+
done
58+
59+
# Create per-host faketime wrappers
60+
for i in $HOSTS; do
61+
for prog in ${FAKETIME_HOST_PROGS}; do
62+
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
63+
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
64+
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
65+
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
66+
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
67+
chmod +x ${WRAP_DIR}/${i}-${prog}
68+
done
69+
done
70+
export PATH=${WRAP_DIR}:${PATH}
71+
72+
cd divi/divi
73+
BASEPREFIX=`pwd`/depends
74+
# Build dependencies for each host
75+
for i in $HOSTS; do
76+
make ${MAKEOPTS} NO_QT=1 -C ${BASEPREFIX} HOST="${i}"
77+
done
78+
79+
# Create the release tarball using (arbitrarily) the first host
80+
./autogen.sh
81+
./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
82+
make NO_QT=1 dist
83+
SOURCEDIST=`echo divi-*.tar.gz`
84+
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
85+
# Correct tar file order
86+
mkdir -p temp
87+
pushd temp
88+
tar xf ../$SOURCEDIST
89+
find divi-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
90+
popd
91+
92+
ORIGPATH="$PATH"
93+
# Extract the release tarball into a dir for each host and build
94+
for i in ${HOSTS}; do
95+
export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
96+
mkdir -p distsrc-${i}
97+
cd distsrc-${i}
98+
INSTALLPATH=`pwd`/installed/${DISTNAME}
99+
mkdir -p ${INSTALLPATH}
100+
tar --strip-components=1 -xf ../$SOURCEDIST
101+
102+
./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
103+
make ${MAKEOPTS} NO_QT=1
104+
make NO_QT=1 install-strip
105+
cd installed
106+
find . -name "lib*.la" -delete
107+
find . -name "lib*.a" -delete
108+
rm -rf ${DISTNAME}/lib/pkgconfig
109+
find ${DISTNAME} | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
110+
cd ../../
111+
done
112+
mkdir -p $OUTDIR/src
113+
mv $SOURCEDIST $OUTDIR/src
114+
mv ${OUTDIR}/${DISTNAME}-arm-*.tar.gz ${OUTDIR}/${DISTNAME}-RPi2.tar.gz

divi/contrib/gitian-descriptors/gitian-win.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ packages:
2222
- "ca-certificates"
2323
- "python"
2424
remotes:
25-
- "url": "https://github.com/divicoin/divi.git"
25+
- "url": "https://github.com/Divicoin/Divi.git"
2626
"dir": "divi"
2727
files: []
2828
script: |
2929
WRAP_DIR=$HOME/wrapped
3030
HOSTS="i686-w64-mingw32 x86_64-w64-mingw32"
31-
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests"
31+
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests --disable-tests --without-gui"
3232
FAKETIME_HOST_PROGS="g++ ar ranlib nm windres strip objcopy"
3333
FAKETIME_PROGS="date makensis zip"
3434
HOST_CFLAGS="-O2 -g"

divi/contrib/init/divid.service

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ Description=DIVI's distributed currency daemon
33
After=network.target
44
55
[Service]
6-
User=divi
7-
Group=divi
8-
96
Type=forking
107
PIDFile=/var/lib/divid/divid.pid
118

divi/doc/build-unix.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ To Build
1717

1818
```bash
1919
./autogen.sh
20-
./configure
20+
./configure --disable-tests --without-gui
2121
make
2222
make install # optional
2323
```
2424

25-
This will build divi-qt as well if the dependencies are met.
25+
If you are using Ubuntu 18 or newer, run `./configure --disable-tests --without-gui --with-unsupported-ssl` to build with system OpenSSL which is required for Ubuntu > 16.10
26+
27+
This will build divid, building divi-qt is deprecated and shouldn't be used.
2628

2729
Dependencies
2830
---------------------
@@ -80,7 +82,7 @@ Optional:
8082

8183
sudo apt-get install libminiupnpc-dev (see --with-miniupnpc and --enable-upnp-default)
8284

83-
Dependencies for the GUI: Ubuntu & Debian
85+
Dependencies for the GUI: Ubuntu & Debian (Deprecated)
8486
-----------------------------------------
8587

8688
If you want to build DIVI-Qt, make sure that the required packages for Qt development

0 commit comments

Comments
 (0)