GithubHelp home page GithubHelp logo

elastos.ela's Introduction

Elastos ELA

Actions CI Go Report Card
Build Status() Code Report()

Introduction

ELA is the digital currency solution within the Elastos ecosystem. It is merged mined with Bitcoin which means the existing bitcoin miners are able to merge mine both BTC and ELA at the same time without expending any additional resources or energy while also providing the enormous hashpower that comes with the bitcoin network.

This project is the source code that can build a full node of ELA blockchain(main chain).

Build and run step by step

1. macOS Prerequisites

Make sure the macOS version Mojave or later 64-bit Intel.

$ uname -srm
Darwin 18.7.0 x86_64

Use Homebrew to install Golang 1.16

$ brew install [email protected]

Check the golang version. Make sure they are the following version number or above.

$ go version
go version go1.16.5 darwin/amd64

2. Ubuntu Prerequisites

Make sure your ubuntu version is 18.04 or later.

$ cat /etc/issue
Ubuntu 18.04.5 LTS \n \l

Install Git.

$ sudo apt-get install -y git

Install Go distribution.

$ curl -O https://golang.org/dl/go1.13.15.linux-amd64.tar.gz
$ tar -xvf go1.13.15.linux-amd64.tar.gz
$ sudo chown -R root:root ./go
$ sudo mv go /usr/local
$ export GOPATH=$HOME/go
$ export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
$ source ~/.profile

3. Clone source code

Make sure you are in the working folder.

$ git clone https://github.com/elastos/Elastos.ELA.git

If clone works successfully, you should see folder structure like Elastos.ELA/Makefile

4. Make

Build the node.

$ cd Elastos.ELA
$ go get .
$ go mod tidy
$ make

If you did not see any error message, congratulations, you have made the ELA full node.

5. Configure the node

You can just run a ela node without a config.json file, the ela node will use the main net configuration by default, and provide a JSON-RPC service on http://localhost:20336.

If you want to customize the node configuration, see the config.json to understand what each parameter means on the configuration file.

If you would like to connect to testnet, do the following:

$ cp -v docs/testnet_config.json.sample config.json

If you would like a simple config template, do the following:

$ cp -v docs/mainnet_config.json.sample config.json

Make sure to modify the parameters to what your own specification.

6. Run the node on Ubuntu and macOS

Run the node.

$ ./ela

Build and run using Docker

Alternatively, if don't want to build it manually on Mac or Linux, we also provide a Dockerfile to help you (You need to have Docker installed).

1. Build the Docker node

$ cd docker
$ docker build -t ela_node_run .

2. Run the node in the Docker container

$ docker run -p 20334:20334 -p 20335:20335 -p 20336:20336 -p 20338:20338 ela_node_run

Note: Don't hit Ctrl-C to terminate the output; instead close this terminal and open another.

Please note the dockerfile uses the default 'config.json' in the repository. If you're familiar with Docker, you can change the dockerfile to make it use your own ELA Node configuration file.

Interact with the node

1. Web UI

If you would like to access the Web UI of the node to get different stats about the node, go to the following URL on your browser: http://localhost:21333/info

2. REST API

Once the node is running successfully, you can access ELA Node's REST APIs:

Example 1: Get the number of nodes to which the node is connected

$ curl http://localhost:21334/api/v1/node/connectioncount
{
    "Desc": "Success",
    "Error": 0,
    "Result": 5
}

Example 2: Get the block height of the node

$ curl http://localhost:21334/api/v1/block/height
{
    "Desc": "Success",
    "Error": 0,
    "Result": 1000
}

If you would like to learn more about what other REST APIs are available for the node, please check out the Restful API

3. JSON-RPC API

Once the node is running successfully, you can access ELA Node's JSON-RPC APIs:

Example 1: Get the hash of the most recent block

$ curl -H 'Content-Type: application/json' -H 'Accept:application/json' \
  --data '{"method":"getbestblockhash"}' http://localhost:21336
{
    "error": null,
    "id": null,
    "jsonrpc": "2.0",
    "result": "c4e72359cbb128bca244a800fb36d71f64b834e20d437c25de6c62edc46196c7"
}

Example 2: Get the hash of the specific blockchain height

