Categorygithub.com/SmartMeshFoundation/Spectrum
modulepackage
0.0.0-20220621030607-452a266fee1e
Repository: https://github.com/smartmeshfoundation/spectrum.git
Documentation: pkg.go.dev

# README

Spectrum

光谱logo2(1).png

Spectrum is an Ethereum-compatible project. It uses a new consensus and new block reward for SmartMesh ecosystem devices and IOT. And you can view the transactions on the BlockChain Browser Address.

Since the list of signers is 17, it is recommended that the confirmation number of general transfer transaction block be set to 17 (one round), and that of exchange block be set to 34 (two rounds).

List of Chain ID's:

Chain(s)CHAIN_ID
mainnet20180430
testnet2022
devnet4

Warning

We suggest that the GasPrice should not be less than 18Gwei, otherwise the transaction may not be packaged into the block.

Build the source

Building Spectrum requires both a Go (version 1.15 or later) and a C compiler. You can install them using your favourite package manager. And you can view the detail installation and running steps on this page.

Run node

$ ./build/bin/smc console

Create new account

Users can create new account:

> personal.newAccount()

Get your own miner id

Every node has it's own miner id, you can run getMiner() function to get that id:

> tribe.getMiner() 

Bind your own miner id to wallet address

Users can bind their miner ID to a wallet address:

> tribe.bind("account","passwd") 

Or Users can only generate binding signatures at the terminal:

> tribe.bindSign("account") 

Deposit smt to POC

Users can become miner by deposit smt:

> tribe.pocDeposit("account","passwd") 

Start mining

Users can start mining or resume it:

> tribe.pocStart("account","passwd") 

Stop mining

Users can stop mining:

> tribe.pocStop("account","passwd") 

Withdraw smt

Users can withdraw smt:

> tribe.pocWithdraw("account","passwd")   

More functions

Users can input tribe to view:

> tribe

Security-related

Encrypt your nodekey

 $ ./build/bin/smc security --passwd
 

Decrypt your nodekey

 $ ./build/bin/smc security --unlock
 

# Packages

Package accounts implements high level Ethereum account management.
simple nonconcurrent reference implementation for hashsize segment based Binary Merkle tree hash on arbitrary but fixed maximum chunksize This implementation does not take advantage of any paralellisms and uses far more memory than necessary, but it is easy to see that it is correct.
No description provided by the author
Package common contains various helper functions.
No description provided by the author
Package consensus implements different Ethereum consensus engines.
No description provided by the author
No description provided by the author
Package core implements the Ethereum consensus protocol.
No description provided by the author
No description provided by the author
Package eth implements the Ethereum protocol.
Package ethclient provides a client for the Ethereum RPC API.
No description provided by the author
Package ethstats implements the network stats reporting service.
Package event deals with subscriptions to real-time events.
Package les implements the Light Ethereum Subprotocol.
Package light implements on-demand retrieval capable state and chain objects for the Ethereum Light Client.
Package log15 provides an opinionated, simple toolkit for best-practice logging that is both human and machine readable.
Package metrics provides general system and process level metrics collection.
Package miner implements Ethereum block creation and mining.
Package geth contains the simplified mobile APIs to Spectrum.
Package node sets up multi-protocol Ethereum nodes.
Package p2p implements the Ethereum p2p network protocols.
No description provided by the author
Package rlp implements the RLP serialization format.
Package rpc provides access to the exported methods of an object across a network or other I/O connection.
No description provided by the author
Package tests implements execution of Ethereum JSON tests.
Package trie implements Merkle Patricia Tries.
No description provided by the author

# Variables

NotFound is returned by API methods if the requested item does not exist.

# Structs

CallMsg contains parameters for contract calls.
FilterQuery contains options for contract log filtering.
SyncProgress gives progress indications when the node is synchronising with the Ethereum network.

# Interfaces

ChainReader provides access to the blockchain.
ChainStateReader wraps access to the state trie of the canonical blockchain.
ChainSyncReader wraps access to the node's current sync status.
A ContractCaller provides contract calls, essentially transactions that are executed by the EVM but not mined into the blockchain.
GasEstimator wraps EstimateGas, which tries to estimate the gas needed to execute a specific transaction based on the pending state.
GasPricer wraps the gas price oracle, which monitors the blockchain to determine the optimal gas price given current fee market conditions.
LogFilterer provides access to contract log events using a one-off query or continuous event subscription.
PendingContractCaller can be used to perform calls against the pending state.
A PendingStateEventer provides access to real time notifications about changes to the pending state.
A PendingStateReader provides access to the pending state, which is the result of all known executable transactions which have not yet been included in the blockchain.
Subscription represents an event subscription where events are delivered on a data channel.
TransactionReader provides access to past transactions and their receipts.
TransactionSender wraps transaction sending.