go

module
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2019 License: Apache-2.0

README

Aurora setup

To build aurora you must have go and dep in your ubuntu enivironment. To install go you need to perform below steps and go version must be >=1.9

Install go

PATH="$HOME/bin:$HOME/.local/bin:$PATH"
export GOPATH=$HOME/go
export PATH=${GOPATH}/bin:${PATH}
and save the file
  • Open vi .bashrc and add following lines
eval "$(direnv hook bash)"
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
  • To refresh the files execute following commands:
source ~/.profile
source  ~/.bashrc
  • Check go version
$ go version

Install dep

$ dep version

Install aurora

  • mkdir github.com/hcnet in /home/ubuntu/go/src
  • go to /home/ubuntu/go/src/github.com/hcnet and execute following command:
  • git clone https://github.com/HashCash-Consultants/go.git
  • go to /home/ubuntu/go/src/github.com/hcnet /go and execute following command:
$ sudo apt-get install mercurial
$ dep ensure –v
  • go to /home/ubuntu/go/src and execute following command:
$ go install -ldflags "-X github.com/hcnet/go/support/app.version=aurora-0.16.0" github.com/hcnet/go/services/aurora/
  • after running above command you check aurora build in <Your_dir>/go/bin folder and you can check aurora version by following command :
$ ./aurora version

Aurora database setup

  • Create a user for HC Net aurora database.
$ sudo -s
$ su – postgres
$ createuser <username> --pwprompt
$ Enter password for new role: <Enter password>
$ Enter it again: <Enter the pwd again>
  • You need to add Aurora user. Exit from postgres and login as root user and execute following command.
$ exit
$ adduser <username>;
  • To verify if user is created, execute following commands
$ su - postgres
$ psql
$ \du
  • Create a blank database using following command.
 $ CREATE DATABASE <DB_NAME> OWNER <user created>;

Initialize aurora

  • Initialize aurora with database login as root user and Go “go/bin” using following command
 $ export DATABASE_URL="postgresql://define aurora db username:define aurora db user password@localhost/define aurora database name"
  • After that Go “go/bin” and execute following command
$ ./aurora db init

Aurora up command

  • Go “go/bin” execute following command
$ sudo nohup ./aurora --db-url="postgresql://define aurora db username:define aurora db user password @localhost/define aurora database name" --hcnet-core-db-url="postgresql://define Node1 database username:define Node1 database user password@localhost/define Node1 database name" --hcnet-core-url="http://localhost:11626" --network-passphrase="define Network password" --ingest="true" --per-hour-rate-limit=540000000 &

Directories