$ curl -H 'Content-Type: application/json' -H 'Accept:application/json' \
  --data '{"method":"getblockhash","params":{"height":1}}' http://localhost:21336
{
    "error": null,
    "id": null,
    "jsonrpc": "2.0",
    "result": "71b422e09dcd2f749d2adc0086735c210084cdb6b59bd4cd42e50455d024a662"
}

If you would like to learn more about what other JSON-RPC APIs are available for the node, please check out the JSON-RPC API

Contribution

We welcome contributions to the Elastos ELA Project.

Acknowledgments

A sincere thank you to all teams and projects that we rely on directly or indirectly.

License

This project is licensed under the terms of the MIT license.

elastos.ela's People

Contributors

alexpan0610 avatar bocheng0000 avatar free789 avatar gulige avatar hejianhui avatar heropan avatar houshoupei84 avatar kevingzhang avatar kpachhai avatar libbin avatar lifayi2008 avatar modongjie avatar peterwillcn avatar rainfallssilent avatar songsjun avatar superbigfu avatar umbrellateng avatar xiaomingloveqinger avatar xuliting avatar yz89 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elastos.ela's Issues

send updateProducer transaction error not overwritten

branch:dpos
commit:646203a5098e6ec7902b9bf3427d3db766f71476
tx:090B0021037F3CAEDE72447B6082C1E8F7705FFD1ED6E24F348130D34CBC7C0A35C9E993F507646F6E676C65690B7A68697A616F64616A69650C000000000000000831322E302E302E310100133331373237383934343537373235363832383201FE52A99C9CA67307BCEB50BA0A7D2E05E4461954FB34FCF29FBBEA7F7F08CB2800000000000001B037DB964A231458D2D6FFD5EA18944C4F90E63D547C5D3B9874DF66A4EAD0A300743BA40B00000000000000214FFBC4FB3B3C30A626A3B298BFA392A0121D42490000000000014140821CF72B20045AF7D29ABF9269825CE11B9BFC57BE2ED0DF71EACB61927F86238A8A022FE502DCC7F2B0FE20C854034B84AE43F65D08A4BDF5ACBA6ECF076EAD2321037F3CAEDE72447B6082C1E8F7705FFD1ED6E24F348130D34CBC7C0A35C9E993F5AC

error:
image

mac error starting dpos node

branch:dpos
commit:dc80174939836c636d397ee74800da905990263e
environment:mac
description:The startup node reports an error,[InitConnection] database connect failed.The reason may conflict with lowercase dpos in the project directory

[Bug]RPC Interface 'togglemining' doesn't support positional parameters

Environment

Python 3.6
requests

Node Version

Branch

dev

Commit

d98e30f

Code

# payload1 = {"method": 'togglemining', "params": [False]}
payload2 = {"method": 'togglemining', "params": {"mining":False}}
headers = '{"content-type": "application/json"}'
url_ela = "http://127.0.0.1:11336"
response_ela = requests.post(url_ela, json=payload2, headers=json.loads(headers))
print(response_ela.text)

Result

payload1

{"error":{"code":42002,"id":null,"message":"Invalid Params"},"jsonrpc":"2.0"}

payload2

{"id":null,"jsonrpc":"2.0","result":"mining stopped"}

[Bug] "invalid program hash prefix"

The function "CheckOutputProgramHash" dose not check the prefix of the pledge address , program will report "invalid program hash prefix" bug

Introducing webhooks , Notify hooks when a block is mined

Problem definetion

  • At this moment , we have no idea of when a block is mined , so when the developer want to check if a transaction is mined , he has to using a task job to constantly request if a transaction is arrived by using api /api/v1/transaction/{txid} which is very inefficient.

Propose solution

  • add a webhook mechanism to notify developer when a block is mined . So they know it is time to check if his transaction has been written to the chain.

Webwallet problem: "error quering the blockchain"

A community member (@SoulRip on telegram) has a problem with the webwallet. He gets the error: "error quering the blockchain". He changed browsers, cleared cache. Additionally, his wallet shows more than twice as much ELA as he should have and so does the block explorer

CheckMultiSigSignature unit test error (occurred randomly)

Error details:

validation_test.go:162:
Error Trace: validation_test.go:162
Error: Not equal:
expected: "invalid multi sign signatures, length not match"
actual : "The encodeData format is error"

		            	Diff:
		            	--- Expected
		            	+++ Actual
		            	@@ -1 +1 @@
		            	-invalid multi sign signatures, length not match
		            	+The encodeData format is error
		Test:       	TestCheckMultiSigSignature

