{"id":20392305,"url":"https://github.com/wiseplat/go-wiseplat","last_synced_at":"2026-04-16T22:32:02.647Z","repository":{"id":57594122,"uuid":"130061039","full_name":"WISEPLAT/go-wiseplat","owner":"WISEPLAT","description":"Official Go implementation of the Wiseplat protocol","archived":false,"fork":false,"pushed_at":"2018-04-27T15:40:38.000Z","size":8420,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-15T10:26:18.281Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WISEPLAT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2018-04-18T12:46:10.000Z","updated_at":"2023-05-22T19:16:16.000Z","dependencies_parsed_at":"2022-09-13T01:23:11.816Z","dependency_job_id":null,"html_url":"https://github.com/WISEPLAT/go-wiseplat","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WISEPLAT%2Fgo-wiseplat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WISEPLAT%2Fgo-wiseplat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WISEPLAT%2Fgo-wiseplat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WISEPLAT%2Fgo-wiseplat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WISEPLAT","download_url":"https://codeload.github.com/WISEPLAT/go-wiseplat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241941707,"owners_count":20046171,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T03:43:12.680Z","updated_at":"2026-04-16T22:32:02.634Z","avatar_url":"https://github.com/WISEPLAT.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Go Wiseplat\n\nOfficial golang implementation of the Wiseplat protocol.\n\n[![API Reference](\nhttps://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667\n)](https://godoc.org/github.com/wiseplat/go-wiseplat)\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/wiseplat/go-wiseplat?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\nAutomated builds are available for stable releases and the unstable master branch.\nBinary archives are published at https://gwsh.wiseplat.org/downloads/.\n\n## Building the source\n\nFor prerequisites and detailed build instructions please read the\n[Installation Instructions](https://github.com/wiseplat/go-wiseplat/wiki/Building-Wiseplat)\non the wiki.\n\nBuilding gwsh requires both a Go (version 1.7 or later) and a C compiler.\nYou can install them using your favourite package manager.\nOnce the dependencies are installed, run\n\n    make gwsh\n\nor, to build the full suite of utilities:\n\n    make all\n\n## Executables\n\nThe go-wiseplat project comes with several wrappers/executables found in the `cmd` directory.\n\n| Command    | Description |\n|:----------:|-------------|\n| **`gwsh`** | Our main Wiseplat CLI client. It is the entry point into the Wiseplat network (main-, test- or private net), capable of running as a full node (default) archive node (retaining all historical state) or a light node (retrieving data live). It can be used by other processes as a gateway into the Wiseplat network via JSON RPC endpoints exposed on top of HTTP, WebSocket and/or IPC transports. `gwsh --help` and the [CLI Wiki page](https://github.com/wiseplat/go-wiseplat/wiki/Command-Line-Options) for command line options. |\n| `abigen` | Source code generator to convert Wiseplat contract definitions into easy to use, compile-time type-safe Go packages. It operates on plain [Wiseplat contract ABIs](https://github.com/wiseplat/wiki/wiki/Wiseplat-Contract-ABI) with expanded functionality if the contract bytecode is also available. However it also accepts Solidity source files, making development much more streamlined. Please see our [Native DApps](https://github.com/wiseplat/go-wiseplat/wiki/Native-DApps:-Go-bindings-to-Wiseplat-contracts) wiki page for details. |\n| `bootnode` | Stripped down version of our Wiseplat client implementation that only takes part in the network node discovery protocol, but does not run any of the higher level application protocols. It can be used as a lightweight bootstrap node to aid in finding peers in private networks. |\n| `evm` | Developer utility version of the EVM (Wiseplat Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode. Its purpose is to allow isolated, fine-grained debugging of EVM opcodes (e.g. `evm --code 60ff60ff --debug`). |\n| `gwshrpctest` | Developer utility tool to support our [wiseplat/rpc-test](https://github.com/wiseplat/rpc-tests) test suite which validates baseline conformity to the [Wiseplat JSON RPC](https://github.com/wiseplat/wiki/wiki/JSON-RPC) specs. Please see the [test suite's readme](https://github.com/wiseplat/rpc-tests/blob/master/README.md) for details. |\n| `rlpdump` | Developer utility tool to convert binary RLP ([Recursive Length Prefix](https://github.com/wiseplat/wiki/wiki/RLP)) dumps (data encoding used by the Wiseplat protocol both network as well as consensus wise) to user friendlier hierarchical representation (e.g. `rlpdump --hex CE0183FFFFFFC4C304050583616263`). |\n| `swarm`    | swarm daemon and tools. This is the entrypoint for the swarm network. `swarm --help` for command line options and subcommands. See https://swarm-guide.readthedocs.io for swarm documentation. |\n| `puppwsh`    | a CLI wizard that aids in creating a new Wiseplat network. |\n\n## Running gwsh\n\nGoing through all the possible command line flags is out of scope here (please consult our\n[CLI Wiki page](https://github.com/wiseplat/go-wiseplat/wiki/Command-Line-Options)), but we've\nenumerated a few common parameter combos to get you up to speed quickly on how you can run your\nown Gwsh instance.\n\n### Full node on the main Wiseplat network\n\nBy far the most common scenario is people wanting to simply interact with the Wiseplat network:\ncreate accounts; transfer funds; deploy and interact with contracts. For this particular use-case\nthe user doesn't care about years-old historical data, so we can fast-sync quickly to the current\nstate of the network. To do so:\n\n```\n$ gwsh --fast --cache=512 console\n```\n\nThis command will:\n\n * Start gwsh in fast sync mode (`--fast`), causing it to download more data in exchange for avoiding\n   processing the entire history of the Wiseplat network, which is very CPU intensive.\n * Bump the memory allowance of the database to 512MB (`--cache=512`), which can help significantly in\n   sync times especially for HDD users. This flag is optional and you can set it as high or as low as\n   you'd like, though we'd recommend the 512MB - 2GB range.\n * Start up Gwsh's built-in interactive [JavaScript console](https://github.com/wiseplat/go-wiseplat/wiki/JavaScript-Console),\n   (via the trailing `console` subcommand) through which you can invoke all official [`web3` methods](https://github.com/wiseplat/wiki/wiki/JavaScript-API)\n   as well as Gwsh's own [management APIs](https://github.com/wiseplat/go-wiseplat/wiki/Management-APIs).\n   This too is optional and if you leave it out you can always attach to an already running Gwsh instance\n   with `gwsh attach`.\n\n### Full node on the Wiseplat test network\n\nTransitioning towards developers, if you'd like to play around with creating Wiseplat contracts, you\nalmost certainly would like to do that without any real money involved until you get the hang of the\nentire system. In other words, instead of attaching to the main network, you want to join the **test**\nnetwork with your node, which is fully equivalent to the main network, but with play-Wise only.\n\n```\n$ gwsh --testnet --fast --cache=512 console\n```\n\nThe `--fast`, `--cache` flags and `console` subcommand have the exact same meaning as above and they\nare equally useful on the testnet too. Please see above for their explanations if you've skipped to\nhere.\n\nSpecifying the `--testnet` flag however will reconfigure your Gwsh instance a bit:\n\n * Instead of using the default data directory (`~/.wiseplat` on Linux for example), Gwsh will nest\n   itself one level deeper into a `testnet` subfolder (`~/.wiseplat/testnet` on Linux). Note, on OSX\n   and Linux this also means that attaching to a running testnet node requires the use of a custom\n   endpoint since `gwsh attach` will try to attach to a production node endpoint by default. E.g.\n   `gwsh attach \u003cdatadir\u003e/testnet/gwsh.ipc`. Windows users are not affected by this.\n * Instead of connecting the main Wiseplat network, the client will connect to the test network,\n   which uses different P2P bootnodes, different network IDs and genesis states.\n   \n*Note: Although there are some internal protective measures to prevent transactions from crossing\nover between the main network and test network, you should make sure to always use separate accounts\nfor play-money and real-money. Unless you manually move accounts, Gwsh will by default correctly\nseparate the two networks and will not make any accounts available between them.*\n\n### Configuration\n\nAs an alternative to passing the numerous flags to the `gwsh` binary, you can also pass a configuration file via:\n\n```\n$ gwsh --config /path/to/your_config.toml\n```\n\nTo get an idea how the file should look like you can use the `dumpconfig` subcommand to export your existing configuration:\n\n```\n$ gwsh --your-favourite-flags dumpconfig\n```\n\n*Note: This works only with gwsh v1.6.0 and above.*\n\n#### Docker quick start\n\nOne of the quickest ways to get Wiseplat up and running on your machine is by using Docker:\n\n```\ndocker run -d --name wiseplat-node -v /Users/alice/wiseplat:/root \\\n           -p 8747:8747 -p 30373:30373 \\\n           wiseplat/client-go --fast --cache=512\n```\n\nThis will start gwsh in fast sync mode with a DB memory allowance of 512MB 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. There is also an `alpine` tag available for a slim version of the image.\n\nDo not forget `--rpcaddr 0.0.0.0`, if you want to access RPC from other containers and/or hosts. By default, `gwsh` binds to the local interface and RPC endpoints is not accessible from the outside.\n\n### Programatically interfacing Gwsh nodes\n\nAs a developer, sooner rather than later you'll want to start interacting with Gwsh and the Wiseplat\nnetwork via your own programs and not manually through the console. To aid this, Gwsh has built in\nsupport for a JSON-RPC based APIs ([standard APIs](https://github.com/wiseplat/wiki/wiki/JSON-RPC) and\n[Gwsh specific APIs](https://github.com/wiseplat/go-wiseplat/wiki/Management-APIs)). These can be\nexposed via HTTP, WebSockets and IPC (unix sockets on unix based platforms, and named pipes on Windows).\n\nThe IPC interface is enabled by default and exposes all the APIs supported by Gwsh, whereas the HTTP\nand WS interfaces need to manually be enabled and only expose a subset of APIs due to security reasons.\nThese can be turned on/off and configured as you'd expect.\n\nHTTP based JSON-RPC API options:\n\n  * `--rpc` Enable the HTTP-RPC server\n  * `--rpcaddr` HTTP-RPC server listening interface (default: \"localhost\")\n  * `--rpcport` HTTP-RPC server listening port (default: 8747)\n  * `--rpcapi` API's offered over the HTTP-RPC interface (default: \"wsh,net,web3\")\n  * `--rpccorsdomain` Comma separated list of domains from which to accept cross origin requests (browser enforced)\n  * `--ws` Enable the WS-RPC server\n  * `--wsaddr` WS-RPC server listening interface (default: \"localhost\")\n  * `--wsport` WS-RPC server listening port (default: 8748)\n  * `--wsapi` API's offered over the WS-RPC interface (default: \"wsh,net,web3\")\n  * `--wsorigins` Origins from which to accept websockets requests\n  * `--ipcdisable` Disable the IPC-RPC server\n  * `--ipcapi` API's offered over the IPC-RPC interface (default: \"admin,debug,wsh,miner,net,personal,shh,txpool,web3\")\n  * `--ipcpath` Filename for IPC socket/pipe within the datadir (explicit paths escape it)\n\nYou'll need to use your own programming environments' capabilities (libraries, tools, etc) to connect\nvia HTTP, WS or IPC to a Gwsh node configured with the above flags and you'll need to speak [JSON-RPC](http://www.jsonrpc.org/specification)\non all transports. You can reuse the same connection for multiple requests!\n\n**Note: Please understand the security implications of opening up an HTTP/WS based transport before\ndoing so! Hackers on the internet are actively trying to subvert Wiseplat nodes with exposed APIs!\nFurther, all browser tabs can access locally running webservers, so malicious webpages could try to\nsubvert locally available APIs!**\n\n### Operating a private network\n\nMaintaining your own private network is more involved as a lot of configurations taken for granted in\nthe official networks need to be manually set up.\n\n#### Defining the private genesis state\n\nFirst, you'll need to create the genesis state of your networks, which all nodes need to be aware of\nand agree upon. This consists of a small JSON file (e.g. call it `genesis.json`):\n\n```json\n{\n  \"config\": {\n        \"chainId\": 0,\n        \"homesteadBlock\": 0,\n        \"eip155Block\": 0,\n        \"eip158Block\": 0\n    },\n  \"alloc\"      : {},\n  \"coinbase\"   : \"0x0000000000000000000000000000000000000000\",\n  \"difficulty\" : \"0x20000\",\n  \"extraData\"  : \"\",\n  \"gasLimit\"   : \"0x2fefd8\",\n  \"nonce\"      : \"0x0000000000000042\",\n  \"mixhash\"    : \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n  \"parentHash\" : \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n  \"timestamp\"  : \"0x00\"\n}\n```\n\nThe above fields should be fine for most purposes, although we'd recommend changing the `nonce` to\nsome random value so you prevent unknown remote nodes from being able to connect to you. If you'd\nlike to pre-fund some accounts for easier testing, you can populate the `alloc` field with account\nconfigs:\n\n```json\n\"alloc\": {\n  \"0x0000000000000000000000000000000000000001\": {\"balance\": \"111111111\"},\n  \"0x0000000000000000000000000000000000000002\": {\"balance\": \"222222222\"}\n}\n```\n\nWith the genesis state defined in the above JSON file, you'll need to initialize **every** Gwsh node\nwith it prior to starting it up to ensure all blockchain parameters are correctly set:\n\n```\n$ gwsh init path/to/genesis.json\n```\n\n#### Creating the rendezvous point\n\nWith all nodes that you want to run initialized to the desired genesis state, you'll need to start a\nbootstrap node that others can use to find each other in your network and/or over the internet. The\nclean way is to configure and run a dedicated bootnode:\n\n```\n$ bootnode --genkey=boot.key\n$ bootnode --nodekey=boot.key\n```\n\nWith the bootnode online, it will display an [`enode` URL](https://github.com/wiseplat/wiki/wiki/enode-url-format)\nthat other nodes can use to connect to it and exchange peer information. Make sure to replace the\ndisplayed IP address information (most probably `[::]`) with your externally accessible IP to get the\nactual `enode` URL.\n\n*Note: You could also use a full fledged Gwsh node as a bootnode, but it's the less recommended way.*\n\n#### Starting up your member nodes\n\nWith the bootnode operational and externally reachable (you can try `telnet \u003cip\u003e \u003cport\u003e` to ensure\nit's indeed reachable), start every subsequent Gwsh node pointed to the bootnode for peer discovery\nvia the `--bootnodes` flag. It will probably also be desirable to keep the data directory of your\nprivate network separated, so do also specify a custom `--datadir` flag.\n\n```\n$ gwsh --datadir=path/to/custom/data/folder --bootnodes=\u003cbootnode-enode-url-from-above\u003e\n```\n\n*Note: Since your network will be completely cut off from the main and test networks, you'll also\nneed to configure a miner to process transactions and create new blocks for you.*\n\n#### Running a private miner\n\nMining on the public Wiseplat network is a complex task as it's only feasible using GPUs, requiring\nan OpenCL or CUDA enabled `wshminer` instance. For information on such a setup, please consult the\n[WiseMining subreddit](https://www.reddit.com/r/WiseMining/) and the [Genoil miner](https://github.com/Genoil/cpp-wiseplat)\nrepository.\n\nIn a private network setting however, a single CPU miner instance is more than enough for practical\npurposes as it can produce a stable stream of blocks at the correct intervals without needing heavy\nresources (consider running on a single thread, no need for multiple ones either). To start a Gwsh\ninstance for mining, run it with all your usual flags, extended by:\n\n```\n$ gwsh \u003cusual-flags\u003e --mine --minerthreads=1 --wisebase=0x0000000000000000000000000000000000000000\n```\n\nWhich will start mining blocks and transactions on a single CPU thread, crediting all proceedings to\nthe account specified by `--wisebase`. You can further tune the mining by changing the default gas\nlimit blocks converge to (`--targetgaslimit`) and the price transactions are accepted at (`--gasprice`).\n\n## Contribution\n\nThank you for considering to help out with the source code! We welcome contributions from\nanyone on the internet, and are grateful for even the smallest of fixes!\n\nIf you'd like to contribute to go-wiseplat, please fork, fix, commit and send a pull request\nfor the maintainers to review and merge into the main code base. If you wish to submit more\ncomplex changes though, please check up with the core devs first on [our gitter channel](https://gitter.im/wiseplat/go-wiseplat)\nto ensure those changes are in line with the general philosophy of the project and/or get some\nearly feedback which can make both your efforts much lighter as well as our review and merge\nprocedures quick and simple.\n\nPlease make sure your contributions adhere to our coding guidelines:\n\n * Code must adhere to the official Go [formatting](https://golang.org/doc/effective_go.html#formatting) guidelines (i.e. uses [gofmt](https://golang.org/cmd/gofmt/)).\n * Code must be documented adhering to the official Go [commentary](https://golang.org/doc/effective_go.html#commentary) guidelines.\n * Pull requests need to be based on and opened against the `master` branch.\n * Commit messages should be prefixed with the package(s) they modify.\n   * E.g. \"wsh, rpc: make trace configs optional\"\n\nPlease see the [Developers' Guide](https://github.com/wiseplat/go-wiseplat/wiki/Developers'-Guide)\nfor more details on configuring your environment, managing project dependencies and testing procedures.\n\n## License\n\nThe go-wiseplat library (i.e. all code outside of the `cmd` directory) is licensed under the\n[GNU Lesser General Public License v3.0](https://www.gnu.org/licenses/lgpl-3.0.en.html), also\nincluded in our repository in the `COPYING.LESSER` file.\n\nThe go-wiseplat binaries (i.e. all code inside of the `cmd` directory) is licensed under the\n[GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html), also included\nin our repository in the `COPYING` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiseplat%2Fgo-wiseplat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiseplat%2Fgo-wiseplat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiseplat%2Fgo-wiseplat/lists"}