A Coinex Smart Chain client based on the go-ethereum fork

Coinex Smart Chain

CoinEx is committed to product development and service improvement, and contributes its share to the infrastructure of the blockchain world. CSC is a small part of the development prospect.

CoinEx Smart Chain (CSC) is a smart contract chain that supports up to 101 validators. Aside from shorter time for block generation and lower fees for transactions, CSC is also fully compatible with Ethereum virtual machine(EVM) and protocols while supporting high-performance transactions. And to achieve that, the easiest solution is to develop based on go-ethereum fork, as we respect the great work of Ethereum very much.

CSC Features

  • Decentralization: Permission-free, anyone can become a validator by staking CET.
  • EVM compatibility: Fully compatible with Ethereum virtual machine(EVM), which means that almost all DApps, ecosystem components and tools on Ethereum can be migrated to CSC directly or with very small changes.
  • High performance: 600+ TPS, 3s block time

Native Token

CET on CSC runs the same way as ETHruns on Ethereum, and its main functions are:

  • As block reward for validators
  • To pay for the gas for transfers and contract calls on CSC
  • To pay for the transaction fees for deploying smart contracts on CSC
  • To be delegated to the selected validators

Building the source

For prerequisites and detailed build instructions please read the Compile.

Building cetd requires both a Go (version 1.13 or later) and a C compiler. You can install them using your favourite package manager. Once the dependencies are installed, run

make cetd

Running cetd

Going through all the possible command line flags is out of scope here (please consult our CLI), but we've enumerated a few common parameter combos to get you up to speed quickly on how you can run your own cetd instance.

Hardware Requirements

  • 1T of SSD storage for mainnet, 500G of SSD storage for testnet.
  • 16 cores of CPU and 32 gigabytes of memory (RAM) for mainnet.
  • 4 cores of CPU and 8 gigabytes of memory (RAM) for testnet.
  • A broadband Internet connection with upload/download speeds of at least 10 megabyte per second

Full node on the testnet

By far the most common scenario is people wanting to simply interact with the CSC network: 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:

$ cetd console

This command will:

  • Start cetd in fast sync mode (default, can be changed with the --syncmode flag), causing it to download more data in exchange for avoiding processing the entire history of the Ethereum network, which is very CPU intensive.
  • Start up cetd's built-in interactive JavaScript console, (via the trailing console subcommand) through which you can invoke all official web3 methods as well as cetd's own management APIs. This tool is optional and if you leave it out you can always attach to an already running cetd instance with cetd attach.

Configuration

As an alternative to passing the numerous flags to the cetd binary, you can also pass a configuration file via:

$ cetd --config /path/to/your_config.toml

Programmatically interfacing cetd nodes

As a developer, sooner rather than later you'll want to start interacting with cetd and the CSC network via your own programs and not manually through the console. To aid this, cetd has built-in support for a JSON-RPC based APIs (standard APIs and 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 cetd, 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:

  • --http Enable the HTTP-RPC server
  • --http.addr HTTP-RPC server listening interface (default: localhost)
  • --http.port HTTP-RPC server listening port (default: 8545)
  • --http.api API's offered over the HTTP-RPC interface (default: eth,net,web3)
  • --http.corsdomain Comma separated list of domains from which to accept cross origin requests (browser enforced)
  • --ws Enable the WS-RPC server
  • --ws.addr WS-RPC server listening interface (default: localhost)
  • --ws.port WS-RPC server listening port (default: 8546)
  • --ws.api API's offered over the WS-RPC interface (default: eth,net,web3)
  • --ws.origins Origins from which to accept websockets requests
  • --ipcdisable Disable the IPC-RPC server
  • --ipcapi API's offered over the IPC-RPC interface (default: admin,debug,eth,miner,net,personal,shh,txpool,web3)
  • --ipcpath Filename 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 cetd 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 CSC nodes with exposed APIs! Further, all browser tabs can access locally running web servers, so malicious web pages could try to subvert locally available APIs!

Contribution

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 csc, 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 contact to the core developer 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 master branch.
  • 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.

License

The csc 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 COPYING.LESSER file.

The csc 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 COPYING file.

Similar Resources

Yet another Binance Smart Chain client based on TrustFi Network

TrustFi Smart Chain The goal of TrustFi Smart Chain is to bring programmability and interoperability to Binance Chain. In order to embrace the existin

Mar 27, 2021

Stobox Securities Chain client based on the bsc fork

Stobox Securities Chain The goal of Stobox Securities Chain is to bring programmability and interoperability to Binance Chain. In order to embrace the