'Log Out' in web wallet

The 'Log Out' button in the web wallet only appears on the 'Home' tab menu,
but not on any other tab such as 'Receive' , 'Send' or 'Me'.

TLS connection Fail .

when i am starting a Node . here is the output .

./node 
2018/03/29 13:05:48.505221 [INFO ] GID 1, 1. BlockChain init
2018/03/29 13:05:48.532955 [INFO ] GID 1, 2. Start the P2P networks
2018/03/29 13:05:48.844393 [INFO ] GID 1, IPv4:  192.168.31.36
2018/03/29 13:05:48.844477 [INFO ] GID 1, Init node ID to 0xef05d4bafc5fc934
2018/03/29 13:05:48.847343 [TRACE] GID 1, WaitForSyncFinish() node.go:331 BlockHeight is  0
2018/03/29 13:05:48.847418 [INFO ] GID 1, [ 1 0 0 ]
2018/03/29 13:05:48.847473 [TRACE] GID 1, WaitForSyncFinish() node.go:337 others height is  []
2018/03/29 13:05:48.849739 [TRACE] GID 1, NewPowService() pow.go:385 pow Service Init succeed
2018/03/29 13:05:48.849827 [INFO ] GID 1, 3. --Start the RPC service
2018/03/29 13:05:54.850387 [TRACE] GID 36, func1() main.go:44 BlockHeight =  0
2018/03/29 13:05:54.850695 [TRACE] GID 36, DumpState() blockchain.go:1011 bc.BestChain= 8d7014f2f941caa1972c8033b2f0a860ec8d4938b12bae2c62512852a558f405
2018/03/29 13:05:54.850784 [INFO ] GID 35, nbr heigh--> [] 0
2018/03/29 13:05:54.850828 [INFO ] GID 35, needSync:  false
2018/03/29 13:05:54.850848 [TRACE] GID 36, DumpState() blockchain.go:1020 bc.Root= 8d7014f2f941caa1972c8033b2f0a860ec8d4938b12bae2c62512852a558f405
2018/03/29 13:05:54.850899 [INFO ] GID 36, [ 1 0 0 ]

2018/03/29 13:05:54.852472 [ERROR] GID 41, non TLS connect failed: dial tcp 127.0.0.1:30338: getsockopt: connection refused

2018/03/29 13:06:00.849714 [INFO ] GID 35, nbr heigh--> [] 0
2018/03/29 13:06:00.850264 [ERROR] GID 42, non TLS connect failed:  dial tcp 127.0.0.1:30338: getsockopt: connection refused
2018/03/29 13:06:00.851726 [TRACE] GID 36, func1() main.go:44 BlockHeight =  0
2018/03/29 13:06:00.851764 [INFO ] GID 35, needSync:  false
2018/03/29 13:06:00.851816 [TRACE] GID 36, DumpState() blockchain.go:1011 bc.BestChain= 8d7014f2f941caa1972c8033b2f0a860ec8d4938b12bae2c62512852a558f405
2018/03/29 13:06:00.851913 [TRACE] GID 36, DumpState() blockchain.go:1020 bc.Root= 8d7014f2f941caa1972c8033b2f0a860ec8d4938b12bae2c62512852a558f405
2018/03/29 13:06:00.851979 [INFO ] GID 36, [ 1 0 0 ]

Do I need to get some certificate to run a node ? is there a way to Bypass that ?

Need add check for transfer cross chain asset transaction

outputs should not contain same address, this can lead to calculate recharge to side chain transaction fee error.
recharge to side chain transaction has no inputs, we can calculate fee only by output address, if has same address in main chain cross chain transaction, we may get a wrong fee.

Check the vote information

  1. the voting information can only be placed in the output payload of a TransferAsset (type 0x02) transaction.
  2. it can only use Delegate (0x01) as vote type for now.

Arrange unit test

  • replace sequence tests with test suite
  • decouple test method (later test method relay on former test method)
  • move database related test into database-specail unit test
  • remove useless test log

non TLS

2018/10/13 22:22:07.806197 [ERROR] GID 1391, non TLS connect failed: dial tcp 127.0.0.1:30338: getsockopt: connection refused

