GithubHelp home page GithubHelp logo

autonity / autonity Goto Github PK

View Code? Open in Web Editor NEW
63.0 63.0 61.0 191.55 MB

Autonity Go Client (AGC)

License: GNU Lesser General Public License v3.0

Dockerfile 0.01% Makefile 0.14% Go 85.43% Shell 0.08% NSIS 0.15% Ruby 0.01% Python 1.00% HTML 0.07% JavaScript 4.70% Solidity 2.92% Assembly 0.61% C 4.33% M4 0.17% Java 0.19% Sage 0.19%
autonity

autonity's Introduction


Main client software for Autonity networks

codecov Go Report Card License License GitHub issues GitHub forks GitHub stars


Documentation @ https://docs.autonity.org

What is Autonity?

Autonity is an EVM-based Layer 1 blockchain protocol for peer-to-peer networks hosting decentralised risk markets. Autonity networks are permissionless: access is open to all and anyone can operate a network node.

Autonity networks are Byzantine fault-tolerant and secured by delegated Proof of Stake using Tendermint consensus. Autonity has native protocol coins and implements a liquid staking model. Native coins are the Auton utility coin used in the transaction fee mechanism and Newton for staking the network. Liquid Newton is minted and burned as stake is bonded and redeemed.

Key features of the Autonity Protocol are:

  • immediate and deterministic transaction finality in a public environment where participant nodes can join the network dynamically without permission
  • delegated Proof of Stake consensus for committee selection and blockchain management, using the deterministic Tendermint BFT consensus algorithm
  • dual coin tokenomics, with native coins Auton and Newton for utility and staking
  • liquid staking for capital efficiency, staked newton yielding transferrable Liquid Newton redeemed for Newton on unbonding stake
  • epoch-based staking reward distribution

Core technology is the Autonity Go Client (AGC). AGC is the reference implementation of the Autonity Protocol and provides the main client software run by participant peer nodes in an Autonity network system. The client is a fork of Go Ethereum.

For more information about Autonity networks and risk markets visit the Project website @ http://autonity.org.

Installation

The minimum recommended device specifications for an Autonity node are:

Requirement Minimum Recommended
OS Ubuntu 20.04 LTS Ubuntu 20.04 LTS
CPU 3.10 GHz with 8 CPU's 3.10 GHz with 16 CPU's
RAM 8GB 16GB
Storage 1024GB free storage for full nodes and Validators 1024 GB free storage for full nodes and validators
Network interface 200 Mbit/s 200 Mbit/s

Linux Binaries

Download pre-built binaries of the Autonity client and NodeJS Console CLI for Linux from the Release Archive.

Build from source

Prerequisites

To build you will need :

Get the source code

Clone the Autonity Go Client repository:

git clone [email protected]:autonity/autonity.git
cd autonity

Build

To build the Autonity Go Client (AGC) run:

make autonity

This generates the Autonity binary in the /build/bin/ directory. Run ./build/bin/autonity to start the client, CTRL+C to stop. To view the client's command-line options run autonity --help.

To build the Autonity Go Client (AGC) and Tools in the cmd subdirectory, run:

make all

To build the Docker image run:

make build-docker-image

This generates the Autonity Go Client Docker image and manifest.

Run a node

Quick-start connecting to an Autonity testnet by using a testnet flag in the command line to set the genesis config for that network when starting the client. For example, to connect to the Piccadilly Testnet:

./build/bin/autonity --piccadilly

For full docs on how to run the client and connect to a public Autonity network see Networks and Run Autonity.

Connect to a node using Autonity Utility Tool aut

The recommended way of interacting with an Autonity node is via aut, which provides a command-line interface to Autonity-specific queries and operations, as well as much of the base Ethereum functionality.

For source code, installation, and usage see the aut repository.

See the docs how to Setup the Autonity Utility Tool (aut) for how to make calls and submit transactions.

Networks

Testnets

For details of public Autonity networks, see docs.autonity.org/networks.

Development

To run the tests, you will need the following prerequisites installed:

License

The library (i.e. all code outside of the cmd directory) is licensed under the GNU Lesser General Public License v3.0, also included in the repository in the COPYING.LESSER file.

The binaries (i.e. all code inside of the cmd directory) is licensed under the GNU General Public License v3.0, also included in the repository in the COPYING file.

autonity's People

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

Watchers

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

autonity's Issues

Distributed network tests

We need to test a distributed network with optional malicious users to check Autonity properties such as network permissioning, consensus security, consensus liveness.
One of the candidates to solve the issue if Ethereum Hive https://github.com/ethereum/hive

The issue is to try to write a first and very basic test on Autonity client using Hive

Better Config Management

Configurations in Autonity is complicated, in order to make sure intended config reach the correct level we need to better understand how they work, here is a brief breakdown:

AutonityConfig
   |--> Config (eth.Config) 
             |--> Genesis
                      |--> ChainConfig
                                |--> EthashConfig
                                |--> CliqueConfig
                                |--> IstanbulConfig
                                |--> TendermintConfig
}