Dec 24, 2021

Stobox Securities Chain client based on the bsc fork

Stobox Securities Chain The goal of Stobox Securities Chain is to bring programmability and interoperability to Binance Chain. In order to embrace the

Dec 24, 2021

A Zyx Network client based on the go-ethereum fork

Zyx Network Building the source Many of the below are the same as or similar to go-ethereum. For prerequisites and detailed build instructions please

Nov 24, 2021

LEO (Low Ethereum Orbit) is an Ethereum Portal Network client.

LEO LEO (Low Ethereum Orbit) is an Ethereum Portal Network client. What makes LEO different from other Portal Network clients is that it uses libp2p f

Apr 19, 2022

This library aims to make it easier to interact with Ethereum through de Go programming language by adding a layer of abstraction through a new client on top of the go-ethereum library.

Simple ethereum client Simple ethereum client aims to make it easier for the developers to interact with Ethereum through a new layer of abstraction t

May 1, 2022

Openshift's hpessa-exporter allows users to export SMART information of local storage devices as Prometheus metrics, by using HPE Smart Storage Administrator tool

hpessa-exporter Overview Openshift's hpessa-exporter allows users to export SMART information of local storage devices as Prometheus metrics, by using

Jan 17, 2022

Running chaincode in development mode: Smart contract developers that want to iteratively develop and test their chaincode packages without the overhead of the smart contract lifecycle process for every update.

Fabric DEVMODE - Nano bash 1 ORG + 1 PEER + 1 ORDERER Based on fabric-samples/test-network-nano-bash, but using devmode fabric peer Prereqs Follow the

May 14, 2022

Dcfs-core - Dcfs Smart Chain With Golang

Dcfs Smart Chain The goal of Dcfs Smart Chain is to bring programmability and in

Jan 12, 2022

Berylbit PoW chain using Ethash, EPI-Burn and geth. The chain will be using bot congestion flashbot bundles through nodes

Berylbit PoW chain using Ethash, EPI-Burn and geth. The chain will be using bot congestion flashbot bundles through nodes. Soon, We will work towards

Jun 30, 2022

Go-chain - EVM-compatible chain secured by the Lachesis consensus algorithm

ICICB galaxy EVM-compatible chain secured by the Lachesis consensus algorithm. B

Jun 8, 2022

Rei chain fork from quorum using raft consensus

Rei chain fork from quorum using raft consensus

GoQuorum is an Ethereum-based distributed ledger protocol with transaction/contract privacy and new consensus mechanisms. GoQuorum is a fork of go-eth

Aug 8, 2022

The Fabric Smart Client is a new Fabric Client that lets you focus on the business processes and simplifies the development of Fabric-based distributed application.

Fabric Smart Client The Fabric Smart Client (FSC, for short) is a new Fabric client-side component whose objective is twofold. FSC aims to simplify th

Dec 14, 2022

Accompanying repository for the "Build Ethereum From Scratch - Smart Contracts and More" course by David Katz

Accompanying repository for the

Build Ethereum From Scratch - Smart Contracts and More This repository accompanies the "Build Ethereum From Scratch - Smart Contracts and More" course

Dec 7, 2022

On chain interactive fraud prover for Ethereum

On chain interactive fraud prover for Ethereum

The cannon (cannon cannon cannon) is an on chain interactive fraud prover It's half geth, half of what I think truebit was supposed to be. It can prov

Dec 9, 2022

This plugin enhances Hashicorp Vault Service with cryptographic operations to create, import and sign using different type of keypairs and Ethereum wallets, including signing operation for public ethereum transaction, EEA and Quorum

This plugin enhances Hashicorp Vault Service with cryptographic operations to create, import and sign using different type of keypairs and Ethereum wallets, including signing operation for public ethereum transaction, EEA and Quorum

Quorum Hashicorp Vault plugin The Quorum plugin enhances Hashicorp Vault Service with cryptographic operations under Vault engine, such as: Create and

Jan 7, 2023

Go-ethereum - Official Golang implementation of the Ethereum protocol

Go Ethereum Official Golang implementation of the Ethereum protocol. Automated b

Jan 4, 2022

This testing tool surrounds go-ethereum with cannon to catch the blocks of retesteth going into go-ethereum and test cannon with them

Siege This testing tool surrounds go-ethereum with cannon to catch the blocks of retesteth going into go-ethereum and test cannon with them. Usage Sta

Mar 15, 2022

Akroma GO client - Akroma is an EVM based application development platform (smart-contracts).