Question on Transferring of ELA between 2 wallets

I have 2 different Elastos Wallets. A few weeks ago, I was doing a test to transfer 1 ELA from Wallet A to Wallet B.

After transferring, I found out that the total transferring out was 1.995 ELA. Initially, I thought I typed the wrong digit. But, it was not. The final balance on Wallet A is still correct but, the additional 0.995 ELA was transferring to another address of Wallet A.

Example (Fee excluded for simplicity):
Before Transferring:-
Wallet A Address 1: 10 ELA
Wallet B Address 1: 0 ELA

After Transferring:-
Wallet A Address 1: 8.005 ELA
Wallet A Address 2: 0.995 ELA
Wallet A total: 9 ELA

Wallet B Address 1: 1 ELA

May I know what is the reason behind the transferring to its 2nd address on Wallet A?

Sidechain Merge Mining

I am also curious about merged mining. Usually the biggest disadvantage of merged mining is that additional daemon has to run on miners machine. It of course uses some cpu, space, memory, io and bandwidth. Big barrier for miners is also that most of daemons codebase are not maintained. So not a lot of big players are not willing to allow merge mining. If I would like to create my own Elastos sidechain with PoW so I would be able to merge mine alongside with Elastos, do I need to convince miners to deploy my own daemon or is the situation different to bitcoin merge mining? Thanks a lot

Error running glide update

I was wondering if anyone could help me with this. I just cloned the repo and was trying to do glide update but I get the following error:

