Syscoin Core Archives - Justin Silver https://www.justinsilver.com/tag/syscoin-core/ Technology, Travel, and Pictures Mon, 17 Dec 2018 14:21:33 +0000 en-US hourly 1 https://wordpress.org/?v=6.0.1 https://www.justinsilver.com/wp-content/uploads/2013/06/cropped-apple-touch-icon-160x160.png Syscoin Core Archives - Justin Silver https://www.justinsilver.com/tag/syscoin-core/ 32 32 Syscoin + ZMQ + Node.js = Realtime Blockchain Updates! https://www.justinsilver.com/technology/cryptocurrency/syscoin-zmq-node-js-realtime-blockchain/?utm_source=rss&utm_medium=rss&utm_campaign=syscoin-zmq-node-js-realtime-blockchain https://www.justinsilver.com/technology/cryptocurrency/syscoin-zmq-node-js-realtime-blockchain/#respond Fri, 13 Jul 2018 05:03:20 +0000 https://www.justinsilver.com/?p=4639 Realtime Updates from the Syscoin Blockchain You can use the ZMQ topic message queues in Syscoin to receive realtime updates for your application. Using in conjunction with syscoin-core to blockchain-enable your applications in no...

The post Syscoin + ZMQ + Node.js = Realtime Blockchain Updates! appeared first on Justin Silver.

]]>
AmpedSense.OptimizeAdSpot('AP'); AmpedSense.OptimizeAdSpot('IL'); AmpedSense.OptimizeAdSpot('IR');

Realtime Updates from the Syscoin Blockchain

You can use the ZMQ topic message queues in Syscoin to receive realtime updates for your application. Using in conjunction with syscoin-core to blockchain-enable your applications in no time.

Syscoin Configuration

Make sure to enable the ZMQ listeners in your syscoin.conf file and restart syscoind or Syscoin Core Qt.

# server
server=1
daemon=1

# indexes
addressindex=1
txindex=1
litemode=0

# rpc
rpcuser=u
rpcpassword=p
rpcport=8370
rpcallowip=127.0.0.1

# zmq listener config
zmqpubaliasrecord=tcp://127.0.0.1:3030
zmqpubaliashistory=tcp://127.0.0.1:3030
zmqpubaliastxhistory=tcp://127.0.0.1:3030
zmqpubassetrecord=tcp://127.0.0.1:3030
zmqpubassetallocation=tcp://127.0.0.1:3030
zmqpubassethistory=tcp://127.0.0.1:3030
zmqpubcertrecord=tcp://127.0.0.1:3030
zmqpubcerthistory=tcp://127.0.0.1:3030
zmqpubescrowrecord=tcp://127.0.0.1:3030
zmqpubescrowbid=tcp://127.0.0.1:3030
zmqpubescrowfeedback=tcp://127.0.0.1:3030
zmqpubofferrecord=tcp://127.0.0.1:3030
zmqpubofferhistory=tcp://127.0.0.1:3030
zmqpubhashblock=tcp://127.0.0.1:3030
zmqpubhashtx=tcp://127.0.0.1:3030
zmqpubhashtxlock=tcp://127.0.0.1:3030
zmqpubrawblock=tcp://127.0.0.1:3030
zmqpubrawtx=tcp://127.0.0.1:3030
zmqpubrawtxlock=tcp://127.0.0.1:3030

Create ZMQ Client

You will need to npm install the module zeromq.

const zeromq = require('zeromq');

const subscriber = zeromq.socket('sub');
subscriber.on('message', async (topic, message) => {
  topic = topic.toString('utf8');
  message = message.toString('utf8')
  const alias = JSON.parse(message);
  console.log(JSON.stringify(alias, null, 2));
});

// connect to message producer
subscriber.connect('tcp://127.0.0.1:3030');
subscriber.subscribe('aliasrecord');
console.log('subscribed to syscoin topic aliasrecord');

Run your script with the following:

> node zmq-client.js 
subscribed to syscoin topic aliasrecord
{
  "_id": "gldm1",
  "address": "SRxK2GjfzTrm8z5PgCtLKzheN5ebd5kN8f",
  "expires_on": 1590601936,
  "encryption_privatekey": "",
  "encryption_publickey": ""
}
{
  "_id": "elatte",
  "address": "Sd8JMHxtuFVSVJN2V51M27S6MkBBMjgjHY",
  "expires_on": 1559077278,
  "encryption_privatekey": "",
  "encryption_publickey": ""
}
{
  "_id": "primitive7",
  "address": "Sk7q3kZcttBNVkUwpMXU59yQf9Pco4sAAJ",
  "expires_on": 1558656041,
  "encryption_privatekey": "",
  "encryption_publickey": ""
}
{
  "_id": "primitive9",
  "address": "SYKff6VzkrzmSn9tL3zZE7FmV2dGFSKfxs",
  "expires_on": 1558656041,
  "encryption_privatekey": "",
  "encryption_publickey": ""
}
// ....

The post Syscoin + ZMQ + Node.js = Realtime Blockchain Updates! appeared first on Justin Silver.

]]>
https://www.justinsilver.com/technology/cryptocurrency/syscoin-zmq-node-js-realtime-blockchain/feed/ 0
Syscoin Core 3.0 Build Scripts https://www.justinsilver.com/technology/cryptocurrency/syscoin-core-3-0-build-scripts/?utm_source=rss&utm_medium=rss&utm_campaign=syscoin-core-3-0-build-scripts https://www.justinsilver.com/technology/cryptocurrency/syscoin-core-3-0-build-scripts/#comments Tue, 15 May 2018 20:24:55 +0000 https://www.justinsilver.com/?p=4487 Build Scripts Use the following commands to compile Syscoin 3.0 on a variety of operating systems. These scripts will prepare your system with the proper build tools and install the necessary libraries and source...

