diff --git a/README.md b/README.md index 4141a07..0f2e882 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ The daemon and other programs are only for limited testing and evaluation purpos - The golang versions of derosuite are using non-standard ports so as it does NOT clash with already running daemon. ## Build: -In go workspace: **go get -u github.com/deroproject/derosuite/...** +In go workspace: **go get -u github.com/arnaucode/derosuite/...** ​ Check bin folder for derod, explorer and wallet binaries. Use golang-1.9 version minimum. diff --git a/address/address.go b/address/address.go index 110b374..00ec6e2 100644 --- a/address/address.go +++ b/address/address.go @@ -20,7 +20,7 @@ import "fmt" import "bytes" import "encoding/binary" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto" // see https://cryptonote.org/cns/cns007.txt to understand address more diff --git a/address/address_test.go b/address/address_test.go index b7028ec..6391507 100644 --- a/address/address_test.go +++ b/address/address_test.go @@ -21,7 +21,7 @@ import "bytes" import "testing" import "encoding/hex" -import "github.com/deroproject/derosuite/config" +import "github.com/arnaucode/derosuite/config" func TestAddressError(t *testing.T) { _, err := NewAddress("") diff --git a/block/block.go b/block/block.go index 01f816d..c0bbc2f 100644 --- a/block/block.go +++ b/block/block.go @@ -23,10 +23,10 @@ import "encoding/binary" import "github.com/romana/rlog" -import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/config" -import "github.com/deroproject/derosuite/cryptonight" -import "github.com/deroproject/derosuite/transaction" +import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/config" +import "github.com/arnaucode/derosuite/cryptonight" +import "github.com/arnaucode/derosuite/transaction" // these are defined in file //https://github.com/monero-project/monero/src/cryptonote_basic/cryptonote_basic.h diff --git a/block/block_test.go b/block/block_test.go index 032d3b6..8fd90a7 100644 --- a/block/block_test.go +++ b/block/block_test.go @@ -20,8 +20,8 @@ import "bytes" import "testing" import "encoding/hex" -import "github.com/deroproject/derosuite/config" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/config" +import "github.com/arnaucode/derosuite/crypto" func Test_Genesis_block_serdes(t *testing.T) { diff --git a/blockchain/alt_blocks.go b/blockchain/alt_blocks.go index 98c3c37..ebb0469 100644 --- a/blockchain/alt_blocks.go +++ b/blockchain/alt_blocks.go @@ -19,7 +19,7 @@ package blockchain import "fmt" import "encoding/hex" -import "github.com/deroproject/derosuite/block" +import "github.com/arnaucode/derosuite/block" // this file only contains an altchain, 13 long // which can be used to test out consensus on live data in house diff --git a/blockchain/block_chain_input.go b/blockchain/block_chain_input.go index 8c03e3b..6edb662 100644 --- a/blockchain/block_chain_input.go +++ b/blockchain/block_chain_input.go @@ -19,10 +19,10 @@ package blockchain /* import log "github.com/sirupsen/logrus" -import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/block" -import "github.com/deroproject/derosuite/transaction" -//import "github.com/deroproject/derosuite/blockchain/mempool" +import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/block" +import "github.com/arnaucode/derosuite/transaction" +//import "github.com/arnaucode/derosuite/blockchain/mempool" */ // DERO blockchain has been designed/developed as a state machine ( single-threaded) diff --git a/blockchain/blockchain.go b/blockchain/blockchain.go index 8f46075..49d2a4a 100644 --- a/blockchain/blockchain.go +++ b/blockchain/blockchain.go @@ -33,17 +33,17 @@ import "runtime/debug" import log "github.com/sirupsen/logrus" import "github.com/romana/rlog" -import "github.com/deroproject/derosuite/config" -import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/globals" -import "github.com/deroproject/derosuite/storage" -import "github.com/deroproject/derosuite/difficulty" -import "github.com/deroproject/derosuite/crypto/ringct" -import "github.com/deroproject/derosuite/block" -import "github.com/deroproject/derosuite/transaction" -import "github.com/deroproject/derosuite/checkpoints" -import "github.com/deroproject/derosuite/blockchain/mempool" -import "github.com/deroproject/derosuite/blockchain/inputmaturity" +import "github.com/arnaucode/derosuite/config" +import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/globals" +import "github.com/arnaucode/derosuite/storage" +import "github.com/arnaucode/derosuite/difficulty" +import "github.com/arnaucode/derosuite/crypto/ringct" +import "github.com/arnaucode/derosuite/block" +import "github.com/arnaucode/derosuite/transaction" +import "github.com/arnaucode/derosuite/checkpoints" +import "github.com/arnaucode/derosuite/blockchain/mempool" +import "github.com/arnaucode/derosuite/blockchain/inputmaturity" // all components requiring access to blockchain must use , this struct to communicate // this structure must be update while mutex diff --git a/blockchain/blockheader.go b/blockchain/blockheader.go index 595a7b7..7ea3dfb 100644 --- a/blockchain/blockheader.go +++ b/blockchain/blockheader.go @@ -17,7 +17,7 @@ package blockchain //import "fmt" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto" // this is used to print blockheader for the rpc and the daemon type BlockHeader_Print struct { diff --git a/blockchain/checkpoints_static.go b/blockchain/checkpoints_static.go index 5b73604..009fe0f 100644 --- a/blockchain/checkpoints_static.go +++ b/blockchain/checkpoints_static.go @@ -21,8 +21,8 @@ import "encoding/hex" //import log "github.com/sirupsen/logrus" -import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/globals" +import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/globals" var mainnet_static_checkpoints = map[uint64]crypto.Hash{} var testnet_static_checkpoints = map[uint64]crypto.Hash{} diff --git a/blockchain/const.go b/blockchain/const.go index 5eb1d5e..4dab803 100644 --- a/blockchain/const.go +++ b/blockchain/const.go @@ -16,7 +16,7 @@ package blockchain -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto" // this file contains all the constant diff --git a/blockchain/create_miner_tx.go b/blockchain/create_miner_tx.go index 814792d..f3a303a 100644 --- a/blockchain/create_miner_tx.go +++ b/blockchain/create_miner_tx.go @@ -18,10 +18,10 @@ package blockchain import "fmt" -import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/address" -import "github.com/deroproject/derosuite/crypto/ringct" -import "github.com/deroproject/derosuite/transaction" +import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/address" +import "github.com/arnaucode/derosuite/crypto/ringct" +import "github.com/arnaucode/derosuite/transaction" // this function creates a miner tx, with specific blockreward // TODO we should consider hardfork version while creating a miner tx diff --git a/blockchain/create_miner_tx_test.go b/blockchain/create_miner_tx_test.go index ae74675..f0bbc18 100644 --- a/blockchain/create_miner_tx_test.go +++ b/blockchain/create_miner_tx_test.go @@ -20,11 +20,11 @@ package blockchain import "testing" -import "github.com/deroproject/derosuite/walletapi" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/walletapi" +import "github.com/arnaucode/derosuite/crypto" -//import "github.com/deroproject/derosuite/address" -import "github.com/deroproject/derosuite/transaction" +//import "github.com/arnaucode/derosuite/address" +import "github.com/arnaucode/derosuite/transaction" // file to test whether the miner tx is created successfully and can be serialized/decoded successfully by the block miner diff --git a/blockchain/genesis.go b/blockchain/genesis.go index 5586047..e4d3864 100644 --- a/blockchain/genesis.go +++ b/blockchain/genesis.go @@ -20,9 +20,9 @@ import "encoding/hex" import "github.com/romana/rlog" -//import "github.com/deroproject/derosuite/address" -import "github.com/deroproject/derosuite/block" -import "github.com/deroproject/derosuite/globals" +//import "github.com/arnaucode/derosuite/address" +import "github.com/arnaucode/derosuite/block" +import "github.com/arnaucode/derosuite/globals" /* func Create_Miner_Transaction(height uint64, median_size uint64, already_generated_coins uint64, diff --git a/blockchain/inputmaturity/inputmaturity.go b/blockchain/inputmaturity/inputmaturity.go index eb41448..14a236f 100644 --- a/blockchain/inputmaturity/inputmaturity.go +++ b/blockchain/inputmaturity/inputmaturity.go @@ -17,7 +17,7 @@ package inputmaturity import "time" -import "github.com/deroproject/derosuite/config" +import "github.com/arnaucode/derosuite/config" //this file implements the logic to detect whether an input is mature or still locked //This function is crucial as any bugs can have catastrophic effects diff --git a/blockchain/inputmaturity/inputmaturity_test.go b/blockchain/inputmaturity/inputmaturity_test.go index 415c511..dbf3c7b 100644 --- a/blockchain/inputmaturity/inputmaturity_test.go +++ b/blockchain/inputmaturity/inputmaturity_test.go @@ -18,7 +18,7 @@ package inputmaturity import "testing" -import "github.com/deroproject/derosuite/config" +import "github.com/arnaucode/derosuite/config" //this file implements the logic to detect whether an input is mature or still locked //This function is crucial as any bugs can have catastrophic effects diff --git a/blockchain/mempool/mempool.go b/blockchain/mempool/mempool.go index 1b40916..39a9761 100644 --- a/blockchain/mempool/mempool.go +++ b/blockchain/mempool/mempool.go @@ -22,9 +22,9 @@ import "sync/atomic" import log "github.com/sirupsen/logrus" -import "github.com/deroproject/derosuite/transaction" -import "github.com/deroproject/derosuite/globals" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/transaction" +import "github.com/arnaucode/derosuite/globals" +import "github.com/arnaucode/derosuite/crypto" // NOTE: do NOT consider this code as useless, as it is used to avooid double spending attacks within the block // let me explain, since we are a state machine, we add block to our blockchain diff --git a/blockchain/mempool/mempool_test.go b/blockchain/mempool/mempool_test.go index d46fc58..89ad9e2 100644 --- a/blockchain/mempool/mempool_test.go +++ b/blockchain/mempool/mempool_test.go @@ -23,8 +23,8 @@ import "encoding/hex" import log "github.com/sirupsen/logrus" -import "github.com/deroproject/derosuite/globals" -import "github.com/deroproject/derosuite/transaction" +import "github.com/arnaucode/derosuite/globals" +import "github.com/arnaucode/derosuite/transaction" // test the mempool interface with valid TX func Test_mempool_Full_block_72_2c4738d3856e8e3e8f9fc4818a9197d4911af3010e067ec56d08c264627cb547(t *testing.T) { diff --git a/blockchain/outputs_index.go b/blockchain/outputs_index.go index b3cb7dc..04fd71a 100644 --- a/blockchain/outputs_index.go +++ b/blockchain/outputs_index.go @@ -29,13 +29,13 @@ import "fmt" import "github.com/vmihailenco/msgpack" -import "github.com/deroproject/derosuite/config" -import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/globals" -import "github.com/deroproject/derosuite/crypto/ringct" -import "github.com/deroproject/derosuite/transaction" +import "github.com/arnaucode/derosuite/config" +import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/globals" +import "github.com/arnaucode/derosuite/crypto/ringct" +import "github.com/arnaucode/derosuite/transaction" -import "github.com/deroproject/derosuite/walletapi" +import "github.com/arnaucode/derosuite/walletapi" type Index_Data struct { InKey ringct.CtKey diff --git a/blockchain/reorg_test.go b/blockchain/reorg_test.go index 914c9a2..5dd4b58 100644 --- a/blockchain/reorg_test.go +++ b/blockchain/reorg_test.go @@ -19,7 +19,7 @@ package blockchain import "sort" import "testing" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto" /* this function tests the core chain selection algorithm for reorganisation purpose */ func Test_chain_sort(t *testing.T) { diff --git a/blockchain/rpcserver/getblock.go b/blockchain/rpcserver/getblock.go index 8096d50..0aa2f29 100644 --- a/blockchain/rpcserver/getblock.go +++ b/blockchain/rpcserver/getblock.go @@ -29,8 +29,8 @@ import "encoding/json" import "github.com/intel-go/fastjson" import "github.com/osamingo/jsonrpc" -import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/blockchain" +import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/blockchain" type ( GetBlock_Handler struct{} diff --git a/blockchain/rpcserver/getblockheaderbyhash.go b/blockchain/rpcserver/getblockheaderbyhash.go index aed351a..1db441e 100644 --- a/blockchain/rpcserver/getblockheaderbyhash.go +++ b/blockchain/rpcserver/getblockheaderbyhash.go @@ -27,8 +27,8 @@ import "context" import "github.com/intel-go/fastjson" import "github.com/osamingo/jsonrpc" -import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/blockchain" +import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/blockchain" type ( GetBlockHeaderByHash_Handler struct{} diff --git a/blockchain/rpcserver/getblockheaderbyheight.go b/blockchain/rpcserver/getblockheaderbyheight.go index fe0a75a..0aa92fb 100644 --- a/blockchain/rpcserver/getblockheaderbyheight.go +++ b/blockchain/rpcserver/getblockheaderbyheight.go @@ -27,8 +27,8 @@ import "context" import "github.com/intel-go/fastjson" import "github.com/osamingo/jsonrpc" -//import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/blockchain" +//import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/blockchain" type ( GetBlockHeaderByHeight_Handler struct{} diff --git a/blockchain/rpcserver/getinfo.go b/blockchain/rpcserver/getinfo.go index 49fcab6..7ebb1f9 100644 --- a/blockchain/rpcserver/getinfo.go +++ b/blockchain/rpcserver/getinfo.go @@ -27,8 +27,8 @@ import "context" import "github.com/intel-go/fastjson" import "github.com/osamingo/jsonrpc" -import "github.com/deroproject/derosuite/config" -import "github.com/deroproject/derosuite/globals" +import "github.com/arnaucode/derosuite/config" +import "github.com/arnaucode/derosuite/globals" /* { diff --git a/blockchain/rpcserver/getlastblockheader.go b/blockchain/rpcserver/getlastblockheader.go index 14e01de..6c2f799 100644 --- a/blockchain/rpcserver/getlastblockheader.go +++ b/blockchain/rpcserver/getlastblockheader.go @@ -27,7 +27,7 @@ import "context" import "github.com/intel-go/fastjson" import "github.com/osamingo/jsonrpc" -import "github.com/deroproject/derosuite/blockchain" +import "github.com/arnaucode/derosuite/blockchain" type ( GetLastBlockHeader_Handler struct{} diff --git a/blockchain/rpcserver/gettransactions.go b/blockchain/rpcserver/gettransactions.go index 5464cc9..5377682 100644 --- a/blockchain/rpcserver/gettransactions.go +++ b/blockchain/rpcserver/gettransactions.go @@ -20,7 +20,7 @@ import "net/http" import "encoding/hex" import "encoding/json" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto" // we definitely need to clear up the MESS that has been created by the MONERO project // half of their APIs are json rpc and half are http diff --git a/blockchain/rpcserver/rpcserver.go b/blockchain/rpcserver/rpcserver.go index 782b6d2..746c2df 100644 --- a/blockchain/rpcserver/rpcserver.go +++ b/blockchain/rpcserver/rpcserver.go @@ -30,8 +30,8 @@ import "github.com/osamingo/jsonrpc" import log "github.com/sirupsen/logrus" -import "github.com/deroproject/derosuite/globals" -import "github.com/deroproject/derosuite/blockchain" +import "github.com/arnaucode/derosuite/globals" +import "github.com/arnaucode/derosuite/blockchain" /* this file implements the rpcserver api, so as wallet and block explorer tools can work without migration */ diff --git a/blockchain/store.go b/blockchain/store.go index 57edce9..e28223a 100644 --- a/blockchain/store.go +++ b/blockchain/store.go @@ -21,10 +21,10 @@ import "encoding/binary" //import log "github.com/sirupsen/logrus" -import "github.com/deroproject/derosuite/block" -import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/globals" -import "github.com/deroproject/derosuite/transaction" +import "github.com/arnaucode/derosuite/block" +import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/globals" +import "github.com/arnaucode/derosuite/transaction" /* this file implements the only interface which translates comands to/from blockchain to storage layer * * diff --git a/blockchain/transaction_verify.go b/blockchain/transaction_verify.go index aa92fff..03e95fc 100644 --- a/blockchain/transaction_verify.go +++ b/blockchain/transaction_verify.go @@ -30,12 +30,12 @@ import "runtime/debug" import log "github.com/sirupsen/logrus" -import "github.com/deroproject/derosuite/block" -import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/globals" -import "github.com/deroproject/derosuite/crypto/ringct" -import "github.com/deroproject/derosuite/transaction" -import "github.com/deroproject/derosuite/emission" +import "github.com/arnaucode/derosuite/block" +import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/globals" +import "github.com/arnaucode/derosuite/crypto/ringct" +import "github.com/arnaucode/derosuite/transaction" +import "github.com/arnaucode/derosuite/emission" /* This function verifies tx fully, means all checks, * if the transaction has passed the check it can be added to mempool, relayed or added to blockchain @@ -260,18 +260,18 @@ func (chain *Blockchain) Verify_Transaction_NonCoinbase(tx *transaction.Transact // a similiar block level check is done for double spending attacks within the block itself // check whether the key image is already used or spent earlier ( in blockchain ) -/* - for i := 0; i < len(tx.Vin); i++ { - k_image := ringct.Key(tx.Vin[i].(transaction.Txin_to_key).K_image) - if chain.Read_KeyImage_Status(crypto.Hash(k_image)) { - logger.WithFields(log.Fields{ - "txid": tx_hash, - "kimage": k_image, - }).Warnf("Key image is already spent, attempt to double spend ") - return false + /* + for i := 0; i < len(tx.Vin); i++ { + k_image := ringct.Key(tx.Vin[i].(transaction.Txin_to_key).K_image) + if chain.Read_KeyImage_Status(crypto.Hash(k_image)) { + logger.WithFields(log.Fields{ + "txid": tx_hash, + "kimage": k_image, + }).Warnf("Key image is already spent, attempt to double spend ") + return false + } } - } -*/ + */ // check whether the TX contains a signature or NOT switch tx.RctSignature.Get_Sig_Type() { case ringct.RCTTypeSimple, ringct.RCTTypeFull: // default case, pass through diff --git a/blockchain/tx_fees.go b/blockchain/tx_fees.go index e731a26..0edc2b0 100644 --- a/blockchain/tx_fees.go +++ b/blockchain/tx_fees.go @@ -17,7 +17,7 @@ package blockchain import "math/big" -import "github.com/deroproject/derosuite/config" +import "github.com/arnaucode/derosuite/config" // this file implements the logic to calculate fees dynamicallly diff --git a/build_all.sh b/build_all.sh index 57f11ec..448f3b1 100644 --- a/build_all.sh +++ b/build_all.sh @@ -10,15 +10,11 @@ ABSDIR=$(dirname $ABSPATH) cd $ABSDIR/../../../../ GOPATH=`pwd` cd $CURDIR -bash $ABSDIR/build_package.sh "github.com/deroproject/derosuite/cmd/derod" -bash $ABSDIR/build_package.sh "github.com/deroproject/derosuite/cmd/explorer" -bash $ABSDIR/build_package.sh "github.com/deroproject/derosuite/cmd/dero-wallet-cli" +bash $ABSDIR/build_package.sh "github.com/arnaucode/derosuite/cmd/derod" +bash $ABSDIR/build_package.sh "github.com/arnaucode/derosuite/cmd/explorer" +bash $ABSDIR/build_package.sh "github.com/arnaucode/derosuite/cmd/dero-wallet-cli" cd "${ABSDIR}/build" -#windows users require zip files -zip -r dero_windows_amd64.zip dero_windows_amd64 -zip -r dero_windows_386.zip dero_windows_386 - #all other platforms are okay with tar.gz find . -mindepth 1 -type d -not -name '*windows*' -exec tar --owner=dummy --group=dummy -cvzf {}.tar.gz {} \; diff --git a/build_allBACKUP.sh b/build_allBACKUP.sh new file mode 100644 index 0000000..7c9e52e --- /dev/null +++ b/build_allBACKUP.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + + + +CURDIR=`/bin/pwd` +BASEDIR=$(dirname $0) +ABSPATH=$(readlink -f $0) +ABSDIR=$(dirname $ABSPATH) + +cd $ABSDIR/../../../../ +GOPATH=`pwd` +cd $CURDIR +bash $ABSDIR/build_package.sh "github.com/arnaucode/derosuite/cmd/derod" +bash $ABSDIR/build_package.sh "github.com/arnaucode/derosuite/cmd/explorer" +bash $ABSDIR/build_package.sh "github.com/arnaucode/derosuite/cmd/dero-wallet-cli" +cd "${ABSDIR}/build" + +#windows users require zip files +zip -r dero_windows_amd64.zip dero_windows_amd64 +zip -r dero_windows_386.zip dero_windows_386 + +#all other platforms are okay with tar.gz +find . -mindepth 1 -type d -not -name '*windows*' -exec tar --owner=dummy --group=dummy -cvzf {}.tar.gz {} \; + +cd $CURDIR diff --git a/build_package.sh b/build_package.sh index 0af9d25..504ae7b 100644 --- a/build_package.sh +++ b/build_package.sh @@ -10,21 +10,12 @@ BASEDIR=$(dirname $0) ABSPATH=$(readlink -f $0) ABSDIR=$(dirname $ABSPATH) +PLATFORMS="" +#PLATFORMS="$PLATFORMS linux/amd64 linux/386" +PLATFORMS="$PLATFORMS linux/amd64" -PLATFORMS="darwin/amd64" # amd64 only as of go1.5 -PLATFORMS="$PLATFORMS windows/amd64 windows/386" # arm compilation not available for Windows -PLATFORMS="$PLATFORMS linux/amd64 linux/386" -#PLATFORMS="$PLATFORMS linux/ppc64le" is it common enough ?? -#PLATFORMS="$PLATFORMS linux/mips64le" # experimental in go1.6 is it common enough ?? -PLATFORMS="$PLATFORMS freebsd/amd64 freebsd/386" -PLATFORMS="$PLATFORMS netbsd/amd64" # amd64 only as of go1.6 -PLATFORMS="$PLATFORMS openbsd/amd64" # amd64 only as of go1.6 -PLATFORMS="$PLATFORMS dragonfly/amd64" # amd64 only as of go1.5 -#PLATFORMS="$PLATFORMS plan9/amd64 plan9/386" # as of go1.4, is it common enough ?? -PLATFORMS="$PLATFORMS solaris/amd64" # as of go1.3 -PLATFORMS_ARM="linux freebsd netbsd" type setopt >/dev/null 2>&1 @@ -35,19 +26,24 @@ OUTPUT="$package_name" # if no src file given, use current dir name for PLATFORM in $PLATFORMS; do + echo "platform: $PLATFORM" GOOS=${PLATFORM%/*} + echo "GOOS: $GOOS" GOARCH=${PLATFORM#*/} + echo "GOARCH: $GOARCH" OUTPUT_DIR="${ABSDIR}/build/dero_${GOOS}_${GOARCH}" + echo "OUTPUT_DIR: $OUTPUT_DIR" BIN_FILENAME="${OUTPUT}-${GOOS}-${GOARCH}" + echo "BIN_FILENAME: $BIN_FILENAME" echo mkdir -p $OUTPUT_DIR - if [[ "${GOOS}" == "windows" ]]; then BIN_FILENAME="${BIN_FILENAME}.exe"; fi + #if [[ "${GOOS}" == "windows" ]]; then BIN_FILENAME="${BIN_FILENAME}.exe"; fi CMD="GOOS=${GOOS} GOARCH=${GOARCH} go build -o $OUTPUT_DIR/${BIN_FILENAME} $package" - echo "${CMD}" + echo "cmd: ${CMD}" eval $CMD || FAILURES="${FAILURES} ${PLATFORM}" done # ARM64 builds only for linux -if [[ $PLATFORMS_ARM == *"linux"* ]]; then +if [[ $PLATFORMS_ARM == *"linux"* ]]; then GOOS="linux" GOARCH="arm64" OUTPUT_DIR="${ABSDIR}/build/dero_${GOOS}_${GOARCH}" @@ -58,17 +54,6 @@ fi -for GOOS in $PLATFORMS_ARM; do - GOARCH="arm" - # build for each ARM version - for GOARM in 7 6 5; do - OUTPUT_DIR="${ABSDIR}/build/dero_${GOOS}_${GOARCH}${GOARM}" - BIN_FILENAME="${OUTPUT}-${GOOS}-${GOARCH}${GOARM}" - CMD="GOARM=${GOARM} GOOS=${GOOS} GOARCH=${GOARCH} go build -o $OUTPUT_DIR/${BIN_FILENAME} $package" - echo "${CMD}" - eval "${CMD}" || FAILURES="${FAILURES} ${GOOS}/${GOARCH}${GOARM}" - done -done # eval errors if [[ "${FAILURES}" != "" ]]; then diff --git a/build_packageBACKUP.sh b/build_packageBACKUP.sh new file mode 100644 index 0000000..0af9d25 --- /dev/null +++ b/build_packageBACKUP.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash + +package=$1 +package_split=(${package//\// }) +package_name=${package_split[-1]} + + +CURDIR=`/bin/pwd` +BASEDIR=$(dirname $0) +ABSPATH=$(readlink -f $0) +ABSDIR=$(dirname $ABSPATH) + + +PLATFORMS="darwin/amd64" # amd64 only as of go1.5 +PLATFORMS="$PLATFORMS windows/amd64 windows/386" # arm compilation not available for Windows +PLATFORMS="$PLATFORMS linux/amd64 linux/386" +#PLATFORMS="$PLATFORMS linux/ppc64le" is it common enough ?? +#PLATFORMS="$PLATFORMS linux/mips64le" # experimental in go1.6 is it common enough ?? +PLATFORMS="$PLATFORMS freebsd/amd64 freebsd/386" +PLATFORMS="$PLATFORMS netbsd/amd64" # amd64 only as of go1.6 +PLATFORMS="$PLATFORMS openbsd/amd64" # amd64 only as of go1.6 +PLATFORMS="$PLATFORMS dragonfly/amd64" # amd64 only as of go1.5 +#PLATFORMS="$PLATFORMS plan9/amd64 plan9/386" # as of go1.4, is it common enough ?? +PLATFORMS="$PLATFORMS solaris/amd64" # as of go1.3 + + +PLATFORMS_ARM="linux freebsd netbsd" + +type setopt >/dev/null 2>&1 + +SCRIPT_NAME=`basename "$0"` +FAILURES="" +CURRENT_DIRECTORY=${PWD##*/} +OUTPUT="$package_name" # if no src file given, use current dir name + + +for PLATFORM in $PLATFORMS; do + GOOS=${PLATFORM%/*} + GOARCH=${PLATFORM#*/} + OUTPUT_DIR="${ABSDIR}/build/dero_${GOOS}_${GOARCH}" + BIN_FILENAME="${OUTPUT}-${GOOS}-${GOARCH}" +echo mkdir -p $OUTPUT_DIR + if [[ "${GOOS}" == "windows" ]]; then BIN_FILENAME="${BIN_FILENAME}.exe"; fi + CMD="GOOS=${GOOS} GOARCH=${GOARCH} go build -o $OUTPUT_DIR/${BIN_FILENAME} $package" + echo "${CMD}" + eval $CMD || FAILURES="${FAILURES} ${PLATFORM}" +done + +# ARM64 builds only for linux +if [[ $PLATFORMS_ARM == *"linux"* ]]; then + GOOS="linux" + GOARCH="arm64" + OUTPUT_DIR="${ABSDIR}/build/dero_${GOOS}_${GOARCH}" + CMD="GOOS=linux GOARCH=arm64 go build -o $OUTPUT_DIR/${OUTPUT}-linux-arm64 $package" + echo "${CMD}" + eval $CMD || FAILURES="${FAILURES} ${PLATFORM}" +fi + + + +for GOOS in $PLATFORMS_ARM; do + GOARCH="arm" + # build for each ARM version + for GOARM in 7 6 5; do + OUTPUT_DIR="${ABSDIR}/build/dero_${GOOS}_${GOARCH}${GOARM}" + BIN_FILENAME="${OUTPUT}-${GOOS}-${GOARCH}${GOARM}" + CMD="GOARM=${GOARM} GOOS=${GOOS} GOARCH=${GOARCH} go build -o $OUTPUT_DIR/${BIN_FILENAME} $package" + echo "${CMD}" + eval "${CMD}" || FAILURES="${FAILURES} ${GOOS}/${GOARCH}${GOARM}" + done +done + +# eval errors +if [[ "${FAILURES}" != "" ]]; then + echo "" + echo "${SCRIPT_NAME} failed on: ${FAILURES}" + exit 1 +fi diff --git a/checkpoints/checkpoints.go b/checkpoints/checkpoints.go index 2223a78..19c75e0 100644 --- a/checkpoints/checkpoints.go +++ b/checkpoints/checkpoints.go @@ -46,8 +46,8 @@ import "fmt" import "github.com/romana/rlog" -import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/globals" +import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/globals" // this file handles and maintains checkpoints which are used by blockchain to skip some checks on known parts of the chain // the skipping of the checks can be disabled by command line arguments diff --git a/cmd/dero-wallet-cli/daemon_communication.go b/cmd/dero-wallet-cli/daemon_communication.go index 71106ea..5b1935b 100644 --- a/cmd/dero-wallet-cli/daemon_communication.go +++ b/cmd/dero-wallet-cli/daemon_communication.go @@ -32,8 +32,8 @@ import "compress/gzip" //import "github.com/pierrec/lz4" import "github.com/ybbus/jsonrpc" -import "github.com/deroproject/derosuite/globals" -import "github.com/deroproject/derosuite/blockchain/rpcserver" +import "github.com/arnaucode/derosuite/globals" +import "github.com/arnaucode/derosuite/blockchain/rpcserver" var Wallet_Height uint64 // height of wallet var Daemon_Height uint64 // height of daemon diff --git a/cmd/dero-wallet-cli/easymenu_post_open.go b/cmd/dero-wallet-cli/easymenu_post_open.go index d6d4d59..e031573 100644 --- a/cmd/dero-wallet-cli/easymenu_post_open.go +++ b/cmd/dero-wallet-cli/easymenu_post_open.go @@ -22,8 +22,8 @@ import "strings" import "github.com/chzyer/readline" -import "github.com/deroproject/derosuite/globals" -import "github.com/deroproject/derosuite/walletapi" +import "github.com/arnaucode/derosuite/globals" +import "github.com/arnaucode/derosuite/walletapi" // handle menu if a wallet is currently opened func display_easymenu_post_open_command(l *readline.Instance) { diff --git a/cmd/dero-wallet-cli/easymenu_pre_open.go b/cmd/dero-wallet-cli/easymenu_pre_open.go index f67c36d..689e575 100644 --- a/cmd/dero-wallet-cli/easymenu_pre_open.go +++ b/cmd/dero-wallet-cli/easymenu_pre_open.go @@ -21,8 +21,8 @@ import "strings" import "github.com/chzyer/readline" -import "github.com/deroproject/derosuite/globals" -import "github.com/deroproject/derosuite/walletapi" +import "github.com/arnaucode/derosuite/globals" +import "github.com/arnaucode/derosuite/walletapi" // display menu before a wallet is opened func display_easymenu_pre_open_command(l *readline.Instance) { diff --git a/cmd/dero-wallet-cli/main.go b/cmd/dero-wallet-cli/main.go index d1afc11..0f69a08 100644 --- a/cmd/dero-wallet-cli/main.go +++ b/cmd/dero-wallet-cli/main.go @@ -39,11 +39,11 @@ import "github.com/docopt/docopt-go" import log "github.com/sirupsen/logrus" import "github.com/vmihailenco/msgpack" -//import "github.com/deroproject/derosuite/address" -import "github.com/deroproject/derosuite/walletapi" -import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/globals" -import "github.com/deroproject/derosuite/walletapi/mnemonics" +//import "github.com/arnaucode/derosuite/address" +import "github.com/arnaucode/derosuite/walletapi" +import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/globals" +import "github.com/arnaucode/derosuite/walletapi/mnemonics" var command_line string = `dero-wallet-cli DERO : A secure, private blockchain with smart-contracts diff --git a/cmd/dero-wallet-cli/prompt.go b/cmd/dero-wallet-cli/prompt.go index 9e39550..0303515 100644 --- a/cmd/dero-wallet-cli/prompt.go +++ b/cmd/dero-wallet-cli/prompt.go @@ -26,8 +26,8 @@ import "compress/gzip" import "github.com/chzyer/readline" -import "github.com/deroproject/derosuite/globals" -import "github.com/deroproject/derosuite/walletapi" +import "github.com/arnaucode/derosuite/globals" +import "github.com/arnaucode/derosuite/walletapi" // handle all commands while in prompt mode func handle_prompt_command(l *readline.Instance, line string) { diff --git a/cmd/derod/derod b/cmd/derod/derod new file mode 100755 index 0000000..ca09abc Binary files /dev/null and b/cmd/derod/derod differ diff --git a/cmd/derod/main.go b/cmd/derod/main.go index ae57245..efdf9fa 100644 --- a/cmd/derod/main.go +++ b/cmd/derod/main.go @@ -33,18 +33,18 @@ import "github.com/chzyer/readline" import "github.com/docopt/docopt-go" import log "github.com/sirupsen/logrus" -import "github.com/deroproject/derosuite/p2p" -import "github.com/deroproject/derosuite/globals" -import "github.com/deroproject/derosuite/blockchain" +import "github.com/arnaucode/derosuite/p2p" +import "github.com/arnaucode/derosuite/globals" +import "github.com/arnaucode/derosuite/blockchain" -//import "github.com/deroproject/derosuite/checkpoints" -import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/crypto/ringct" -import "github.com/deroproject/derosuite/blockchain/rpcserver" +//import "github.com/arnaucode/derosuite/checkpoints" +import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto/ringct" +import "github.com/arnaucode/derosuite/blockchain/rpcserver" -//import "github.com/deroproject/derosuite/address" +//import "github.com/arnaucode/derosuite/address" -var command_line string = `derod +var command_line string = `derod DERO : A secure, private blockchain with smart-contracts Usage: @@ -373,9 +373,9 @@ func main() { // fmt.Printf("chain diff %d\n",chain.Get_Difficulty_At_Block(chain.Top_ID)) //fmt.Printf("chain nw rate %d\n", chain.Get_Network_HashRate()) inc, out := p2p.Peer_Direction_Count() -supply := chain.Load_Already_Generated_Coins_for_BL_ID(chain.Get_Top_ID()) -supply -= (2000000* 1000000000000) // remove premine -fmt.Printf("Network %s Height %d NW Hashrate %0.03f MH/sec TH %s Peers %d inc, %d out MEMPOOL size %d Total Circulating Supply %s DERO \n", globals.Config.Name, chain.Get_Height(), float64(chain.Get_Network_HashRate())/1000000.0, chain.Get_Top_ID(), inc, out, len(chain.Mempool.Mempool_List_TX()), globals.FormatMoney(supply)) + supply := chain.Load_Already_Generated_Coins_for_BL_ID(chain.Get_Top_ID()) + supply -= (2000000 * 1000000000000) // remove premine + fmt.Printf("Network %s Height %d NW Hashrate %0.03f MH/sec TH %s Peers %d inc, %d out MEMPOOL size %d Total Circulating Supply %s DERO \n", globals.Config.Name, chain.Get_Height(), float64(chain.Get_Network_HashRate())/1000000.0, chain.Get_Top_ID(), inc, out, len(chain.Mempool.Mempool_List_TX()), globals.FormatMoney(supply)) case strings.ToLower(line) == "sync_info": p2p.Connection_Print() case strings.ToLower(line) == "bye": diff --git a/cmd/explorer/explorer.go b/cmd/explorer/explorer.go index ff0b96f..f95c5de 100644 --- a/cmd/explorer/explorer.go +++ b/cmd/explorer/explorer.go @@ -42,10 +42,10 @@ import "github.com/docopt/docopt-go" import log "github.com/sirupsen/logrus" import "github.com/ybbus/jsonrpc" -import "github.com/deroproject/derosuite/block" -import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/transaction" -import "github.com/deroproject/derosuite/blockchain/rpcserver" +import "github.com/arnaucode/derosuite/block" +import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/transaction" +import "github.com/arnaucode/derosuite/blockchain/rpcserver" var command_line string = `dero_explorer DERO Explorer: A secure, private blockchain with smart-contracts diff --git a/config/config.go b/config/config.go index 7f40614..6809ead 100644 --- a/config/config.go +++ b/config/config.go @@ -17,7 +17,7 @@ package config import "github.com/satori/go.uuid" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto" // all global configuration variables are picked from here diff --git a/crypto/ringct/basic.go b/crypto/ringct/basic.go index 5ab3faf..984aa65 100644 --- a/crypto/ringct/basic.go +++ b/crypto/ringct/basic.go @@ -17,7 +17,7 @@ package ringct import "encoding/hex" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto" // convert a hex string to a key // a copy of these functions exists in the crypto package also diff --git a/crypto/ringct/key.go b/crypto/ringct/key.go index 5a4da3a..e546f56 100644 --- a/crypto/ringct/key.go +++ b/crypto/ringct/key.go @@ -20,7 +20,7 @@ import "io" import "fmt" import "crypto/rand" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto" const KeyLength = 32 diff --git a/crypto/ringct/mlsag.go b/crypto/ringct/mlsag.go index 55c2cfb..1a69f9e 100644 --- a/crypto/ringct/mlsag.go +++ b/crypto/ringct/mlsag.go @@ -1,7 +1,7 @@ package ringct import "fmt" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto" // this file has license pending since it triggers a hard to find golang bug TODO add license after the golang bug is fixed /* This file implements MLSAG signatures for the transactions */ diff --git a/crypto/ringct/ringct.go b/crypto/ringct/ringct.go index 35257c4..24e775e 100644 --- a/crypto/ringct/ringct.go +++ b/crypto/ringct/ringct.go @@ -19,7 +19,7 @@ package ringct import "io" import "fmt" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto" // enable debuggin mode within ringct // if true debugging mode enabled diff --git a/difficulty/difficulty.go b/difficulty/difficulty.go index 62938f8..1781a3f 100644 --- a/difficulty/difficulty.go +++ b/difficulty/difficulty.go @@ -19,8 +19,8 @@ package difficulty import "fmt" import "math/big" -import "github.com/deroproject/derosuite/config" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/config" +import "github.com/arnaucode/derosuite/crypto" var ( // bigZero is 0 represented as a big.Int. It is defined here to avoid diff --git a/difficulty/difficulty_test.go b/difficulty/difficulty_test.go index e3d5bde..b3519b3 100644 --- a/difficulty/difficulty_test.go +++ b/difficulty/difficulty_test.go @@ -18,7 +18,7 @@ package difficulty import "testing" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto" func Test_Next_Difficulty(t *testing.T) { diff --git a/emission/emission.go b/emission/emission.go index fd58d1c..39d0ba1 100644 --- a/emission/emission.go +++ b/emission/emission.go @@ -18,7 +18,7 @@ package emission //import "fmt" import "math/big" -import "github.com/deroproject/derosuite/config" +import "github.com/arnaucode/derosuite/config" //TODO trickling code is note implemented still, but we do NOT require it atleast for another 7-8 years diff --git a/globals/globals.go b/globals/globals.go index 44d53be..1ad163d 100644 --- a/globals/globals.go +++ b/globals/globals.go @@ -22,7 +22,7 @@ import "golang.org/x/net/proxy" import "github.com/sirupsen/logrus" import log "github.com/sirupsen/logrus" -import "github.com/deroproject/derosuite/config" +import "github.com/arnaucode/derosuite/config" type ChainState int // block chain can only be in 2 state, either SYNCRONISED or syncing diff --git a/globals/struct.go b/globals/struct.go index f1b4a88..5dce9f7 100644 --- a/globals/struct.go +++ b/globals/struct.go @@ -18,8 +18,8 @@ package globals //import "github.com/vmihailenco/msgpack" -import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/crypto/ringct" +import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto/ringct" // this structure is way blockchain sends outputs to wallet // this structure is also used internal by blockchain itself, when TXs are expanded and verified diff --git a/p2p/bc_notify_new_block.go b/p2p/bc_notify_new_block.go index c62d195..6e60d48 100644 --- a/p2p/bc_notify_new_block.go +++ b/p2p/bc_notify_new_block.go @@ -21,8 +21,8 @@ import "encoding/binary" import "github.com/romana/rlog" -import "github.com/deroproject/derosuite/block" -import "github.com/deroproject/derosuite/transaction" +import "github.com/arnaucode/derosuite/block" +import "github.com/arnaucode/derosuite/transaction" // FIXME this code can also be shared by NOTIFY_NEW_BLOCK, NOTIFY_NEW_TRANSACTIONS, Handle_BC_Notify_Response_GetObjects // this code handles a new block floating in the network diff --git a/p2p/bc_notify_new_transactions.go b/p2p/bc_notify_new_transactions.go index 7638c27..cdaaec6 100644 --- a/p2p/bc_notify_new_transactions.go +++ b/p2p/bc_notify_new_transactions.go @@ -20,8 +20,8 @@ import "bytes" import "github.com/romana/rlog" -//import "github.com/deroproject/derosuite/blockchain" -import "github.com/deroproject/derosuite/transaction" +//import "github.com/arnaucode/derosuite/blockchain" +import "github.com/arnaucode/derosuite/transaction" // if the incoming blob contains block with included transactions //00009F94 01 11 01 01 01 01 02 01 01 08 06 62 6c 6f 63 6b ........ ...block diff --git a/p2p/bc_notify_request_chain_handler.go b/p2p/bc_notify_request_chain_handler.go index 2fb2321..0010508 100644 --- a/p2p/bc_notify_request_chain_handler.go +++ b/p2p/bc_notify_request_chain_handler.go @@ -18,8 +18,8 @@ package p2p import "github.com/romana/rlog" -import "github.com/deroproject/derosuite/globals" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/globals" +import "github.com/arnaucode/derosuite/crypto" // when 2 peers communiate either both are in sync or async // if async, reply to the request below, with your state and other will supply you list of block ids diff --git a/p2p/bc_notify_request_getobjects.go b/p2p/bc_notify_request_getobjects.go index 7eff00c..b8aa34e 100644 --- a/p2p/bc_notify_request_getobjects.go +++ b/p2p/bc_notify_request_getobjects.go @@ -22,8 +22,8 @@ import "encoding/binary" import "github.com/romana/rlog" -import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/block" +import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/block" // The peer triggers this it wants some blocks or txs func Handle_BC_Notify_Request_GetObjects(connection *Connection, diff --git a/p2p/bc_notify_response_chain_handler.go b/p2p/bc_notify_response_chain_handler.go index 5a05e19..8ebda7d 100644 --- a/p2p/bc_notify_response_chain_handler.go +++ b/p2p/bc_notify_response_chain_handler.go @@ -21,8 +21,8 @@ import "encoding/binary" import "github.com/romana/rlog" -import "github.com/deroproject/derosuite/globals" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/globals" +import "github.com/arnaucode/derosuite/crypto" /* the data structure which needs to be serialised is defined in cryptonote_protocol_defs.h * struct request diff --git a/p2p/bc_notify_response_get_objects.go b/p2p/bc_notify_response_get_objects.go index 6085849..a57b3a7 100644 --- a/p2p/bc_notify_response_get_objects.go +++ b/p2p/bc_notify_response_get_objects.go @@ -21,10 +21,10 @@ import "bytes" import "github.com/romana/rlog" import log "github.com/sirupsen/logrus" -import "github.com/deroproject/derosuite/block" +import "github.com/arnaucode/derosuite/block" -//import "github.com/deroproject/derosuite/blockchain" -import "github.com/deroproject/derosuite/transaction" +//import "github.com/arnaucode/derosuite/blockchain" +import "github.com/arnaucode/derosuite/transaction" // if the incoming blob contains block with included transactions //00009F94 01 11 01 01 01 01 02 01 01 08 06 62 6c 6f 63 6b ........ ...block diff --git a/p2p/command_handler_p2p_handshake.go b/p2p/command_handler_p2p_handshake.go index b628c66..b86cfae 100644 --- a/p2p/command_handler_p2p_handshake.go +++ b/p2p/command_handler_p2p_handshake.go @@ -23,7 +23,7 @@ import "time" import "github.com/romana/rlog" import log "github.com/sirupsen/logrus" -import "github.com/deroproject/derosuite/globals" +import "github.com/arnaucode/derosuite/globals" // the connection starts with P2P handshake diff --git a/p2p/connection_pool.go b/p2p/connection_pool.go index 455b537..22bba85 100644 --- a/p2p/connection_pool.go +++ b/p2p/connection_pool.go @@ -27,7 +27,7 @@ import "container/list" import log "github.com/sirupsen/logrus" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto" // any connection incoming/outgoing can only be in this state type Conn_State string diff --git a/p2p/controller.go b/p2p/controller.go index 07fb84f..0983e89 100644 --- a/p2p/controller.go +++ b/p2p/controller.go @@ -22,8 +22,8 @@ import "sync/atomic" import log "github.com/sirupsen/logrus" -import "github.com/deroproject/derosuite/globals" -import "github.com/deroproject/derosuite/blockchain" +import "github.com/arnaucode/derosuite/globals" +import "github.com/arnaucode/derosuite/blockchain" var chain *blockchain.Blockchain // external reference to chain diff --git a/p2p/levin.go b/p2p/levin.go index c94ab97..8cbaf8d 100644 --- a/p2p/levin.go +++ b/p2p/levin.go @@ -28,7 +28,7 @@ import "runtime/debug" import "github.com/romana/rlog" import log "github.com/sirupsen/logrus" -import "github.com/deroproject/derosuite/globals" +import "github.com/arnaucode/derosuite/globals" // all communications flow in little endian const LEVIN_SIGNATURE = 0x0101010101012101 //Bender's nightmare diff --git a/p2pv2/connection_pool.go b/p2pv2/connection_pool.go index 8dcf964..ad79c5c 100644 --- a/p2pv2/connection_pool.go +++ b/p2pv2/connection_pool.go @@ -27,7 +27,7 @@ import "container/list" import log "github.com/sirupsen/logrus" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto" // any connection incoming/outgoing can only be in this state type Conn_State string diff --git a/p2pv2/controller.go b/p2pv2/controller.go index 1c1d01e..14a5c5e 100644 --- a/p2pv2/controller.go +++ b/p2pv2/controller.go @@ -22,8 +22,8 @@ import "sync/atomic" import log "github.com/sirupsen/logrus" -import "github.com/deroproject/derosuite/globals" -import "github.com/deroproject/derosuite/blockchain" +import "github.com/arnaucode/derosuite/globals" +import "github.com/arnaucode/derosuite/blockchain" var chain *blockchain.Blockchain // external reference to chain diff --git a/p2pv2/peer.go b/p2pv2/peer.go index b2a1472..6534198 100644 --- a/p2pv2/peer.go +++ b/p2pv2/peer.go @@ -25,10 +25,10 @@ import "time" //import log "github.com/sirupsen/logrus" import "github.com/vmihailenco/msgpack" -//import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/globals" +//import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/globals" -//import "github.com/deroproject/derosuite/blockchain" +//import "github.com/arnaucode/derosuite/blockchain" // This file defines what all needs to be responded to become a server ( handling incoming requests) diff --git a/storage/boltdb.go b/storage/boltdb.go index 7ca1c13..d16626a 100644 --- a/storage/boltdb.go +++ b/storage/boltdb.go @@ -30,7 +30,7 @@ import "github.com/romana/rlog" import bolt "github.com/coreos/bbolt" import log "github.com/sirupsen/logrus" -import "github.com/deroproject/derosuite/globals" +import "github.com/arnaucode/derosuite/globals" type BoltStore struct { DB *bolt.DB diff --git a/storage/goleveldb.go b/storage/goleveldb.go index 512599c..dc63a9d 100644 --- a/storage/goleveldb.go +++ b/storage/goleveldb.go @@ -31,7 +31,7 @@ import "github.com/syndtr/goleveldb/leveldb" import "github.com/syndtr/goleveldb/leveldb/opt" import log "github.com/sirupsen/logrus" -import "github.com/deroproject/derosuite/globals" +import "github.com/arnaucode/derosuite/globals" type BoltStore struct { DB *leveldb.DB diff --git a/toHaveInMind.md b/toHaveInMind.md new file mode 100644 index 0000000..8b73a64 --- /dev/null +++ b/toHaveInMind.md @@ -0,0 +1,11 @@ +- blockchain is stored in a boltdb, in tmp/derod_database.db + +- the seeds are hardcoded in derosuite/p2p/controller.go, line 61: +```go +// add hard-coded seeds +end_point_list = append(end_point_list, "212.8.242.60:18090") +``` +And also can be setted in the parameter: +``` +derod --add-exclusive-node +``` diff --git a/transaction/transaction.go b/transaction/transaction.go index 9bc024a..5a6ea92 100644 --- a/transaction/transaction.go +++ b/transaction/transaction.go @@ -22,8 +22,8 @@ import "encoding/binary" import "github.com/romana/rlog" -import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/crypto/ringct" +import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto/ringct" const TXIN_GEN = byte(0xff) const TXIN_TO_SCRIPT = byte(0) diff --git a/transaction/transaction_extra.go b/transaction/transaction_extra.go index 1affb34..d8b7b86 100644 --- a/transaction/transaction_extra.go +++ b/transaction/transaction_extra.go @@ -23,7 +23,7 @@ import "bytes" import "github.com/romana/rlog" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto" // refer https://cryptonote.org/cns/cns005.txt to understand slightly more ( it DOES NOT cover everything) // much of these constants are understood from tx_extra.h and cryptonote_format_utils.cpp diff --git a/transaction/transaction_extra_test.go b/transaction/transaction_extra_test.go index c77a24a..adf86e0 100644 --- a/transaction/transaction_extra_test.go +++ b/transaction/transaction_extra_test.go @@ -20,7 +20,7 @@ import "fmt" import "testing" import "encoding/hex" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto" func Test_Normal_PaymentID_parsing(t *testing.T) { diff --git a/transaction/transaction_ringct_test.go b/transaction/transaction_ringct_test.go index 58fefd5..8ec75a7 100644 --- a/transaction/transaction_ringct_test.go +++ b/transaction/transaction_ringct_test.go @@ -21,7 +21,7 @@ import "bytes" import "testing" import "encoding/hex" -import "github.com/deroproject/derosuite/crypto/ringct" +import "github.com/arnaucode/derosuite/crypto/ringct" // the tests are here because data depends on tx which is currently part of blockchain // once a new Transaction package is created, these test can move directly to ringct package without major modification diff --git a/transaction/transaction_test.go b/transaction/transaction_test.go index 86ae333..4ab98ba 100644 --- a/transaction/transaction_test.go +++ b/transaction/transaction_test.go @@ -20,7 +20,7 @@ import "fmt" import "testing" import "encoding/hex" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto" // parse the tx and verify func Test_Genesis_Tx(t *testing.T) { diff --git a/walletapi/mnemonics/mnemonics.go b/walletapi/mnemonics/mnemonics.go index 1e22428..da741e2 100644 --- a/walletapi/mnemonics/mnemonics.go +++ b/walletapi/mnemonics/mnemonics.go @@ -25,7 +25,7 @@ import "unicode/utf8" import "hash/crc32" -import "github.com/deroproject/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto" type Language struct { Name string // Name of the language diff --git a/walletapi/wallet.go b/walletapi/wallet.go index 32d9541..7276fe0 100644 --- a/walletapi/wallet.go +++ b/walletapi/wallet.go @@ -19,13 +19,13 @@ package walletapi import "fmt" import "sync" -import "github.com/deroproject/derosuite/config" -import "github.com/deroproject/derosuite/crypto" -import "github.com/deroproject/derosuite/crypto/ringct" -import "github.com/deroproject/derosuite/globals" -import "github.com/deroproject/derosuite/walletapi/mnemonics" -import "github.com/deroproject/derosuite/address" -import "github.com/deroproject/derosuite/blockchain/inputmaturity" +import "github.com/arnaucode/derosuite/config" +import "github.com/arnaucode/derosuite/crypto" +import "github.com/arnaucode/derosuite/crypto/ringct" +import "github.com/arnaucode/derosuite/globals" +import "github.com/arnaucode/derosuite/walletapi/mnemonics" +import "github.com/arnaucode/derosuite/address" +import "github.com/arnaucode/derosuite/blockchain/inputmaturity" type _Keys struct { Spendkey_Secret crypto.Key