kpachhai@kpubuntu:~/go/src/github.com/elastos/Elastos.ELA$ glide update
[WARN] The name listed in the config file (Elastos.ELA) does not match the current location (github.com/elastos/Elastos.ELA)
[INFO] Downloading dependencies. Please wait...
[INFO] --> Fetching github.com/golang/crypto
[INFO] --> Fetching github.com/syndtr/goleveldb
[INFO] --> Fetching github.com/itchyny/base58-go
[INFO] --> Fetching github.com/gorilla/websocket
[INFO] --> Fetching github.com/pborman/uuid
[INFO] --> Fetching github.com/pebbe/zmq4
[INFO] Resolving imports
[INFO] --> Fetching Elastos.ELA/common
[WARN] Unable to checkout Elastos.ELA/common
[ERROR] Error looking for Elastos.ELA/common: Cannot detect VCS
[WARN] Unable to set version on Elastos.ELA/common to . Err: Cannot detect VCS
[WARN] Unable to set version on Elastos.ELA/common to . Err: Cannot detect VCS
[WARN] Unable to set version on Elastos.ELA/common to . Err: Cannot detect VCS
[INFO] --> Fetching Elastos.ELA/consensus/pow
[WARN] Unable to checkout Elastos.ELA/consensus/pow
[ERROR] Error looking for Elastos.ELA/consensus/pow: Cannot detect VCS
[INFO] --> Fetching Elastos.ELA/core/ledger
[WARN] Unable to checkout Elastos.ELA/core/ledger
[ERROR] Error looking for Elastos.ELA/core/ledger: Cannot detect VCS
[INFO] --> Fetching Elastos.ELA/core/store
[WARN] Unable to checkout Elastos.ELA/core/store
[ERROR] Error looking for Elastos.ELA/core/store/ChainStore: Cannot detect VCS
[WARN] Unable to set version on Elastos.ELA/core/store to . Err: Cannot detect VCS
[INFO] --> Fetching Elastos.ELA/core/transaction
[WARN] Unable to checkout Elastos.ELA/core/transaction
[ERROR] Error looking for Elastos.ELA/core/transaction: Cannot detect VCS
[WARN] Unable to set version on Elastos.ELA/core/transaction to . Err: Cannot detect VCS
[INFO] --> Fetching Elastos.ELA/net/node
[WARN] Unable to checkout Elastos.ELA/net/node
[ERROR] Error looking for Elastos.ELA/net/node: Cannot detect VCS
[INFO] --> Fetching Elastos.ELA/net/protocol
[WARN] Unable to checkout Elastos.ELA/net/protocol
[ERROR] Error looking for Elastos.ELA/net/protocol: Cannot detect VCS
[INFO] --> Fetching Elastos.ELA/net/servers
[WARN] Unable to checkout Elastos.ELA/net/servers
[ERROR] Error looking for Elastos.ELA/net/servers: Cannot detect VCS
[WARN] Unable to set version on Elastos.ELA/net/servers to . Err: Cannot detect VCS
[WARN] Unable to set version on Elastos.ELA/net/servers to . Err: Cannot detect VCS
[WARN] Unable to set version on Elastos.ELA/net/servers to . Err: Cannot detect VCS
[WARN] Unable to set version on Elastos.ELA/net/servers to . Err: Cannot detect VCS
[INFO] --> Fetching Elastos.ELA/core/auxpow
[WARN] Unable to checkout Elastos.ELA/core/auxpow
[ERROR] Error looking for Elastos.ELA/core/auxpow: Cannot detect VCS
[INFO] --> Fetching Elastos.ELA/crypto
[WARN] Unable to checkout Elastos.ELA/crypto
[ERROR] Error looking for Elastos.ELA/crypto: Cannot detect VCS
[INFO] --> Fetching Elastos.ELA/events
[WARN] Unable to checkout Elastos.ELA/events
[ERROR] Error looking for Elastos.ELA/events: Cannot detect VCS
[INFO] --> Fetching Elastos.ELA/core/contract
[WARN] Unable to checkout Elastos.ELA/core/contract
[ERROR] Error looking for Elastos.ELA/core/contract: Cannot detect VCS
[WARN] Unable to set version on Elastos.ELA/core/contract to . Err: Cannot detect VCS
[INFO] --> Fetching Elastos.ELA/core/asset
[WARN] Unable to checkout Elastos.ELA/core/asset
[ERROR] Error looking for Elastos.ELA/core/asset: Cannot detect VCS
[INFO] --> Fetching Elastos.ELA/core/signature
[WARN] Unable to checkout Elastos.ELA/core/signature
[ERROR] Error looking for Elastos.ELA/core/signature: Cannot detect VCS
[INFO] --> Fetching Elastos.ELA/errors
[WARN] Unable to checkout Elastos.ELA/errors
[ERROR] Error looking for Elastos.ELA/errors: Cannot detect VCS
[WARN] Unable to set version on Elastos.ELA/core/store to . Err: Cannot detect VCS
[INFO] --> Fetching Elastos.ELA/core/code
[WARN] Unable to checkout Elastos.ELA/core/code
[ERROR] Error looking for Elastos.ELA/core/code: Cannot detect VCS
[INFO] --> Fetching Elastos.ELA/net/message
[WARN] Unable to checkout Elastos.ELA/net/message
[ERROR] Error looking for Elastos.ELA/net/message: Cannot detect VCS
[ERROR] Error scanning Elastos.ELA/common/config: cannot find package "." in:
/home/kpachhai/.glide/cache/src/https-Elastos.ELA-common/config
[ERROR] Error scanning Elastos.ELA/common/log: cannot find package "." in:
/home/kpachhai/.glide/cache/src/https-Elastos.ELA-common/log
[ERROR] Error scanning Elastos.ELA/common/serialization: cannot find package "." in:
/home/kpachhai/.glide/cache/src/https-Elastos.ELA-common/serialization
[ERROR] Error scanning Elastos.ELA/core/store/LevelDBStore: cannot find package "." in:
/home/kpachhai/.glide/cache/src/https-Elastos.ELA-core-store/LevelDBStore
[ERROR] Error scanning Elastos.ELA/core/transaction/payload: cannot find package "." in:
/home/kpachhai/.glide/cache/src/https-Elastos.ELA-core-transaction/payload
[ERROR] Error scanning Elastos.ELA/net/servers/httpjsonrpc: cannot find package "." in:
/home/kpachhai/.glide/cache/src/https-Elastos.ELA-net-servers/httpjsonrpc
[ERROR] Error scanning Elastos.ELA/net/servers/httpnodeinfo: cannot find package "." in:
/home/kpachhai/.glide/cache/src/https-Elastos.ELA-net-servers/httpnodeinfo
[ERROR] Error scanning Elastos.ELA/net/servers/httprestful: cannot find package "." in:
/home/kpachhai/.glide/cache/src/https-Elastos.ELA-net-servers/httprestful
[ERROR] Error scanning Elastos.ELA/net/servers/httpwebsocket: cannot find package "." in:
/home/kpachhai/.glide/cache/src/https-Elastos.ELA-net-servers/httpwebsocket
[ERROR] Error scanning Elastos.ELA/core/contract/program: cannot find package "." in:
/home/kpachhai/.glide/cache/src/https-Elastos.ELA-core-contract/program
[ERROR] Error scanning Elastos.ELA/core/store: cannot find package "." in:
/home/kpachhai/.glide/cache/src/https-Elastos.ELA-core-store
[INFO] --> Fetching github.com/golang/snappy
[ERROR] Failed to retrieve a list of dependencies: Error resolving imports