If you also notice that there is Tendermint.Config and Istanbul.Config, which is different from IstanbulConfig and TendermintConfig defined in params/config.go. The purpose of this is to allow for runtime config variability in some consensus parameters, such as the period between blocks, how large are timeouts for the rounds, etc.

If we don't have Tendermint.Config and Istanbul.Config and their respective flags we lose the ability to configure these value for an existing network. So for things like ABI, deployer and bytecode, we will not have the flags (which we know shouldn't be modified at runtime) and thus the Tendermint.Config and ChainConfig.TendermintConfig will now be different (which is not the case currently).

For the current implementation, this code needs to be refactored, and for the future flags and changes in configuration, the above considerations need to be made.

Consider moving hello world to its own repository

The hello world folder uses a docker image hosted on Docker Hub so there is no need to download the entire Autonity codebase.

In order to promote people being able to try out the hello world as easily as possible it is suggested that this folder is moved to its own repository. This would allow the end user to get started more quickly and not have to wait to download all of the Autonity codebase which is not required.

Please +1 or -1 and not any objections.

API for Glienicke contract

Develop an RPC API for the Glienicke contract which manages the member's list for network permissioning. TBC

Add new messages for Tendermint and their handlers

New message handling:

  • Add more message for sending prevote(nil), precommit(nil).
  • Handle for the new messages.
  • Update what is sent during the messages according to the Latest Gossip on BFT consensus, such as locked round and value, valid round and value etc.

Estimate effort to comply with the EEA Permissioning Specification

The Ethereum Enterprise Alliance Specification version 3 was published recently and standardises the permissioning approach for EEA clients. The approach is similar to the approach that Autonity takes.

The ask for this issue is to estimate the effort required to implement the interface expressed in 7.3.3 of the specification. No development work is needed. In the permissioning model the interface is separated from the implementation of the permissioning model.

This can be scheduled for the next sprint, discussed on the issue and is not urgent.

Related issues:

Decide on compatibility with the Light Ethereum Subprotocol

From an Architecture point of view, we do not currently assume that we will provide a light client; however, our current policy has been for Autonity to remain compatible with the LES. We should discuss whether this policy makes sense and is not too burdensome, or whether there are valid considerations for not pursuing LES compatibility for now.

Sort whitelist before contract deploy

backend.getValidators() is called many times until Genesis is committed to the blockchain. And genesis.Commit() is called 2-3 times also.
So DeployGlienickeContract should be deployed each time with exactly the same code and data. In the other case, it can lead to inconsistent StateDb.

P.S. I've tried to go deeper to understand how this can happen that genesis.Commit() is called many times. However, after an hour, I realised that it can take the whole day or more to find the cause and anyway we're going to rewrite the consensus.

By far we'll see multiple Deployed Glienicke Contract in the logs.

Network Permissionning

Opening this issue to describe and discuss the current network permissionning approach.

Rationale

  • The Autonity client is built around and for private network, hence network permissionning is a fundamental feature.
  • The network is symmetric, all the participant in the network have by default the same privileges than the others. Therefore mutual authentication is required.

Description and rules

Currently, network permissionning is using the Glienecke smart-contract interface to retrieve the list of authorized enodes. However, in a blockchain context, where there is no guarantee of synchronized node state, the enforcement of is not straightforward: the NodeID by itself is not sufficient, we need to know as well how far ahead of us a peer is, and this information can be only retrieved post Ethereum sub-protocol handshake via the total difficulty parameter.
I will give some example later.

Description of the currently implemented protocol:

  • The Ethereum service is updating an internal whitelist via the Glienecke contract before block insertion.
  • We try dialing every enodes present in the whitelist on a periodic basis.
  • At DevP2P layer, RLPx ensures that a peer possesses the private key associated with his disclosed NodeId. ECDH is being used to establish a secure shared AES session key for encrypting all futures packets.
  • After successful authentication at DevP2P layer, ETH sub protocol will initiate a handshake, the current total difficulty will be exchanged, which is equal to the chain height with xBFT. Then the following rules are enforced :
  1. If the peer total difficulty is greater than ours we accept the incoming connection
  2. If the peer is present in the local whitelist we accept the incoming connection. Previously I was only checking the NodeID but @JekaMas introduced a check on the IP address as well.

Otherwise, the connection is rejected.

Potential issue and vulnerabilities

  • The current implementation is unfinished, we need to stop relaying data when synchronizing. Indeed a malicious peer could fake its TD or a connection can be attempted on a previously authorized peer.

I will update the document to reflect as well the changes that were made with the new enode format.

Existing attacks

Remove IBFT round change timer and add Tendermint timeouts and their handlers