Akroma Akroma is an EVM based application development platform (smart-contracts). Akroma will utilize a Masternode system, and build out an Oracle pla

Dec 11, 2022
Comments
  • Peer node connection in csc

    Peer node connection in csc

    System information

    Geth version: 1.0.1-stable OS & Version: Linux Commit hash : (if develop)

    Expected behaviour

    Need to connect peer node

    Actual behaviour

    Trying to connect peer node but nodeInfo in csc always shows localhost connection.So can't able to connect with another server.

  • Run a node on testnet

    Run a node on testnet

    I`m looking for a document that shows how to launch a node. I follow the command (from the official site). but faced with the following error:

    INFO [07-05|08:58:39.747] Looking for peers                        peercount=0 tried=3 static=3
    INFO [07-05|08:59:14.747] Looking for peers                        peercount=0 tried=3 static=3
    INFO [07-05|08:59:49.747] Looking for peers                        peercount=0 tried=3 static=3
    INFO [07-05|09:00:24.748] Looking for peers                        peercount=0 tried=3 static=3
    INFO [07-05|09:00:59.749] Looking for peers                        peercount=0 tried=3 static=3
    INFO [07-05|09:01:34.750] Looking for peers                        peercount=0 tried=3 static=3
    

    It seems the peer node is not accessible. How to fix this? is there any online peer node list? Is it possible to set peer node manually?

  • Block sealing failed err=

    Block sealing failed err="unauthorized signer" while running a validator

    I am trying to run a validator. I've generated an account and transferred CET. after successfully setting it up on Linux (it is initialized on the main network) whenever trying to start mine, the following error appears:

    INFO [09-06|18:20:16.203|miner/worker.go:999]               Commit new mining work                   number=12627591 sealhash="815876…36a6b8" uncles=2 txs=0  gas=0       fees=0           elapsed=3.172ms
    WARN [09-06|18:20:16.204|miner/worker.go:567]               Block sealing failed                     err="unauthorized validator"
    

    How can I fix it?

  • Dose it support InfluxDB V2?

    Dose it support InfluxDB V2?

    I want to monitor the CSC node with influxdb+grafana. I do not know if the node support InfluxDB v2. The InfluxDB v2 supports V1.x too but with some changes. Do you support V2 directly?

    edit : eth support Influxdb in current releases

    see: https://github.com/ethereum/go-ethereum/pull/23194

XT Smart Chain, a chain based on the go-ethereum fork

XT Smart Chain XT Smart Chain (XSC) is a decentralized, high-efficiency and ener

Dec 28, 2022
A Binance Smart Chain client based on the go-ethereum fork

A Binance Smart Chain client based on the go-ethereum fork

Dec 31, 2022
A Binance Smart Chain client based on the go-ethereum fork

Binance Smart Chain The goal of Binance Smart Chain is to bring programmability and interoperability to Binance Chain. In order to embrace the existin

Feb 8, 2022
A phoenix Chain client based on the go-ethereum fork,the new PoA consensus engine is based on the VRF algorithm.

Phoenix Official Golang implementation of the Phoenix protocol. !!!The current version is for testing and developing purposes only!!! Building the sou

Apr 28, 2022
A phoenix Chain client based on the go-ethereum fork,the new PoS consensus engine is based on the VRF algorithm.

Phoenix Official Golang implementation of the Phoenix protocol. !!!The current version is for testing and developing purposes only!!! Building the sou

Aug 18, 2022
A Binance Smart Chain client based on the erigon fork

Erigon Erigon is an implementation of Ethereum (aka "Ethereum client"), on the efficiency frontier, written in Go. System Requirements Usage Getting S

Sep 17, 2022
Huobi Eco Chain client based on the go-ethereum fork

The Huobi Open Platform is a unified infrastructure platform based on the technical, traffic and ecological resources of the Huobi Group, and will be gradually open to the blockchain industry.

Dec 31, 2022
The goal of Binance Smart Chain is to bring programmability and interoperability to Binance Chain

Binance Smart Chain The goal of Binance Smart Chain is to bring programmability

Aug 17, 2022
Ethereum-vanity-wallet - A fork of https://github.com/meehow/ethereum-vanity-wallet but the key can be exported to a JSON keystore file

ethereum-vanity-wallet See https://github.com/meehow/ethereum-vanity-wallet This version: doesn't display the private key let's you interactively expo

Jan 2, 2022
Ethereum go-ethereum - Official Golang implementation of the Ethereum protocol

Go Ethereum Official Golang implementation of the Ethereum protocol. Automated b

Feb 17, 2022