how to start sync block

I have Compiled and deployed the node
then i run ./node , it does not start to sync block

the logs:
2018/03/28 19:08:23.226005 [TRACE] GID 29, func1() main.go:44 BlockHeight = 0
2018/03/28 19:08:23.226054 [TRACE] GID 29, DumpState() blockchain.go:1011 bc.BestChain= 8d7014f2f941caa1972c8033b2f0a860ec8d4938b12bae2c62512852a558f405
2018/03/28 19:08:23.226089 [TRACE] GID 29, DumpState() blockchain.go:1020 bc.Root= 8d7014f2f941caa1972c8033b2f0a860ec8d4938b12bae2c62512852a558f405
2018/03/28 19:08:23.226112 [INFO ] GID 29, [ 1 0 0 ]
2018/03/28 19:08:29.190376 [INFO ] GID 28, nbr heigh--> [] 0
2018/03/28 19:08:29.190432 [INFO ] GID 28, needSync: false
2018/03/28 19:08:29.226269 [TRACE] GID 29, func1() main.go:44 BlockHeight = 0
2018/03/28 19:08:29.226312 [TRACE] GID 29, DumpState() blockchain.go:1011 bc.BestChain= 8d7014f2f941caa1972c8033b2f0a860ec8d4938b12bae2c62512852a558f405
2018/03/28 19:08:29.226368 [TRACE] GID 29, DumpState() blockchain.go:1020 bc.Root= 8d7014f2f941caa1972c8033b2f0a860ec8d4938b12bae2c62512852a558f405
2018/03/28 19:08:29.226388 [INFO ] GID 29, [ 1 0 0 ]

Use of ELA during Friendchain to Friendchain Atomic Swap

Example:
Friendchain E (ETH VM Friendchain) has token E
Friendchain N (NEO VM Friendchain) has token N

An address on Friendchain E wants to swap his tokens for Token N on an address on Friendchain N

To facilitate this swap would ELA be used once the conditions were met for doing the swap?

Quantum Proof Cryptography

A question what i was asked in Telegram.

Will the Elastos Blockchain has Quantum Proof Cryptography in the future?

Marcus S.

Issue with block explorer?

I saw someone complained on Telegram about not receiving the ELA after transferring from Huobi. Then, I saw there is no blocks on block explorer.

blockexplorer

noblock

update producer error

branch :dpos
commit :13a28af4c3d22949629681dcb7a8af3fe631ca9e
[CheckUpdateProducerTransaction], Duplicated nick name

In the sync block, when the arbitrator's information verification error occurs, the node program will have a memory overflow error. The log information as below:

2018/12/20 08:20:34.023238 [INF] GID 1, internal nbr address [172.31.32.193:24338 172.31.45.130:34142]
2018/12/20 08:20:36.353710 [INF] GID 44474, internal nbr height--> [155294 57260] 57260
2018/12/20 08:20:37.380932 [ERR] GID 44498, non TLS connect failed: dial tcp 172.31.36.176:24338: connect: connection refused
2018/12/20 08:20:39.085479 [INF] GID 44474, internal nbr address [172.31.32.193:24338 172.31.45.130:34142]
2018/12/20 08:20:39.859269 [ERR] GID 44500, non TLS connect failed: dial tcp 172.31.39.172:24338: connect: connection refused
2018/12/20 08:20:40.166366 [INF] GID 44474, needSync: true
2018/12/20 08:20:42.052498 [INF] GID 44474, BlockHeight = 57260
fatal error: runtime: out of memory