Timeouts:

  • Make sure to always wait for more than โ…” message in prevote and precommit step before starting the respective timer.
  • Add timeouts for each stage: timeoutPropose, timeoutPrevote, timeoutPrecommit. (Reference: Tendermint's ticker implementation can be found consensus/ticker.go timeoutTicker.timeoutRoutine())
  • Timeout handling. (Reference: Tendermint's consensus/state.go ConsensusState.handleTimeout(ti timeoutInfo, rs cstypes.RoundState))
  • Option to configure timeouts' initial values.
  • Option to configure how the timers are incremented.
  • Increment timers linearly instead of exponentially.
  • Introduce better time notation than in ibft. This code is used for proposal verification. The problem is that we canโ€™t say anything about clocks on a remote peer. This is too strict requirements which will lead to rejecting a correct proposal, or even to dropping all proposals from any validator that has not synced with peer in time. Ethash suggests defining an allowed time difference:
  • Tendermint consensus has the same non-strict and BFT Time checks at pull request, however, for the time being we should calculate median time over all honest validators instead of using time.Now().

Inspect Permissioning

It seems that it's possible to get chain data even if a peer is not in the whitelist.

Istanbul API `istanbul.getValidators()` failing

When doing istanbul.getValidators() after attaching a console, autonity breaks:

While using helloworld (currently in hello_world branch)

ERROR[02-14|23:15:31.701] goroutine 184 [running]:
github.com/clearmatics/autonity/rpc.(*Server).serveRequest.func1(0xc00581f8c0, 0x1238760, 0xc00526b4a0)
      /autonity/build/_workspace/src/github.com/clearmatics/autonity/rpc/server.go:132 +0xf2
panic(0xe901c0, 0x1957ca0)
      /usr/local/go/src/runtime/panic.go:513 +0x1b9
github.com/clearmatics/autonity/consensus/istanbul/backend.(*API).GetValidators(0xc0057aebe0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
      /autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/backend/api.go:33 +0x43
reflect.Value.call(0xc0058035c0, 0xc00000f880, 0x13, 0xfcc9b5, 0x4, 0xc00596f140, 0x2, 0x2, 0x0, 0xc00596f140, ...)
      /usr/local/go/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xc0058035c0, 0xc00000f880, 0x13, 0xc00596f140, 0x2, 0x2, 0x1, 0x1, 0x0)
      /usr/local/go/src/reflect/value.go:308 +0xa4
github.com/clearmatics/autonity/rpc.(*Server).handle(0xc00581f8c0, 0x1232ea0, 0xc0059d6000, 0x1238760, 0xc00526b4a0, 0xc005954c60, 0xc00526b510, 0x0, 0xe82660)
      /autonity/build/_workspace/src/github.com/clearmatics/autonity/rpc/server.go:309 +0x6cc
github.com/clearmatics/autonity/rpc.(*Server).exec(0xc00581f8c0, 0x1232ea0, 0xc0059d6000, 0x1238760, 0xc00526b4a0, 0xc005954c60)
      /autonity/build/_workspace/src/github.com/clearmatics/autonity/rpc/server.go:330 +0x1a6
github.com/clearmatics/autonity/rpc.(*Server).serveRequest(0xc00581f8c0, 0x1232f60, 0xc00596f0b0, 0x1238760, 0xc00526b4a0, 0xfd5a01, 0x1, 0x0, 0x0)
      /autonity/build/_workspace/src/github.com/clearmatics/autonity/rpc/server.go:192 +0x36e
github.com/clearmatics/autonity/rpc.(*Server).ServeSingleRequest(0xc00581f8c0, 0x1232f60, 0xc00596f0b0, 0x1238760, 0xc00526b4a0, 0x1)
      /autonity/build/_workspace/src/github.com/clearmatics/autonity/rpc/server.go:223 +0x65
github.com/clearmatics/autonity/rpc.(*Server).ServeHTTP(0xc00581f8c0, 0x12317a0, 0xc005938700, 0xc000268a00)
      /autonity/build/_workspace/src/github.com/clearmatics/autonity/rpc/http.go:253 +0x4a6
github.com/clearmatics/autonity/vendor/github.com/rs/cors.(*Cors).Handler.func1(0x12317a0, 0xc005938700, 0xc000268a00)
      /autonity/build/_workspace/src/github.com/clearmatics/autonity/vendor/github.com/rs/cors/cors.go:190 +0xf2
net/http.HandlerFunc.ServeHTTP(0xc005848ee0, 0x12317a0, 0xc005938700, 0xc000268a00)
      /usr/local/go/src/net/http/server.go:1964 +0x44
github.com/clearmatics/autonity/rpc.(*virtualHostHandler).ServeHTTP(0xc005848f00, 0x12317a0, 0xc005938700, 0xc000268a00)
      /autonity/build/_workspace/src/github.com/clearmatics/autonity/rpc/http.go:311 +0x206
net/http.serverHandler.ServeHTTP(0xc005858000, 0x12317a0, 0xc005938700, 0xc000268a00)
      /usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc005978460, 0x1232ea0, 0xc0058976c0)
      /usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
      /usr/local/go/src/net/http/server.go:2851 +0x2f5

[CI] Tests are not stable due to data races in IBFT

We should check a few IBFT data races to have more stable and reliable tests.
There are quite a few data races more in Autonity tests, however, most of them are from Geth codebase and should be fixed after rebasing to 1.8.23 - has only 2 data races - or can be ignored.

==================
WARNING: DATA RACE
Write at 0x000001479930 by goroutine 90:
  github.com/clearmatics/autonity/consensus/istanbul/backend.New()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/backend/backend.go:60 +0x2d9
  github.com/clearmatics/autonity/consensus/istanbul/backend.newBlockChain()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/backend/engine_test.go:49 +0x222
  github.com/clearmatics/autonity/consensus/istanbul/backend.TestVerifyHeaders()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/backend/engine_test.go:364 +0x4f
  testing.tRunner()
      /snap/go/3417/src/testing/testing.go:865 +0x163

Previous read at 0x000001479930 by goroutine 41:
  github.com/clearmatics/autonity/consensus/istanbul/backend.(*backend).Validators()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/backend/backend.go:129 +0x15b
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).startNewRound()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/core.go:231 +0x1abe
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).handleTimeoutMsg()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/handler.go:198 +0x1f9
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).handleEvents()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/handler.go:117 +0x978

