Skip to content

Commit

Permalink
Merge pull request namecoin-qt#14 from namecoinq/master
Browse files Browse the repository at this point in the history
Merge pull request namecoin-qt#14 from namecoinq/master
  • Loading branch information
namecoin-qt committed Dec 17, 2013
2 parents 2ecd6df + f672348 commit 6af12e4
Show file tree
Hide file tree
Showing 14 changed files with 64 additions and 108 deletions.
3 changes: 2 additions & 1 deletion COPYING
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright (c) 2009-2011 Bitcoin Developers
Copyright (c) 2009-2013 Bitcoin Developers
Copyright (c) 2009-2013 Namecoin Developers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions DESIGN-namecoin.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Name Coin Design
# Namecoin Design

## Key Operations

Expand All @@ -8,7 +8,7 @@ Key operations are performed by transactions with version 0x9900 - 0x99ff
* name\_firstupdate(name, rand, value)
* name\_update(name, value)

The last is a normal bitcoin like transaction that does not affect the name.
The last is a normal bitcoin-like transaction that does not affect the name.

## Method

Expand Down
9 changes: 5 additions & 4 deletions README-bitcoin.md → DEVELOPMENT-PROCESS.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
Bitcoin integration/staging tree
Namecoin integration/staging tree

Development process
===================

Developers work in their own trees, then submit pull requests when they think their feature or bug fix is ready.

If it is a simple/trivial/non-controversial change, then one of the bitcoin development team members simply pulls it.
If it is a simple/trivial/non-controversial change, then one of the namecoin development team members simply pulls it.