runtime stack:
runtime.throw(0x986135, 0x16)
/usr/lib/go-1.10/src/runtime/panic.go:619 +0x81
runtime.sysMap(0xc44eef0000, 0x100000, 0xa5f900, 0xc84c38)
/usr/lib/go-1.10/src/runtime/mem_linux.go:216 +0x20a
runtime.(*mheap).sysAlloc(0xc6b940, 0x100000, 0x78000c05dc)
/usr/lib/go-1.10/src/runtime/malloc.go:470 +0xd4
runtime.(*mheap).grow(0xc6b940, 0x4, 0x0)
/usr/lib/go-1.10/src/runtime/mheap.go:907 +0x60
runtime.(*mheap).allocSpanLocked(0xc6b940, 0x4, 0xc84c60, 0x0)
/usr/lib/go-1.10/src/runtime/mheap.go:820 +0x301
runtime.(*mheap).allocManual(0xc6b940, 0x4, 0xc84c60, 0xa1466)
/usr/lib/go-1.10/src/runtime/mheap.go:782 +0x53
runtime.stackpoolalloc(0xc83201, 0xc420d7e000)
/usr/lib/go-1.10/src/runtime/stack.go:179 +0x79
runtime.stackcacherefill(0x7f3ffd61f6c8, 0x7f3fea7fbc01)
/usr/lib/go-1.10/src/runtime/stack.go:260 +0x44
runtime.stackalloc(0x1000, 0xc44ee8eec0, 0x97983e)
/usr/lib/go-1.10/src/runtime/stack.go:362 +0x151
runtime.copystack(0xc422548c00, 0x1000, 0x42bb01)
/usr/lib/go-1.10/src/runtime/stack.go:840 +0x7d
runtime.newstack()
/usr/lib/go-1.10/src/runtime/stack.go:1063 +0x30f
runtime.morestack()
/usr/lib/go-1.10/src/runtime/asm_amd64.s:480 +0x89

goroutine 44463 [copystack]:
net.parsePort(0xc42002230e, 0x5, 0xc420022300, 0x13)
/usr/lib/go-1.10/src/net/port.go:15 +0x1a0 fp=0xc4203dc370 sp=0xc4203dc368 pc=0x53f530
net.(*Resolver).LookupPort(0xc64490, 0x9e6fe0, 0xc420024090, 0x979c61, 0x3, 0xc42002230e, 0x5, 0x0, 0x0, 0x35)
/usr/lib/go-1.10/src/net/lookup.go:267 +0x3f fp=0xc4203dc3d0 sp=0xc4203dc370 pc=0x538e1f
net.(*Resolver).internetAddrList(0xc64490, 0x9e6fe0, 0xc420024090, 0x979c61, 0x3, 0xc420022300, 0x13, 0xc420184f00, 0x0, 0x0, ...)
/usr/lib/go-1.10/src/net/ipsock.go:251 +0x7f7 fp=0xc4203dc510 sp=0xc4203dc3d0 pc=0x536827
net.ResolveTCPAddr(0x979c61, 0x3, 0xc420022300, 0x13, 0x42d13b, 0xc4203dc5c0, 0x453bf0)
/usr/lib/go-1.10/src/net/tcpsock.go:76 +0xa4 fp=0xc4203dc590 sp=0xc4203dc510 pc=0x542464
github.com/elastos/Elastos.ELA/node.resolveTCPAddr(0xc420022300, 0x13, 0xc421d96840, 0x0, 0x0, 0xc421d96840)
/home/liteng/dev/src/github.com/elastos/Elastos.ELA/node/link.go:150 +0x51 fp=0xc4203dc608 sp=0xc4203dc590 pc=0x6e95c1
github.com/elastos/Elastos.ELA/node.(*node).Connect(0xc420280000, 0xc420022300, 0x13, 0xc4203dc7c0, 0x0)
/home/liteng/dev/src/github.com/elastos/Elastos.ELA/node/link.go:161 +0x50 fp=0xc4203dc740 sp=0xc4203dc608 pc=0x6e9740
github.com/elastos/Elastos.ELA/node.(*node).ConnectNodes(0xc420280000)
/home/liteng/dev/src/github.com/elastos/Elastos.ELA/node/infoupdate.go:165 +0xbf fp=0xc4203dc7d8 sp=0xc4203dc740 pc=0x6e76df
runtime.goexit()
/usr/lib/go-1.10/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc4203dc7e0 sp=0xc4203dc7d8 pc=0x457ce1
created by github.com/elastos/Elastos.ELA/node.InitLocalNode.func1
/home/liteng/dev/src/github.com/elastos/Elastos.ELA/node/node.go:171 +0x82