Goroutine 90 (running) created at:
  testing.(*T).Run()
      /snap/go/3417/src/testing/testing.go:916 +0x65a
  testing.runTests.func1()
      /snap/go/3417/src/testing/testing.go:1157 +0xa8
  testing.tRunner()
      /snap/go/3417/src/testing/testing.go:865 +0x163
  testing.runTests()
      /snap/go/3417/src/testing/testing.go:1155 +0x523
  testing.(*M).Run()
      /snap/go/3417/src/testing/testing.go:1072 +0x2eb
  main.main()
      _testmain.go:70 +0x222

Goroutine 41 (running) created at:
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).Start()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/handler.go:32 +0x88
  github.com/clearmatics/autonity/consensus/istanbul/backend.(*backend).Start()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/backend/engine.go:492 +0x1a2
  github.com/clearmatics/autonity/consensus/istanbul/backend.newBlockChain()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/backend/engine_test.go:55 +0x4b7
  github.com/clearmatics/autonity/consensus/istanbul/backend.TestGetProposer()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/backend/backend_test.go:181 +0x4f
  testing.tRunner()
      /snap/go/3417/src/testing/testing.go:865 +0x163
==================
--- FAIL: TestVerifyHeaders (4.12s)
    testing.go:809: race detected during execution of test
FAIL
FAIL	github.com/clearmatics/autonity/consensus/istanbul/backend	29.228s
==================
WARNING: DATA RACE
Read at 0x00c0001f3ce8 by goroutine 25:
  github.com/clearmatics/autonity/consensus/istanbul/core.TestNewRequest()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/core_test.go:68 +0x328
  testing.tRunner()
      /snap/go/3417/src/testing/testing.go:865 +0x163

Previous write at 0x00c0001f3ce8 by goroutine 26:
  github.com/clearmatics/autonity/consensus/istanbul/core.(*testSystemBackend).Commit()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/testbackend_test.go:97 +0x2fa
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).commit()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/core.go:175 +0x403
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).handleCommit()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/commit.go:78 +0x2e4
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).handleCheckedMsg()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/handler.go:173 +0x6df
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).handleMsg()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/handler.go:152 +0x47f
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).handleEvents()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/handler.go:99 +0x6f7

Goroutine 25 (running) created at:
  testing.(*T).Run()
      /snap/go/3417/src/testing/testing.go:916 +0x65a
  testing.runTests.func1()
      /snap/go/3417/src/testing/testing.go:1157 +0xa8
  testing.tRunner()
      /snap/go/3417/src/testing/testing.go:865 +0x163
  testing.runTests()
      /snap/go/3417/src/testing/testing.go:1155 +0x523
  testing.(*M).Run()
      /snap/go/3417/src/testing/testing.go:1072 +0x2eb
  main.main()
      _testmain.go:78 +0x222

Goroutine 26 (running) created at:
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).Start()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/handler.go:32 +0x88
  github.com/clearmatics/autonity/consensus/istanbul/core.(*testSystem).Run()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/testbackend_test.go:251 +0xc2
  github.com/clearmatics/autonity/consensus/istanbul/core.TestNewRequest()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/core_test.go:54 +0xe3
  testing.tRunner()
      /snap/go/3417/src/testing/testing.go:865 +0x163
==================
==================
WARNING: DATA RACE
Read at 0x00c000396240 by goroutine 25:
  github.com/clearmatics/autonity/core/types.(*Block).Number()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/core/types/block.go:293 +0x6c
  github.com/clearmatics/autonity/consensus/istanbul/core.TestNewRequest()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/core_test.go:71 +0x404
  testing.tRunner()
      /snap/go/3417/src/testing/testing.go:865 +0x163

Previous write at 0x00c000396240 by goroutine 26:
  [failed to restore the stack]

Goroutine 25 (running) created at:
  testing.(*T).Run()
      /snap/go/3417/src/testing/testing.go:916 +0x65a
  testing.runTests.func1()
      /snap/go/3417/src/testing/testing.go:1157 +0xa8
  testing.tRunner()
      /snap/go/3417/src/testing/testing.go:865 +0x163
  testing.runTests()
      /snap/go/3417/src/testing/testing.go:1155 +0x523
  testing.(*M).Run()
      /snap/go/3417/src/testing/testing.go:1072 +0x2eb
  main.main()
      _testmain.go:78 +0x222