Path Synopsis
Package address provides utility functions for working with hcnet addresses.
Package address provides utility functions for working with hcnet addresses.
Package amount provides utilities for converting numbers to/from the format used internally to hcnet-core.
Package amount provides utilities for converting numbers to/from the format used internally to hcnet-core.
Package build implements a builder system for constructing various xdr structures used by the hcnet network, most importanly transactions.
Package build implements a builder system for constructing various xdr structures used by the hcnet network, most importanly transactions.
Package clients contains sub-packages that provide client access to the various hcnet services.
Package clients contains sub-packages that provide client access to the various hcnet services.
aurora
Package aurora is DEPRECATED in favour of clients/auroraclient! It used to provide client access to a aurora server, allowing an application to post transactions and lookup ledger information.
Package aurora is DEPRECATED in favour of clients/auroraclient! It used to provide client access to a aurora server, allowing an application to post transactions and lookup ledger information.
auroraclient
Package auroraclient provides client access to a Aurora server, allowing an application to post transactions and look up ledger information.
Package auroraclient provides client access to a Aurora server, allowing an application to post transactions and look up ledger information.
hcnetcore
Package hcnetcore is a client library for communicating with an instance of hcnet-core using through the server's HTTP port.
Package hcnetcore is a client library for communicating with an instance of hcnet-core using through the server's HTTP port.
Package crc16 is implementation according to CCITT standards.
Package crc16 is implementation according to CCITT standards.
examples
exp
Package exp houses experimental packages related to HcNet developement
Package exp houses experimental packages related to HcNet developement
crypto/derivation
Package derivation provides functions for ed25519 key derivation as described in: https://github.com/satoshilabs/slips/blob/master/slip-0010.md
Package derivation provides functions for ed25519 key derivation as described in: https://github.com/satoshilabs/slips/blob/master/slip-0010.md
ingest/processors
processors package contains the most commonly used processors.
processors package contains the most commonly used processors.
support/pipeline
TODO explain here how to write wrappers to use without casting from `interface{}`.
TODO explain here how to write wrappers to use without casting from `interface{}`.
handlers
federation
Package federation provides a pluggable handler that satisfies the HcNet federation protocol.
Package federation provides a pluggable handler that satisfies the HcNet federation protocol.
Package meta provides helpers for processing the metadata that is produced by hcnet-core while processing transactions.
Package meta provides helpers for processing the metadata that is produced by hcnet-core while processing transactions.
Package network contains functions that deal with hcnet network passphrases and IDs.
Package network contains functions that deal with hcnet network passphrases and IDs.
Package price implements functions to ease working with hcnet price values.
Package price implements functions to ease working with hcnet price values.
protocols
aurora
Package aurora contains the type definitions for all of aurora's response resources.
Package aurora contains the type definitions for all of aurora's response resources.
Package services contains sub-packages that provide long-running applications such as API servers.
Package services contains sub-packages that provide long-running applications such as API servers.
aurora/internal/actions
Package actions provides the infrastructure for defining and executing actions (code that is triggered in response to an client request) on aurora.
Package actions provides the infrastructure for defining and executing actions (code that is triggered in response to an client request) on aurora.
aurora/internal/assets
Package assets is a simple helper package to help convert to/from xdr.AssetType values
Package assets is a simple helper package to help convert to/from xdr.AssetType values
aurora/internal/codes
Package codes is a helper package to help convert to transaction and operation result codes to strings used in aurora.
Package codes is a helper package to help convert to transaction and operation result codes to strings used in aurora.
aurora/internal/db2
Package db2 is the replacement for db.
Package db2 is the replacement for db.
aurora/internal/db2/core
Package core contains database record definitions useable for reading rows from a HcNet Core db
Package core contains database record definitions useable for reading rows from a HcNet Core db
aurora/internal/db2/history
Package history contains database record definitions useable for reading rows from a the history portion of aurora's database
Package history contains database record definitions useable for reading rows from a the history portion of aurora's database
aurora/internal/db2/sqx
Package sqx contains utilities and extensions for the squirrel package which is used by aurora to generate sql statements.
Package sqx contains utilities and extensions for the squirrel package which is used by aurora to generate sql statements.
aurora/internal/expingest
Package expingest contains the new ingestion system for aurora.
Package expingest contains the new ingestion system for aurora.
aurora/internal/hchi
Package hchi provides functions to support embedded and retrieving a request id from a go context tree
Package hchi provides functions to support embedded and retrieving a request id from a go context tree
aurora/internal/ingest
Package ingest contains the ingestion system for aurora.
Package ingest contains the ingestion system for aurora.
aurora/internal/ingest/participants
Package participants contains functions to derive a set of "participant" addresses for various data structures in the HcNet network's ledger.
Package participants contains functions to derive a set of "participant" addresses for various data structures in the HcNet network's ledger.
aurora/internal/ledger
Package ledger provides useful utilities concerning ledgers within hcnet, specifically as a central location to store a cached snapshot of the state of both aurora's and hcnet-core's views of the ledger.
Package ledger provides useful utilities concerning ledgers within hcnet, specifically as a central location to store a cached snapshot of the state of both aurora's and hcnet-core's views of the ledger.
aurora/internal/operationfeestats
Package operationfeestats provides useful utilities concerning operation fee stats within hcnet,specifically as a central location to store a cached snapshot of the state of network per operation fees and surge pricing.
Package operationfeestats provides useful utilities concerning operation fee stats within hcnet,specifically as a central location to store a cached snapshot of the state of network per operation fees and surge pricing.
aurora/internal/paths
Package paths provides utilities and facilities for payment paths as needed by aurora.
Package paths provides utilities and facilities for payment paths as needed by aurora.
aurora/internal/reap
Package reap contains the history reaping subsystem for aurora.
Package reap contains the history reaping subsystem for aurora.
aurora/internal/render/sse
This package contains the Server Sent Events implementation used by aurora.
This package contains the Server Sent Events implementation used by aurora.
aurora/internal/simplepath
Package simplepath provides an implementation of paths.
Package simplepath provides an implementation of paths.
aurora/internal/test
Package test contains simple test helpers that should not have any dependencies on aurora's packages.
Package test contains simple test helpers that should not have any dependencies on aurora's packages.
aurora/internal/test/db
Package db provides helpers to connect to test databases.
Package db provides helpers to connect to test databases.
aurora/internal/test/trades
Common infrastructure for testing Trades
Common infrastructure for testing Trades
aurora/internal/txsub
Package txsub provides the machinery that aurora uses to submit transactions to the hcnet network and track their progress.
Package txsub provides the machinery that aurora uses to submit transactions to the hcnet network and track their progress.
aurora/internal/txsub/results/db
Package results provides an implementation of the txsub.ResultProvider interface backed using the SQL databases used by both hcnet core and aurora
Package results provides an implementation of the txsub.ResultProvider interface backed using the SQL databases used by both hcnet core and aurora
aurora/internal/txsub/sequence
Package sequence providers helpers to manage sequence numbers on behalf of aurora clients.
Package sequence providers helpers to manage sequence numbers on behalf of aurora clients.
aurora/internal/utf8
Package utf8 contains utilities for working with utf8 data.
Package utf8 contains utilities for working with utf8 data.
bifrost/stress
Structs and functions used in stress tests
Structs and functions used in stress tests
internal/bridge-compliance-shared/protocols
Contains structs shared between bridge and compliance servers
Contains structs shared between bridge and compliance servers
Package strkey is an implementation of StrKey, the address scheme for the HcNetNetwork.
Package strkey is an implementation of StrKey, the address scheme for the HcNetNetwork.
support
app
Package app provides vars that can be populated via "-X" linker flags to provide global application metadata, such as build time or version.
Package app provides vars that can be populated via "-X" linker flags to provide global application metadata, such as build time or version.
config
Package config provides a common infrastructure for reading configuration data stored in local TOML files.
Package config provides a common infrastructure for reading configuration data stored in local TOML files.
db
Package db is the base package for database access at hcnet.
Package db is the base package for database access at hcnet.
db/dbtest
Package dbtest is a package to ease the pain of developing test code that works against external databases.
Package dbtest is a package to ease the pain of developing test code that works against external databases.
db/sqlutils
Package sqlutils contains utility functions for manipulating strings of SQL
Package sqlutils contains utility functions for manipulating strings of SQL
env
errors
Package errors provides the common infrastructure for managing errors.
Package errors provides the common infrastructure for managing errors.
http
Package http provides easy access to HcNet's best practices for building http servers.
Package http provides easy access to HcNet's best practices for building http servers.
http/httptest
Package httptest enhances the stdlib net/http/httptest package by integrating it with gopkg.in/gavv/httpexpect.v1, reducing the boilerplate needed for http tests.
Package httptest enhances the stdlib net/http/httptest package by integrating it with gopkg.in/gavv/httpexpect.v1, reducing the boilerplate needed for http tests.
http/mutil
Package mutil contains various functions that are helpful when writing http middleware.
Package mutil contains various functions that are helpful when writing http middleware.
log
Package log provides the common logging facilities used by the HcNet Development foundation.
Package log provides the common logging facilities used by the HcNet Development foundation.
test
Package test contains simple test helpers that should not have any service-specific dependencies.
Package test contains simple test helpers that should not have any service-specific dependencies.
url
tools
hcnet-sign
hcnet-sign is a small interactive utility to help you contribute a signature to a transaction envelope.
hcnet-sign is a small interactive utility to help you contribute a signature to a transaction envelope.
Package txnbuild implements transactions and operations on the HcNet network.
Package txnbuild implements transactions and operations on the HcNet network.
cmd/demo
Demo is an interactive demonstration of the Go SDK using the HcNet TestNet.
Demo is an interactive demonstration of the Go SDK using the HcNet TestNet.
cmd/demo/operations
Package demo is an interactive demonstration of the Go SDK using the HcNet TestNet.
Package demo is an interactive demonstration of the Go SDK using the HcNet TestNet.
exampleauroraclient
Package exampleauroraclient provides a dummy client for use with the GoDoc examples.
Package exampleauroraclient provides a dummy client for use with the GoDoc examples.
Package xdr contains the generated code for parsing the xdr structures used for hcnet.
Package xdr contains the generated code for parsing the xdr structures used for hcnet.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL