OG

module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2020 License: Apache-2.0

README

OG

OG is a dag based decentralized ledger and Dapp platform.

Insatallation

Get code from github:

go get github.com/annchain/OG

Build the project:

cd $GOPATH/src/github.com/annchain/OG

make og

The node will be built in build directory

Running

# running og by loading config file from local filesystem :
./og -c config.toml  run

# running og by loading config file from remote http server :
./og -c http://127.0.0.1:8532/og_config run

# running og by assigning log output path:
./og -c config.toml -l log_path/ run

Other og commands:

-c, --config string         Path for configuration file or url of config server (default "config.toml")
-d, --datadir string        Runtime directory for storage and configurations (default "data")
-h, --help                  help for OG
-l, --log_dir string        Path for configuration file. Not enabled by default
-v, --log_level string      Logging verbosity, possible values:[panic, fatal, error, warn, info, debug] (default "debug")
-n, --log_line_number       write log with line number
-s, --log_stdout            Whether the log will be printed to stdout
-m, --multifile_by_level    split log into multiple files by level
-M, --multifile_by_module   split log into multiple files by module

Usage

RPC

Users can call the node's functions through RPC interface. The default URL address for RPC is localhost:8000, which is set in the default config file. You can switch the port by changing the value of key [rpc].port in config file.

For more details of each RPC API, you can check document: https://github.com/annchain/OG/blob/dev/rpc/doc.md

Development

Please be aware that OG is under heavy refactor(under layer-p2p).

License

Directories

Path Synopsis
app
cmd
cmd
httplib
Package httplib is used as http.Client Usage: import "github.com/astaxie/beego/httplib" b := httplib.Post("http://beego.me/") b.Param("username","astaxie") b.Param("password","123456") b.PostFile("uploadfile1", "httplib.pdf") b.PostFile("uploadfile2", "httplib.txt") str, err := b.String() if err != nil { t.Fatal(err) } fmt.Println(str) more docs http://beego.me/docs/module/httplib.md
Package httplib is used as http.Client Usage: import "github.com/astaxie/beego/httplib" b := httplib.Post("http://beego.me/") b.Param("username","astaxie") b.Param("password","123456") b.PostFile("uploadfile1", "httplib.pdf") b.PostFile("uploadfile2", "httplib.txt") str, err := b.String() if err != nil { t.Fatal(err) } fmt.Println(str) more docs http://beego.me/docs/module/httplib.md
Package common contains various helper functions.
Package common contains various helper functions.
bitutil
Package bitutil implements fast bitwise operations.
Package bitutil implements fast bitwise operations.
crypto/bn256
Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.
Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.
crypto/bn256/cloudflare
Package bn256 implements a particular bilinear group at the 128-bit security level.
Package bn256 implements a particular bilinear group at the 128-bit security level.
crypto/bn256/google
Package bn256 implements a particular bilinear group.
Package bn256 implements a particular bilinear group.
crypto/secp256k1
Package secp256k1 wraps the bitcoin secp256k1 C library.
Package secp256k1 wraps the bitcoin secp256k1 C library.
hexutil
Package hexutil implements hex encoding with 0x prefix.
Package hexutil implements hex encoding with 0x prefix.
io
mclock
Package mclock is a wrapper for a monotonic clock source
Package mclock is a wrapper for a monotonic clock source
consensus
cmd
Go port of Coda Hale's Metrics library <https://github.com/rcrowley/go-metrics> Coda Hale's original work: <https://github.com/codahale/metrics>
Go port of Coda Hale's Metrics library <https://github.com/rcrowley/go-metrics> Coda Hale's original work: <https://github.com/codahale/metrics>
exp
Hook go-metrics into expvar on any /debug/metrics request, load all vars from the registry into expvar, and execute regular expvar handler
Hook go-metrics into expvar on any /debug/metrics request, load all vars from the registry into expvar, and execute regular expvar handler
og
fetcher
Package fetcher contains the sequencer announcement based synchronisation.
Package fetcher contains the sequencer announcement based synchronisation.
p2p
discv5
Package discv5 implements the RLPx v5 Topic Discovery Protocol.
Package discv5 implements the RLPx v5 Topic Discovery Protocol.
dns
enr
Package enr implements Ethereum Node Records as defined in EIP-778.
Package enr implements Ethereum Node Records as defined in EIP-778.
nat
Package nat provides access to common network port mapping protocols.
Package nat provides access to common network port mapping protocols.
netutil
Package netutil contains extensions to the net package.
Package netutil contains extensions to the net package.
poc
dkg
ed25519
Package edwards25519 implements operations in GF(2**255-19) and on an Edwards curve that is isomorphic to curve25519.
Package edwards25519 implements operations in GF(2**255-19) and on an Edwards curve that is isomorphic to curve25519.
vrf
Package trie implements Merkle Patricia Tries.
Package trie implements Merkle Patricia Tries.
msg
vm
eth/common
Package common contains various helper functions.
Package common contains various helper functions.
eth/common/hexutil
Package hexutil implements hex encoding with 0x prefix.
Package hexutil implements hex encoding with 0x prefix.
eth/common/math
Package math provides integer math utilities.
Package math provides integer math utilities.
eth/core/vm
Package vm implements the Ethereum Virtual Machine.
Package vm implements the Ethereum Virtual Machine.
eth/rlp
Package rlp implements the RLP serialization format.
Package rlp implements the RLP serialization format.
ovm

Jump to

Keyboard shortcuts

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