Goroutine 26 (running) created at:
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).Start()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/handler.go:32 +0x88
  github.com/clearmatics/autonity/consensus/istanbul/core.(*testSystem).Run()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/testbackend_test.go:251 +0xc2
  github.com/clearmatics/autonity/consensus/istanbul/core.TestNewRequest()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/core_test.go:54 +0xe3
  testing.tRunner()
      /snap/go/3417/src/testing/testing.go:865 +0x163
==================
==================
WARNING: DATA RACE
Read at 0x00c00002faf0 by goroutine 25:
  runtime.slicecopy()
      /snap/go/3417/src/runtime/slice.go:197 +0x0
  github.com/clearmatics/autonity/core/types.(*Block).Number()
      /snap/go/3417/src/math/big/nat.go:94 +0x178
  github.com/clearmatics/autonity/consensus/istanbul/core.TestNewRequest()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/core_test.go:71 +0x404
  testing.tRunner()
      /snap/go/3417/src/testing/testing.go:865 +0x163

Previous write at 0x00c00002faf0 by goroutine 26:
  [failed to restore the stack]

Goroutine 25 (running) created at:
  testing.(*T).Run()
      /snap/go/3417/src/testing/testing.go:916 +0x65a
  testing.runTests.func1()
      /snap/go/3417/src/testing/testing.go:1157 +0xa8
  testing.tRunner()
      /snap/go/3417/src/testing/testing.go:865 +0x163
  testing.runTests()
      /snap/go/3417/src/testing/testing.go:1155 +0x523
  testing.(*M).Run()
      /snap/go/3417/src/testing/testing.go:1072 +0x2eb
  main.main()
      _testmain.go:78 +0x222

Goroutine 26 (running) created at:
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).Start()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/handler.go:32 +0x88
  github.com/clearmatics/autonity/consensus/istanbul/core.(*testSystem).Run()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/testbackend_test.go:251 +0xc2
  github.com/clearmatics/autonity/consensus/istanbul/core.TestNewRequest()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/core_test.go:54 +0xe3
  testing.tRunner()
      /snap/go/3417/src/testing/testing.go:865 +0x163
==================
==================
WARNING: DATA RACE
Read at 0x00c000207730 by goroutine 25:
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).stopTimer()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/core.go:314 +0x58
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).Stop()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/handler.go:39 +0x38
  github.com/clearmatics/autonity/consensus/istanbul/core.(*testSystem).stop()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/testbackend_test.go:265 +0xde
  github.com/clearmatics/autonity/consensus/istanbul/core.(*testSystem).Run.func1()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/testbackend_test.go:256 +0x49
  github.com/clearmatics/autonity/consensus/istanbul/core.TestNewRequest()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/core_test.go:78 +0x10ed
  testing.tRunner()
      /snap/go/3417/src/testing/testing.go:865 +0x163

Previous write at 0x00c000207730 by goroutine 26:
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).newRoundChangeTimer()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/core.go:329 +0x1bd
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).startNewRound()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/core.go:257 +0xcc7
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).handleFinalCommitted()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/final_committed.go:24 +0x184
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).handleEvents()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/handler.go:124 +0xa03

Goroutine 25 (running) created at:
  testing.(*T).Run()
      /snap/go/3417/src/testing/testing.go:916 +0x65a
  testing.runTests.func1()
      /snap/go/3417/src/testing/testing.go:1157 +0xa8
  testing.tRunner()
      /snap/go/3417/src/testing/testing.go:865 +0x163
  testing.runTests()
      /snap/go/3417/src/testing/testing.go:1155 +0x523
  testing.(*M).Run()
      /snap/go/3417/src/testing/testing.go:1072 +0x2eb
  main.main()
      _testmain.go:78 +0x222

Goroutine 26 (running) created at:
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).Start()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/handler.go:32 +0x88
  github.com/clearmatics/autonity/consensus/istanbul/core.(*testSystem).Run()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/testbackend_test.go:251 +0xc2
  github.com/clearmatics/autonity/consensus/istanbul/core.TestNewRequest()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/core_test.go:54 +0xe3
  testing.tRunner()
      /snap/go/3417/src/testing/testing.go:865 +0x163
==================
==================
WARNING: DATA RACE
Write at 0x00c0004b4c58 by goroutine 42:
  sync.(*WaitGroup).Wait()
      /snap/go/3417/src/internal/race/race.go:41 +0xef
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).Stop()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/handler.go:43 +0x72
  github.com/clearmatics/autonity/consensus/istanbul/core.(*testSystem).stop()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/testbackend_test.go:265 +0xde
  github.com/clearmatics/autonity/consensus/istanbul/core.(*testSystem).Run.func1()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/testbackend_test.go:256 +0x49
  github.com/clearmatics/autonity/consensus/istanbul/core.TestHandleMsg()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/handler_test.go:127 +0x1794
  testing.tRunner()
      /snap/go/3417/src/testing/testing.go:865 +0x163

