SmartMesh Chain
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
accounts change base signer to eip155 Sep 13, 2018
bmt Formally rename to Spectrum Apr 19, 2018
build clean Aug 10, 2018
cmd close some settings Nov 28, 2018
common rollback 595708 in testnet for test and update chief 0.0.6 Jul 23, 2018
compression/rle Formally rename to Spectrum Apr 19, 2018
consensus clean Dec 26, 2018
console Formally rename to Spectrum Apr 19, 2018
containers Formally rename to Spectrum Apr 19, 2018
contracts output more debug info Nov 26, 2018
core debug log Nov 26, 2018
crypto new rule of generate block time Jun 20, 2018
dashboard Formally rename to Spectrum Apr 19, 2018
eth debug log Nov 26, 2018
ethclient mainnet genesis vsn Apr 29, 2018
ethdb Formally rename to Spectrum Apr 19, 2018
ethstats Formally rename to Spectrum Apr 19, 2018
event Formally rename to Spectrum Apr 19, 2018
internal chief.vsn 0.0.6 , maximally increasing the randomness of selection. Jul 17, 2018
les fix cumulativeGasUsed error and must rollback to 176222 for test Apr 23, 2018
light fix cumulativeGasUsed error and must rollback to 176222 for test Apr 23, 2018
log Formally rename to Spectrum Apr 19, 2018
metrics Formally rename to Spectrum Apr 19, 2018
miner fix miner.start pending chain header event Nov 28, 2018
mobile Formally rename to Spectrum Apr 19, 2018
node fix Aug 10, 2018
p2p Formally rename to Spectrum Apr 19, 2018
params upgrade master version to 0.5.3 Dec 26, 2018
rlp Ethereum-based v1.8.0 Jan 2, 2018
rpc Formally rename to Spectrum Apr 19, 2018
swarm Formally rename to Spectrum Apr 19, 2018
tests fix cumulativeGasUsed error and must rollback to 176222 for test Apr 23, 2018
trie Formally rename to Spectrum Apr 19, 2018
vendor update deps Sep 3, 2018
whisper Formally rename to Spectrum Apr 19, 2018
.gitignore append .idea to ignore May 15, 2018
AUTHORS Ethereum-based v1.8.0 Jan 2, 2018
COPYING Ethereum-based v1.8.0 Jan 2, 2018
COPYING.LESSER Ethereum-based v1.8.0 Jan 2, 2018
Dockerfile Ethereum-based v1.8.0 Jan 2, 2018
Dockerfile.alltools Ethereum-based v1.8.0 Jan 2, 2018
Makefile change process name from geth to smc; append bootnode; Aug 10, 2018
README.md Update README.md Feb 11, 2019
VERSION vsn 0.5.x Aug 10, 2018
appveyor.yml Ethereum-based v1.8.0 Jan 2, 2018
circle.yml Ethereum-based v1.8.0 Jan 2, 2018
interfaces.go Formally rename to Spectrum Apr 19, 2018

README.md

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. 

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
mainnet 20180430

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.9.2 or later) and a C compiler. You can install them using your favourite package manager.

Ubuntu:

1)Install git
	$ apt-get install git
	$ apt-get install golang
2)Install golang in the directory of {GOHOME}
	$ cd {GOHOME}
	$ tar -zxvf go1.9.2.linux-amd64.tar
	$ mkdir {GOHOME}/gopath
	$ export GOAPTH={GOHOME}/gopath 
	$ export GOROOT=${GOHOME}/go 
	$ export PATH=$GOROOT/bin:$PATH
3)download the source on the git
	$ cd {GOPATH}
	$ mkdirs src\github.com\SmartMeshFoundation\
	$ cd src\github.com\SmartMeshFoundation\
	$ git clone https://github.com/SmartMeshFoundation/Spectrum.git
4)compile the source code
	$ cd Spectrum
	$ make smc
5)run the program
	$ ./build/bin/smc console

Mac

1)download the latest *Spectrum* source code from the github 

    	$ git clone https://github.com/SmartMeshFoundation/Spectrum.git

2)Install by using source code

    	$ cd Spectrum
    	$ make smc

	If any error happens during the compiling and prompt message shows " lacking of the header file that is related to the Mac OS", you may try to install the xcode command-line tool before executing above commands:

        $ xcode-select --install

3) startup

    	$ build/bin/smc console

Windows

1)First of all, you need to install a package management software for Windows named "chocolatey". Please refer to https://chocolatey.org for Installation method.
2)Install git, golang, mingw by using chocolatey
	c:\Users\xxx> choco install git
	c:\Users\xxx> cholo install golang 
	c:\Users\xxx> cholo install mingw

3)Set environment variables {GOPATH} of golang:
	c:\Users\xxx> mkdir {GOPATH}
	c:\Users\xxx> set "GOPATH={GOPATH}"
	c:\Users\xxx> set "Path={GOPATH}\bin;%Path%"
4)download the source on the git: 
	c:\Users\xxx> cd {GOPATH}
	{GOPATH}> mkdir src\github.com\SmartMeshFoundation\
	{GOPATH}> cd src\github.com\SmartMeshFoundation\
	...\SmartMeshFoundation> git clone https://github.com/SmartMeshFoundation/Spectrum.git
5)compile source code:
	...\SmartMeshFoundation> cd Spectrum
	...\SmartMeshFoundation> go install -v ./cmd/...
6)run the program:
	c:\Users\xxx> smc console

Encrypt your nodekey

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

Decrypt your nodekey

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

Run fast node to test smc

$ ./build/bin/smc console

Create new account

> personal.newAccount()

View the miner nodes

  • tribe.getStatus()
  • then you will see the following message:
{
  "epoch": 5760,
  "number": 39601,
  "signerLevel": "None",
  "signerLimit": 17,
  "signers": [
    {
      "address": "0x3a5fbac6ca913599c5fde8c1638db58d01de8a48",
      "score": 3
    },
    {
      "address": "0xad4c80164065a3c33dd2014908c7563eff88ab49",
      "score": 3
    },
    {
      "address": "0xc22d53456abd14da347517a4b47ea24866b8e3ae",
      "score": 3
    },
    {
      "address": "0x7b06dd132c089034157f1e1aacda75787df1e0c5",
      "score": 3
    },
    {
      "address": "0x00ab501f3fe4b2f71651764699ec5752598e679f",
      "score": 3
    }
  ],
  "totalSinner": 2,
  "volunteerLimit": 70,
  "volunteers": []
}

that tell you there are two miners in the testnet.

View the block mining history in console

  • tribe.getHistory(11,false)

  • then you will see the following message (console format):

[{
    🔨: "39708 -> 0x7B06dd132c089034157f1E1AAcda75787DF1e0c5"
}, {
    🔨: "39707 -> 0xc22D53456ABd14Da347517a4B47ea24866B8E3Ae"
}, {
    🔨: "39706 -> 0xAd4c80164065a3c33dD2014908c7563eFf88Ab49"
}, {
    🔨: "39705 -> 0x3a5fBaC6CA913599C5fde8c1638dB58d01De8A48"
}, {
    🔨: "39704 -> 0x00aB501f3Fe4b2f71651764699EC5752598E679f"
}]

that tell the block number and miner's account that generate that block.

get your own miner account

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

> tribe.getMiner() 

then you will see below messages:
{
    address: "0x00ab501f3fe4b2f71651764699ec5752598e679f",
    balance: 2001223531052513000,
    level: "Signer"
}
that will show your miner account and the balance of miner account in Wei unit.

becoming a miner

if you want to become a miner, you will send 1 smt to the miner account, after this transfer,
you will run miner.start() to join into the miners group.

> miner.start()