The post Syscoin Core 3.0 Build Scripts appeared first on Justin Silver.

]]>
AmpedSense.OptimizeAdSpot('AP'); AmpedSense.OptimizeAdSpot('IL'); AmpedSense.OptimizeAdSpot('IR');

Build Scripts

Use the following commands to compile Syscoin 3.0 on a variety of operating systems. These scripts will prepare your system with the proper build tools and install the necessary libraries and source code to compile binaries on and for your system.

OSX

Requires Xcode and Homebrew.

# xcode command line tools
xcode-select --install

# update
brew update

# build tools
brew install git automake libtool miniupnpc openssl pkg-config protobuf python qt libevent qrencode librsvg

# boost
brew install boost

# berkeleydb 4.8
brew install berkeley-db@4

# miniupnpc
brew install miniupnpc

# zmq
brew install czmq

# syscoin
git clone https://github.com/syscoin/syscoin.git
cd syscoin
./autogen.sh
./configure
make -j$(sysctl -n hw.ncpu) -pipe
sudo make install

Ubuntu 16.04 LTS x64 Xenial

#!/bin/bash

# required for libdb4.8
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:bitcoin/bitcoin

# update
sudo apt update -y

# build tools
sudo apt install -y git build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3

# boost
sudo apt install -y libboost-all-dev

# berkeleydb 4.8
sudo apt install -y libdb4.8-dev libdb4.8++-dev

# miniupnpc
sudo apt install -y libminiupnpc-dev

# zmq
sudo apt install -y libzmq3-dev

# syscoin
git clone https://github.com/syscoin/syscoin.git
cd syscoin
./autogen.sh
./configure
make -j$(nproc) -pipe
sudo make install

Ubuntu 14.04 LTS x64 Trusty

#!/bin/bash

# required for libdb4.8
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:bitcoin/bitcoin

# update
sudo apt update -y

# build tools
sudo apt install -y git build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 python-dev

# boost 1.65
curl -sL https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz -o boost_1_65_1.tar.gz
tar -xvf boost_1_65_1.tar.gz && pushd boost_1_65_1
./bootstrap.sh
sudo ./b2 cxxflags=-fPIC -a --with=all -j$(nproc) toolset=gcc install
popd

# berkeleydb 4.8
sudo apt install -y libdb4.8-dev libdb4.8++-dev

# miniupnpc
sudo apt install -y libminiupnpc-dev

# zmq
sudo apt install -y libzmq3-dev

# syscoin
git clone https://github.com/syscoin/syscoin.git
cd syscoin
./autogen.sh
# must point to newer boost to prevent conflicts!
./configure --with-boost-libdir="/usr/local/lib/"
make -j$(nproc) -pipe
sudo make install

Debian Stretch

#!/bin/bash

# update
sudo apt update -y

# build tools
sudo apt install -y git build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3

# boost
sudo apt install -y libboost-all-dev

# berkeleydb 4.8 via syscoin contrib
source <(curl https://raw.githubusercontent.com/syscoin/syscoin/master/contrib/install_db4.sh) "$(pwd)"
export BDB_PREFIX="$(pwd)/db4"

# miniupnpc
sudo apt install -y libminiupnpc-dev

# zmq
sudo apt install -y libzmq3-dev
 
# syscoin
git clone https://github.com/syscoin/syscoin.git
cd syscoin
./autogen.sh
./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" 
make -j$(nproc) -pipe
sudo make install

Fedora 22

#!/bin/bash

# update
sudo dnf update -y

# build tools
sudo dnf install -y git gcc-c++ libtool make autoconf automake openssl-devel libevent-devel python3

# boost
sudo dnf install -y boost-devel

# berkeleydb 4.8
sudo dnf install -y libdb4-devel libdb4-cxx-devel

# miniupnpc
sudo dnf install -y miniupnpc-devel

# zmq
sudo dnf install -y czmq-devel

# syscoin
git clone https://github.com/syscoin/syscoin.git
cd syscoin
./autogen.sh
./configure
make -j$(nproc) -pipe
sudo make install

CentOS 7

#!/bin/bash

# update
sudo yum update -y

# build tools
sudo yum install -y git gcc-c++ libtool make autoconf automake epel-release openssl-devel libevent-devel python3 python-devel patch

# boost 1.65
curl -sL https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz -o boost_1_65_1.tar.gz
tar -xvf boost_1_65_1.tar.gz && pushd boost_1_65_1
./bootstrap.sh
sudo ./b2 cxxflags=-fPIC -a --with=all -j$(nproc) toolset=gcc link=static runtime-link=static install
popd

# berkeleydb 4.8 (requires epel-release)
sudo yum install -y libdb4-devel libdb4-cxx-devel

# upnp (requires epel-release)
sudo yum install -y miniupnpc-devel

# zmq  (requires epel-release)
sudo yum install -y czmq-devel
 
# syscoin
git clone https://github.com/syscoin/syscoin.git
cd syscoin
./autogen.sh
./configure
make -j$(nproc) -pipe
sudo make install

The post Syscoin Core 3.0 Build Scripts appeared first on Justin Silver.

]]>
https://www.justinsilver.com/technology/cryptocurrency/syscoin-core-3-0-build-scripts/feed/ 6