Previous read at 0x00c0004b4c58 by goroutine 44:
  sync.(*WaitGroup).Add()
      /snap/go/3417/src/internal/race/race.go:37 +0x169
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).handleEvents()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/handler.go:80 +0xaa

Goroutine 42 (running) created at:
  testing.(*T).Run()
      /snap/go/3417/src/testing/testing.go:916 +0x65a
  testing.runTests.func1()
      /snap/go/3417/src/testing/testing.go:1157 +0xa8
  testing.tRunner()
      /snap/go/3417/src/testing/testing.go:865 +0x163
  testing.runTests()
      /snap/go/3417/src/testing/testing.go:1155 +0x523
  testing.(*M).Run()
      /snap/go/3417/src/testing/testing.go:1072 +0x2eb
  main.main()
      _testmain.go:78 +0x222

Goroutine 44 (running) created at:
  github.com/clearmatics/autonity/consensus/istanbul/core.(*core).Start()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/handler.go:32 +0x88
  github.com/clearmatics/autonity/consensus/istanbul/core.(*testSystem).Run()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/testbackend_test.go:251 +0xc2
  github.com/clearmatics/autonity/consensus/istanbul/core.TestHandleMsg()
      /mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/core/handler_test.go:33 +0x73
  testing.tRunner()
      /snap/go/3417/src/testing/testing.go:865 +0x163
==================

[CI] Linters

We need to run a bunch of linters either locally and as a CI step.
The problem is that Ethereum code doesn't pass most of linters, so we need a solution to run liners only for our code.

[CI] restore tests and corresponding code

Expected behaviour

Tests passed without -race flag

Actual behaviour

Tests fail and panic in a few places

Steps to reproduce the behaviour

make test

Backtrace

--- FAIL: TestBindings (1.44s)
    bind_test.go:976: failed to run binding test: exit status 1
        exit status 1
        FAIL	_/tmp/226062759/bindtest	0.058s
FAIL
FAIL	github.com/clearmatics/autonity/accounts/abi/bind	3.527s