Getting error when making on Mac OS: cannot use nil as type _Ctype_CFDataRef in assignment

Chiawens-iMac:Elastos.ela yang$ make
go build -ldflags "-X ELA/common/config.Version=v0.0.1-5-ga7077-3-g1641" -o node main.go

vendor/crypto/x509

/usr/local/Cellar/go/1.10/libexec/src/vendor/crypto/x509/root_cgo_darwin.go:210: cannot use nil as type _Ctype_CFDataRef in assignment
/usr/local/Cellar/go/1.10/libexec/src/vendor/crypto/x509/root_cgo_darwin.go:211: cannot use nil as type _Ctype_CFDataRef in assignment
/usr/local/Cellar/go/1.10/libexec/src/vendor/crypto/x509/root_cgo_darwin.go:221: cannot convert nil to type _Ctype_CFDataRef
make: *** [all] Error 2
Chiawens-iMac:Elastos.ela yang$

Getting some errors in testnet

2018/07/24 16:18:04.720578 [TRACE] GID 161, ProcessBlock() blockchain.go:1032 [ProcessBLock] orphan already exist= false
2018/07/24 16:18:04.720793 [ERROR] GID 161, PowCheckBlockSanity error [PowCheckBlockSanity] reward amount in coinbase not correct
2018/07/24 16:18:04.720843 [ERROR] GID 161, Handle message error: Block add failed: [PowCheckBlockSanity] reward amount in coinbase not correct ,block hash 25b946823860a72fd537547e8df5317d945471a7fd81e5815a0a36c5aa88d288

My config file:

{
  "Configuration": {
    "Magic": 2018001,
    "Version": 23,
    "SeedList": [
      "node-testnet-001.elastos.org:21866",
      "node-testnet-002.elastos.org:21866",
      "node-testnet-003.elastos.org:21866"
    ],
    "HttpInfoPort": 21333,
    "HttpInfoStart": true,
    "HttpRestPort": 21334,
    "HttpWsPort": 21335,
    "WsHeartbeatInterval": 60,
    "HttpJsonPort": 21336,
    "NodePort": 21338,
    "NodeOpenPort": 21866,
    "OpenService": false,
    "PrintLevel": 1,
    "MaxLogsSize": 0,
    "MaxPerLogSize": 0,
    "IsTLS": false,
    "CertPath": "./sample-cert.pem",
    "KeyPath": "./sample-cert-key.pem",
    "CAPath": "./sample-ca.pem",
    "MultiCoreNum": 4,
    "MaxTransactionInBlock": 10000,
    "MaxBlockSize": 8000000,
    "MinCrossChainTxFee": 10000,
    "FoundationAddress":"8ZNizBf4KhhPjeJRGpox6rPcHE5Np6tFx3",
    "PowConfiguration": {
      "PayToAddr": "EMUtWJNq1GF2w5JzpvH8ZUmNkCmqRsTpKD",
      "AutoMining": true,
      "MinerInfo": "ELA",
      "MinTxFee": 100,
      "ActiveNet": "TestNet"
    },
    "Arbiters": [
      "03e333657c788a20577c0288559bd489ee65514748d18cb1dc7560ae4ce3d45613",
      "02dd22722c3b3a284929e4859b07e6a706595066ddd2a0b38e5837403718fb047c",
      "03e4473b918b499e4112d281d805fc8d8ae7ac0a71ff938cba78006bf12dd90a85",
      "03dd66833d28bac530ca80af0efbfc2ec43b4b87504a41ab4946702254e7f48961",
      "02c8a87c076112a1b344633184673cfb0bb6bce1aca28c78986a7b1047d257a448"
    ]
  }
}

The "PayToAddr" is my own wallet address that i got from wallet-beta.elastos.org

Ela block question

So, according to whitepaper, a single ela block can have unlimited number of transactions unlike btc that can only hold up to 1 MB of transactions at the moment. How did the dev team address the drawbacks resulting from block size limit removal? Indeed, removing the size limit of blocks would cause increasing computational efforts by the miners and several other issues I'm assuming?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.