If it is a more complicated or potentially controversial change, then the patch submitter will be asked to start a discussion (if they haven't already) on the development forums.

If it is a more complicated or potentially controversial change, then the patch submitter will be asked to start a discussion (if they haven't already) on the development forums: http://www.bitcoin.org/smf/index.php?board=6.0
The patch will be accepted if there is broad consensus that it is a good thing. Developers should expect to rework and resubmit patches if they don't match the project's coding conventions (see coding.txt) or are controversial.

The master branch is regularly built and tested (by who? need people willing to be quality assurance testers), and periodically pushed to the subversion repo to become the official, stable, released bitcoin.
The master branch is regularly built and tested (by who? need people willing to be quality assurance testers), and periodically pushed to the subversion repo to become the official, stable, released namecoin.


Feature branches are created when there are major new features being worked on by several people.
77 changes: 7 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,16 @@
Namecoin
===================

See https://dot-bit.org/ for more project information.
Namecoin is a decentralized key/value registration and transfer system based on Bitcoin technology (a decentralized cryptocurrency).

Namecoin is a peer to peer naming system based on bitcoin. It is a secure and censorship resistant replacement for DNS.
It can be used for multiple purposes, for example a secure and censorship resistant replacement for DNS.

Ownership of a name is based on ownership of a coin, which is in turn based on public key cryptography. The namecoin network reaches consensus every few minutes as to which names have been reserved or updated.

It is envisioned that the .bit domain be used for gluing namecoin domain names into the DNS. This can be done close to the user or even by the user.
There is a FAQ.md to answer some general questions.

See FAQ.md for more general information.
See http://namecoin.info or http://dot-bit.org for more information.

News
=====================

Stable releases: only releases a tag that starts with "nc", that are signed and that do not end with -rc0-9 should be considered stable. All others are experimental.

IMPORTANT VALIDATION CHANGES at block 19200 and 24000!

* Effective at block 19200, merged mining comes into effect
* Also effective at block 19200, timetravel (2015-2016 retarget) hole is closed
* Effective at block 24000, names registered at block 12000 onward will expire after 36000 blocks instead of the current value of 12000
* Also effective at block 24000, the decline in network fees will speed up by a factor of 4

You must upgrade to the latest version nc0.3.24.\* before block 19200 or your client will start rejecting blocks and will be unable to participate in the network.

Technical
=====================
Expand All @@ -38,61 +25,11 @@ The protocol differences from bitcoin include:
* RPC calls for managing names
* Network fees to slow down the initial rush

Please read DESIGN-namecoind.md before proceeding.

BUILDING
======================
Please read DESIGN-namecoind.md for details.

Building is supported on Linux, Windows and Mac. Follow the bitcoin build instructions. Use "makefile.unix" for linux - it will generate namecoind. Usage is similar to bitcoind, plus new RPC calls for the new operations. A GUI is on the roadmap.

RUNNING
BUILDING
======================

You can acquire namecoins in the usual bitcoin way, by mining or by reciving some from others. After you have acquired some namecoins, use:

`namecoind name_new d/<name>`

This will reserve a name but not make it visible yet. Make a note of the short hex number. You will need it for the next step. (Do not shut down namecoind or you will also have to supply the longer hex code below.) Wait about 12 blocks, then issue:

`namecoind name_firstupdate d/<name> <rand> <value>`

`<rand>` is the short hex number from the previous step. This step will make the name visible to all.

after the first update, you can do more updates with:

`namecoind name_update d/<name> <value>`

and transfer to another person:

`namecoind name_update d/<name> <value> <address>`

dump your list of names:

`namecoind name_list`

dump the global list:

`namecoind name_scan`

VALUES
===================

Values for names in the d/ namespace are JSON encoded. The simplest value is of this form:

{"": "10.0.0.1", "map": {"www": "10.0.0.1"}}

A [full specification](http://dot-bit.org/Domain_names) is in progress.

DNS conduits
=============

SOCKS5/Tor name resolver: See `ncproxy` in the client sub-directory.

In the near future gzip encoding of the value will be possible, but ncproxy does not support this yet.

ROADMAP
===================
Building is supported on Linux, Windows and Mac. For building on windows you can use the scripts in ./contrib/easywinbuilder. Find build instructions on http://dot-bit.org.

* DNS zone conduit to allow normal DNS server to serve the .bit domain
* Firefox/chrome/... plugins
* GUI
30 changes: 25 additions & 5 deletions contrib/easywinbuilder/1a_environment_mingw.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
@call set_vars.bat
@echo About to download MinGW installer - you need to install it manually like this:
@echo Use prepackaged catalogue
@echo About to download MinGW installer - you need to install it manually. Note:
@echo Install to default directory: C:\MinGW
@echo Configure options: C, C++, MSYS basic system
@echo Unselect "... also install support for the graphical user interface."
@echo.
@pause
@start http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/%MINGWINSTALLER%/%MINGWINSTALLER%.exe/download
@set WAITMINGW=1
@start https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download
@echo.
@echo Once the mingw-get-setup has finished press a key.
@pause
%MINGWPATH%\bin\mingw-get.exe update
%MINGWPATH%\bin\mingw-get.exe install msys-base
%MINGWPATH%\bin\mingw-get install mingw32-make
%MINGWPATH%\bin\mingw-get install msys-wget-bin
%MINGWPATH%\bin\mingw-get install msys-unzip-bin
%MINGWPATH%\bin\mingw-get install msys-perl

%MINGWPATH%\bin\mingw-get.exe install --reinstall --recursive "gcc=4.6.*"
%MINGWPATH%\bin\mingw-get.exe install --reinstall --recursive "gcc-g++=4.6.*"
%MINGWPATH%\bin\mingw-get.exe install --reinstall --recursive "gcc-bin=4.6.*"

%MINGWPATH%\bin\mingw-get install --reinstall --recursive libgmp-dll="5.0.1-*"
%MINGWPATH%\bin\mingw-get install --reinstall --recursive mingwrt-dev
%MINGWPATH%\bin\mingw-get.exe install --reinstall --recursive "w32api=3.17-2"
%MINGWPATH%\bin\mingw-get.exe install --reinstall --recursive "w32api-dev=3.17-2"

@rem There is a problem with MSYS bash and sh that stalls OpenSSL config on some systems. Using rxvt shell as a workaround.
%MINGWPATH%\bin\mingw-get install msys-rxvt
echo.
11 changes: 4 additions & 7 deletions contrib/easywinbuilder/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EasyWinBuilder v0.3
EasyWinBuilder v0.5
===============
(c) 2013 phelix / blockchained.com - MIT license

Expand All @@ -8,16 +8,13 @@ EasyWinBuilder can run on a mint windows system (e.g. a virtual machine) or a no

In this repository there are no changes to the Bitcoin code itself though the process makes a handful of small changes. This means it should be possible to plug'n'play the easywinbuilder directory into similar Bitcoin versions.

To change dependency versions edit set_vars.bat
To change directories and dependency versions edit set_vars.bat

More info here: https://bitcointalk.org/index.php?topic=252931

File Hashes
-----------
The process will calculate a hash of the disassemblies of the final executables. The idea is to validate binaries by several people.
I am not quite sure if this will reliably result in the same hash for the same build. Please let me know if you get different values or know how to improve this feature.

ToDo
-----
* Check daemon disassembly hashes (deterministic build)
* Automatic environment install (how to bootstrap?)
* Try to speed up building of OpenSSL and Berkeley DB by only building what is necessary

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@if errorlevel 1 goto error
@rem call 5a_run_hash_daemon.bat
@if errorlevel 1 goto error
@call 5b_run_hash_qt.bat
@rem call 5b_run_hash_qt.bat
@if errorlevel 1 goto error
@call 6_gather_dlls.bat
@if errorlevel 1 goto error
Expand Down
7 changes: 5 additions & 2 deletions contrib/easywinbuilder/build_dep.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
set -o errexit

if [ -d "${ROOTPATHSH}/src/leveldb" ]; then
echo leveldb...
cd $ROOTPATHSH/src/leveldb
make memenv_test TARGET_OS=OS_WINDOWS_CROSSCOMPILE \
OPT="${ADDITIONALCCFLAGS}"
if [ "$?"-ne 0]; then echo "LevelDB build failed."; read -n 1 -s; exit 1;fi
echo
cd ../../$EWBPATH
fi
Expand All @@ -17,8 +16,10 @@ cd build_unix
../dist/configure --disable-replication --enable-mingw --enable-cxx \
CXXFLAGS="${ADDITIONALCCFLAGS}" \
CFLAGS="${ADDITIONALCCFLAGS}"
if [ ${?} -ne 0 ]; then echo "BerkeleyDB configure failed."; read -n 1 -s; exit 1;fi
sed -i 's/typedef pthread_t db_threadid_t;/typedef u_int32_t db_threadid_t;/g' db.h # workaround, see https://bitcointalk.org/index.php?topic=45507.0
make
if [ ${?} -ne 0 ]; then echo "BerkeleyDB make failed."; read -n 1 -s; exit 1;fi
cd ..
cd ..
echo
Expand All @@ -27,7 +28,9 @@ echo openssl...
cd $OPENSSL
export CC="gcc ${ADDITIONALCCFLAGS}"
./config
if [ ${?} -ne 0 ]; then echo "OpenSSL config failed."; read -n 1 -s; exit 1;fi
make
if [ ${?} -ne 0 ]; then echo "OpenSSL make failed."; read -n 1 -s; exit 1;fi
cd ..
echo

Expand Down
10 changes: 1 addition & 9 deletions contrib/easywinbuilder/download.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
echo Creating lib directory...
echo Downloading tools...
mingw-get install msys-wget-bin # > /dev/null 2>&1
mingw-get install msys-unzip-bin #> /dev/null 2>&1
mingw-get install msys-perl # > /dev/null 2>&1
# There is a problem with MSYS bash and sh that stalls OpenSSL config on some systems. Using rxvt shell as a workaround.
mingw-get install msys-rxvt # > /dev/null 2>&1
echo

set -o errexit

echo Creating lib directory...
cd $ROOTPATHSH
if [ ! -d $EWBLIBS ]; then
mkdir $EWBLIBS
Expand Down
1 change: 0 additions & 1 deletion contrib/easywinbuilder/hash_daemon.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
echo Hash of daemon binary [experimental]...
bash dahash.sh $ROOTPATHSH/src/${COINNAME}d.exe
echo phelix got: 35f2d548eec995d4a68e514d0268b00c38b3677e99cbe0478dad34bf3bdc7c84 (v3.70)
1 change: 0 additions & 1 deletion contrib/easywinbuilder/hash_qt.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
echo Hash of Qt binary [experimental]...
bash dahash.sh $ROOTPATHSH/release/${COINNAME}-qt.exe
echo phelix got: 924b34d99151e2b58f2be1a74e18c76915b5ef12e5479f58b3a6117b8280129f (v3.70)
echo
echo

8 changes: 8 additions & 0 deletions contrib/easywinbuilder/patch_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ sed -i.bak 's/all: init upnpc-static upnpc-shared testminixml libminiupnpc.a min
sed -i.bak 's/CFLAGS=-mthreads/CFLAGS=${ADDITIONALCCFLAGS} -mthreads/g' $ROOTPATHSH/src/makefile.mingw
sed -i.bak 's/CC = gcc/CC=gcc ${ADDITIONALCCFLAGS} -Wall/g' $ROOTPATHSH/${EWBLIBS}/${MINIUPNPC}/Makefile.mingw


# winsock trouble
sed -i.bak 's/-DWIN32 -D_WINDOWS/-DWIN32 -DWIN32_LEAN_AND_MEAN -D_WINDOWS/g' $ROOTPATHSH/src/makefile.mingw
sed -i.bak 's/DEFINES += WIN32$/DEFINES += WIN32 WIN32_LEAN_AND_MEAN/g' $ROOTPATHSH/${COINNAME}-qt.pro

# https://github.com/bitcoin/bitcoin/pull/3121 multi threading fix
sed -i.bak 's/DEFS=-DWIN32/DEFS=-D_MT -DWIN32/g' $ROOTPATHSH/src/makefile.mingw
sed -i.bak 's/LIBS += -l kernel32/LIBS += -l mingwthrd -l kernel32/g' $ROOTPATHSH/src/makefile.mingw
7 changes: 3 additions & 4 deletions contrib/easywinbuilder/set_vars.bat
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
@set PATH=c:\mingw\msys\1.0\bin;c:\mingw\bin
@set MINGWPATH=C:\MinGW
@set PATH=%MINGWPATH%\msys\1.0\bin;%MINGWPATH%\bin

@set LANG=en_US.UTF8
@set LC_ALL=en_US.UTF8

@set MINGWINSTALLER=mingw-get-inst-20120426

@set OPENSSL=openssl-1.0.1e
@set BERKELEYDB=db-4.8.30.NC
@set BOOST=boost_1_54_0
Expand All @@ -27,7 +26,7 @@
@set QTDOWNLOADPATH=http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-win-opensource-4.8.5-mingw.exe
@rem Qt5 will need changes in gather_dlls.bat

@set MSYS=C:/MinGW/msys/1.0/bin
@set MSYS=%MINGWPATH:\=/%/msys/1.0/bin
@set PERL=%MSYS%/perl.exe

@rem the following will be set as additional CXXFLAGS and CFLAGS for everything - no ' or ", space is ok
Expand Down
2 changes: 1 addition & 1 deletion src/headers.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#ifdef _WIN32_WINNT
#undef _WIN32_WINNT
#endif
#define _WIN32_WINNT 0x0500
#define _WIN32_WINNT 0x0501
#ifdef _WIN32_IE
#undef _WIN32_IE
#endif
Expand Down

0 comments on commit 6af12e4

Please sign in to comment.