--- FAIL: TestCompiler (0.10s)
    solidity_test.go:46: error compiling source. result map[]: solc: exit status 1
        <stdin>:4:4: Error: No visibility specified. Did you intend to add "public"?
           function multiply(uint a) returns(uint d) {
           ^ (Relevant source part starts here and spans across multiple lines).
        <stdin>:2:1: Warning: Source file does not specify required compiler version! Consider adding "pragma solidity ^0.5.2;"
        contract test {
        ^ (Relevant source part starts here and spans across multiple lines).
FAIL
FAIL	github.com/clearmatics/autonity/common/compiler	0.215s

--- FAIL: TestClique (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x90 pc=0x87c061]

goroutine 28 [running]:
testing.tRunner.func1(0xc00017c400)
	/snap/go/3417/src/testing/testing.go:830 +0x392
panic(0x92fe60, 0x10571c0)
	/snap/go/3417/src/runtime/panic.go:522 +0x1b5
github.com/clearmatics/autonity/core.(*Genesis).Commit(0xc0001adee8, 0xac72a0, 0xc0001a3660, 0xc0000ae200, 0x6119dae23e876b5e, 0xd203fed3)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/core/genesis.go:284 +0x581
github.com/clearmatics/autonity/consensus/clique.TestClique(0xc00017c400)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/clique/snapshot_test.go:404 +0x216e
testing.tRunner(0xc00017c400, 0x9ec760)
	/snap/go/3417/src/testing/testing.go:865 +0xc0
created by testing.(*T).Run
	/snap/go/3417/src/testing/testing.go:916 +0x35a
FAIL	github.com/clearmatics/autonity/consensus/clique	0.022s

--- FAIL: TestVerifyHeaders (0.25s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x8132f5]

goroutine 120 [running]:
testing.tRunner.func1(0xc06900c400)
	/snap/go/3417/src/testing/testing.go:830 +0x392
panic(0x94aae0, 0x10cf1d0)
	/snap/go/3417/src/runtime/panic.go:522 +0x1b5
github.com/clearmatics/autonity/core/state.(*StateDB).getStateObject(0x0, 0x3613, 0x0, 0x0, 0xc0863d2540)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/core/state/statedb.go:408 +0x85
github.com/clearmatics/autonity/core/state.(*StateDB).GetBalance(0x0, 0x3613, 0x0, 0x0, 0x0)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/core/state/statedb.go:208 +0x3f
github.com/clearmatics/autonity/core.CanTransfer(0xb36d20, 0x0, 0x3613, 0x0, 0x0, 0xc0863cee40, 0x20)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/core/evm.go:90 +0x45
github.com/clearmatics/autonity/core/vm.(*EVM).Call(0xc0863d4000, 0xb25600, 0xc0863bd960, 0x398f19e2054d8c3, 0x441247fef2164995, 0x3e369480, 0xc0863bd940, 0x4, 0x20, 0xffffffff, ...)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/core/vm/evm.go:191 +0x13d
github.com/clearmatics/autonity/consensus/istanbul/backend.(*backend).contractGetValidators(0xc075b732c0, 0xb32100, 0xc08638a000, 0xc0863d0240, 0x0, 0x89f59a, 0xc08638a000, 0xeb01eb45b27f09b6, 0xc0863abc68, 0x810d83)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/backend/contract.go:89 +0x37e
github.com/clearmatics/autonity/consensus/istanbul/backend.(*backend).Finalize(0xc075b732c0, 0xb32100, 0xc08638a000, 0xc0863d0240, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/backend/engine.go:370 +0x593
github.com/clearmatics/autonity/consensus/istanbul/backend.makeBlockWithoutSeal(0xc08638a000, 0xc075b732c0, 0xc0652a1440, 0x0)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/backend/engine_test.go:142 +0x172
github.com/clearmatics/autonity/consensus/istanbul/backend.TestVerifyHeaders(0xc06900c400)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/consensus/istanbul/backend/engine_test.go:330 +0x159
testing.tRunner(0xc06900c400, 0xa51eb8)
	/snap/go/3417/src/testing/testing.go:865 +0xc0
created by testing.(*T).Run
	/snap/go/3417/src/testing/testing.go:916 +0x35a
FAIL	github.com/clearmatics/autonity/consensus/istanbul/backend	5.111s

exit status 1
FAIL	github.com/clearmatics/autonity/contracts/chequebook	0.051s
?   	github.com/clearmatics/autonity/contracts/chequebook/contract	[no test files]
exit status 1
FAIL	github.com/clearmatics/autonity/contracts/ens	0.039s
?   	github.com/clearmatics/autonity/contracts/ens/contract	[no test files]
# github.com/clearmatics/autonity/core
core/tx_pool_test.go:129:11: Errorf format %d has arg received of wrong type []*github.com/clearmatics/autonity/core/types.Transaction
FAIL	github.com/clearmatics/autonity/core [build failed]

# github.com/clearmatics/autonity/crypto/bn256/google
crypto/bn256/google/main_test.go:16:3: Logf format %d has arg n of wrong type *math/big.Int
FAIL	github.com/clearmatics/autonity/crypto/bn256/google [build failed]

# github.com/clearmatics/autonity/eth [github.com/clearmatics/autonity/eth.test]
eth/handler_test.go:481:31: not enough arguments in call to NewProtocolManager
	have (*params.ChainConfig, downloader.SyncMode, uint64, *event.TypeMux, *testTxPool, *ethash.Ethash, *"github.com/clearmatics/autonity/core".BlockChain, *ethdb.MemDatabase, nil, Protocol)
	want (*params.ChainConfig, downloader.SyncMode, uint64, *event.TypeMux, txPool, consensus.Engine, *"github.com/clearmatics/autonity/core".BlockChain, ethdb.Database, map[uint64]common.Hash, Protocol, bool)
eth/handler_test.go:562:31: not enough arguments in call to NewProtocolManager
	have (*params.ChainConfig, downloader.SyncMode, uint64, *event.TypeMux, *testTxPool, *ethash.Ethash, *"github.com/clearmatics/autonity/core".BlockChain, *ethdb.MemDatabase, nil, Protocol)
	want (*params.ChainConfig, downloader.SyncMode, uint64, *event.TypeMux, txPool, consensus.Engine, *"github.com/clearmatics/autonity/core".BlockChain, ethdb.Database, map[uint64]common.Hash, Protocol, bool)
eth/helper_test.go:69:31: not enough arguments in call to NewProtocolManager
	have (*params.ChainConfig, downloader.SyncMode, uint64, *event.TypeMux, *testTxPool, *ethash.Ethash, *"github.com/clearmatics/autonity/core".BlockChain, *ethdb.MemDatabase, nil, Protocol)
	want (*params.ChainConfig, downloader.SyncMode, uint64, *event.TypeMux, txPool, consensus.Engine, *"github.com/clearmatics/autonity/core".BlockChain, ethdb.Database, map[uint64]common.Hash, Protocol, bool)
FAIL	github.com/clearmatics/autonity/eth [build failed]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x90 pc=0x887361]

goroutine 1 [running]:
github.com/clearmatics/autonity/core.(*Genesis).Commit(0xc0001e5e70, 0xb24340, 0xc0001a5660, 0xc00012cfa8, 0x8, 0x20)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/core/genesis.go:284 +0x581
github.com/clearmatics/autonity/core.(*Genesis).MustCommit(...)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/core/genesis.go:305
github.com/clearmatics/autonity/core.GenesisBlockForTesting(0xb24340, 0xc0001a5660, 0xdb739899712b5671, 0x9e19af57f96d285b, 0xdb739899f71746c9, 0xc0001a5680, 0xf71746c9)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/core/genesis.go:315 +0x147
github.com/clearmatics/autonity/eth/downloader.init.ializers()
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/eth/downloader/testchain_test.go:38 +0xb58
FAIL	github.com/clearmatics/autonity/eth/downloader	0.022s
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x90 pc=0x895161]

goroutine 1 [running]:
github.com/clearmatics/autonity/core.(*Genesis).Commit(0xc0001bbe50, 0xaee620, 0xc000177620, 0xc0000d6fa8, 0x8, 0xc000194a00)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/core/genesis.go:284 +0x581
github.com/clearmatics/autonity/core.(*Genesis).MustCommit(...)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/core/genesis.go:305
github.com/clearmatics/autonity/core.GenesisBlockForTesting(0xaee620, 0xc000177620, 0xdb739899712b5671, 0x9e19af57f96d285b, 0xdb739899f71746c9, 0xc0001776a0, 0x9e0b05a7f71746c9)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/core/genesis.go:315 +0x147
github.com/clearmatics/autonity/eth/fetcher.init.ializers()
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/eth/fetcher/fetcher_test.go:40 +0x50c
FAIL	github.com/clearmatics/autonity/eth/fetcher	0.021s
--- FAIL: TestFilters (0.09s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x90 pc=0x901eb1]

goroutine 67 [running]:
testing.tRunner.func1(0xc000111200)
	/snap/go/3417/src/testing/testing.go:830 +0x392
panic(0xabcda0, 0x138f580)
	/snap/go/3417/src/runtime/panic.go:522 +0x1b5
github.com/clearmatics/autonity/core.(*Genesis).Commit(0xc0000cdb90, 0xcc8e60, 0xc0000c9290, 0xc00013e6a8, 0x0, 0x20)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/core/genesis.go:284 +0x581
github.com/clearmatics/autonity/core.(*Genesis).MustCommit(...)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/core/genesis.go:305
github.com/clearmatics/autonity/core.GenesisBlockForTesting(0xcc8e60, 0xc0000c9290, 0xdb739899712b5671, 0x9e19af57f96d285b, 0xdb739899f71746c9, 0xc00014c060, 0xf71746c9)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/core/genesis.go:315 +0x147
github.com/clearmatics/autonity/eth/filters.TestFilters(0xc000111200)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/eth/filters/filter_test.go:130 +0x533
testing.tRunner(0xc000111200, 0xbbcfa0)
	/snap/go/3417/src/testing/testing.go:865 +0xc0
created by testing.(*T).Run
	/snap/go/3417/src/testing/testing.go:916 +0x35a
FAIL	github.com/clearmatics/autonity/eth/filters	0.114s

FAIL	github.com/clearmatics/autonity/les	5.998s
?   	github.com/clearmatics/autonity/les/flowcontrol	[no test files]
--- FAIL: TestOdrGetBlockLes1 (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x90 pc=0x887dd1]

goroutine 127 [running]:
testing.tRunner.func1(0xc00017c900)
	/snap/go/3417/src/testing/testing.go:830 +0x392
panic(0x967440, 0x10cc1f0)
	/snap/go/3417/src/runtime/panic.go:522 +0x1b5
github.com/clearmatics/autonity/core.(*Genesis).Commit(0xc000503ec0, 0xb0f020, 0xc0003ac820, 0xc0000f26a8, 0x0, 0x0)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/core/genesis.go:284 +0x581
github.com/clearmatics/autonity/core.(*Genesis).MustCommit(...)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/core/genesis.go:305
github.com/clearmatics/autonity/light.testChainOdr(0xc00017c900, 0x1, 0xa2b560)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/light/odr_test.go:256 +0x211
github.com/clearmatics/autonity/light.TestOdrGetBlockLes1(0xc00017c900)
	/mnt/sdb/go/src/github.com/clearmatics/autonity/build/_workspace/src/github.com/clearmatics/autonity/light/odr_test.go:102 +0x40
testing.tRunner(0xc00017c900, 0xa2b510)
	/snap/go/3417/src/testing/testing.go:865 +0xc0
created by testing.(*T).Run
	/snap/go/3417/src/testing/testing.go:916 +0x35a
FAIL	github.com/clearmatics/autonity/light	0.666s
util.go:45: exit status 2
exit status 1
Makefile:38: recipe for target 'test' failed
make: *** [test] Error 1

Add openNetwork parameter into Glienicke and Genesis

The context of the issue is here https://github.com/clearmatics/autonity/pull/61#discussion_r273853550

At the moment we have opennetwork value in a quite a few places:

And the initialization happens in 2 places:

  • SetEthConfig
  • SetP2PConfig

The main idea is to extract the parameter into Genesis and make it updatable through Glienicke contract.

@yazzaoui @cmjc @ya @aiman

Persist Tendermint state

If we don't store tendermint state then nodes can lose important state (such as their locked value) when stopped and started. This can cause the network to get stuck.

Proposer changing algorithm: round robin

Without an economic model every validator will have the same amount of power on the network, therefore a weight round robin selection mechanism where everyone has the same power become simple round robin.

Also, it'd be great to refactor validator package to make it smaller and simpler.

Tests for current implementation of Network permissioning

In order to be more confident that we are not introducing breaking changes in Autonity client and produce production quality code, we need to accompany any substantial changes we make with Tests, I believe as of right now the major changes introduced by network permissioning does not have tests.

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.