Official golang implementation of the Ethereum-based Glyff protocol.
Building from source
For prerequisites and detailed build instructions please read the official Glyff-node Installation Instructions on the wiki. Additionally, glyff depends on JPMorgan Chase's ZSL on Quorum, with its own set of build requirements.
Building glyff requires both a Go (version 1.10) and a C/++ compiler. You can install them using your favourite package manager. Once the dependencies are installed, run
The glyff project executable is found in the
||Our main Glyff CLI client. It is the entry point into the Glyff network (main- and test net), capable of running as a full archive node. It can be used by other processes as a gateway into the Glyff network via JSON RPC endpoints exposed on top of HTTP, WebSocket and/or IPC transports.
Full node on the Glyff private testnet
At present, Glyff runs as a private testnet, which means partecipants have to be whitelisted before connecting to the official seed nodes. Request access to the private testnet here.
Glyff private testnet works with toy funds, i.e. coins mined or received will have NO real-world value.
To enable simple interaction withe Glyff private testnet, such as : create accounts; transfer funds; deploy and interact with contracts. For this particular use-case the user doesn't care about years-old historical data, so we can fast-sync quickly to the current state of the network. To do so:
$ glyff console
This command will:
- Start glyff in fast sync mode (default, can be changed with the
--syncmodeflag), causing it to download more data in exchange for avoiding processing the entire history of the Glyff network, which is very CPU intensive.
(via the trailing
consolesubcommand) through which you can invoke all official
web3methods as well as Glyff's own management APIs. This too is optional and if you leave it out you can always attach to an already running Glyff instance with
As an alternative to passing the numerous flags to the
glyff binary, you can also pass a configuration file via:
$ glyff --config /path/to/your_config.toml
To get an idea how the file should look like you can use the
dumpconfig subcommand to export your existing configuration:
$ glyff --your-favourite-flags dumpconfig
Docker quick start
One of the quickest ways to get Glyff up and running on your machine is by using Docker:
docker build -t glyff-node /home/user/glyff-node
docker run -it glyff-node
This will start glyff in fast-sync mode with a DB memory allowance of 1GB just as the above command does. It will also create a persistent volume in your home directory for saving your blockchain as well as map the default ports.
Do not forget
--rpcaddr 0.0.0.0, if you want to access RPC from other containers and/or hosts. By default,
glyff binds to the local interface and RPC endpoints is not accessible from the outside.
Programatically interfacing Glyff nodes
As a developer, sooner rather than later you'll want to start interacting with Glyff and the Glyff network via your own programs and not manually through the console. To aid this, Glyff has built in support for a JSON-RPC based APIs (standard APIs and Glyff specific APIs). These can be exposed via HTTP, WebSockets and IPC (unix sockets on unix based platforms, and named pipes on Windows).
The IPC interface is enabled by default and exposes all the APIs supported by Glyff, whereas the HTTP and WS interfaces need to manually be enabled and only expose a subset of APIs due to security reasons. These can be turned on/off and configured as you'd expect.
HTTP based JSON-RPC API options:
--rpcEnable the HTTP-RPC server
--rpcaddrHTTP-RPC server listening interface (default: "localhost")
--rpcportHTTP-RPC server listening port (default: 8545)
--rpcapiAPI's offered over the HTTP-RPC interface (default: "eth,net,web3,zsl")
--rpccorsdomainComma separated list of domains from which to accept cross origin requests (browser enforced)
--wsEnable the WS-RPC server
--wsaddrWS-RPC server listening interface (default: "localhost")
--wsportWS-RPC server listening port (default: 8546)
--wsapiAPI's offered over the WS-RPC interface (default: "eth,net,web3,zsl")
--wsoriginsOrigins from which to accept websockets requests
--ipcdisableDisable the IPC-RPC server
--ipcapiAPI's offered over the IPC-RPC interface (default: "admin,debug,eth,miner,net,personal,shh,txpool,web3")
--ipcpathFilename for IPC socket/pipe within the datadir (explicit paths escape it)
You'll need to use your own programming environments' capabilities (libraries, tools, etc) to connect via HTTP, WS or IPC to a Glyff node configured with the above flags and you'll need to speak JSON-RPC on all transports. You can reuse the same connection for multiple requests!
Note: Please understand the security implications of opening up an HTTP/WS based transport before doing so! Hackers on the internet are actively trying to subvert Glyff nodes with exposed APIs! Further, all browser tabs can access locally running webservers, so malicious webpages could try to subvert locally available APIs!
Thank you for considering to help out with the source code! We welcome contributions from anyone on the internet, and are grateful for even the smallest of fixes!
If you'd like to contribute to glyff, please fork, fix, commit and send a pull request for the maintainers to review and merge into the main code base. If you wish to submit more complex changes though, please check up with the core devs first on our gitter channel to ensure those changes are in line with the general philosophy of the project and/or get some early feedback which can make both your efforts much lighter as well as our review and merge procedures quick and simple.
Please make sure your contributions adhere to our coding guidelines:
- Code must adhere to the official Go formatting guidelines (i.e. uses gofmt).
- Code must be documented adhering to the official Go commentary guidelines.
- Pull requests need to be based on and opened against the
- Commit messages should be prefixed with the package(s) they modify.
- E.g. "eth, rpc: make trace configs optional"
Please see the Developers' Guide for more details on configuring your environment, managing project dependencies and testing procedures.
Glyff is a fork of the Go-Ethereum client and library.
The glyff library (i.e. all code outside of the
cmd directory) is licensed under the
GNU Lesser General Public License v3.0, also
included in our repository in the
The glyff binaries (i.e. all code inside of the
cmd directory) is licensed under the
GNU General Public License v3.0, also included
in our repository in the