diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..6ab5699c9d45c45fe520221497e62c526f46dcbf --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,66 @@ +# Eris-db changelog +## v0.16.0 +This is a consolidation release that fixes various bugs and improves elements +of the architecture across the Eris Platform to support a quicker release +cadence. + +#### Features and improvements (among others) +- [pull-510](https://github.com/eris-ltd/eris-db/pull/510) upgrade consensus engine to Tendermint v0.8.0 +- [pull-507](https://github.com/eris-ltd/eris-db/pull/507) use sha3 for snative addresses for future-proofing +- [pull-506](https://github.com/eris-ltd/eris-db/pull/506) alignment and consolidation for genesis and config between tooling and chains +- [pull-504](https://github.com/eris-ltd/eris-db/pull/504) relicense eris-db to Apache 2.0 +- [pull-500](https://github.com/eris-ltd/eris-db/pull/500) introduce more strongly types secure native contracts +- [pull-499](https://github.com/eris-ltd/eris-db/pull/499) introduce word256 and remove dependency on tendermint/go-common +- [pull-493](https://github.com/eris-ltd/eris-db/pull/493) re-introduce GenesisTime in GenesisDoc + +- Logging system overhauled based on the central logging interface of go-kit log. Configuration lacking in this release but should be in 0.16.1. Allows powerful routing, filtering, and output options for better operations and increasing the observability of an eris blockchain. More to follow. +- Genesis making is improved and moved into eris-db. +- Config templating is moved into eris-db for better synchronisation of server config between the consumer of it (eris-db) and the producers of it (eris cli and other tools). +- Some documentation updates in code and in specs. +- [pull-462](https://github.com/eris-ltd/eris-db/pull/499) Makefile added to capture conventions around building and testing and replicate them across different environments such as continuous integration systems. + +#### Bugfixes (among others) +- [pull-516](https://github.com/eris-ltd/eris-db/pull/516) Organize and add unit tests for rpc/v0 +- [pull-453](https://github.com/eris-ltd/eris-db/pull/453) Fix deserialisation for BroadcastTx on rpc/v0 +- [pull-476](https://github.com/eris-ltd/eris-db/pull/476) patch EXTCODESIZE for native contracts as solc ^v0.4 performs a safety check for non-zero contract code +- [pull-468](https://github.com/eris-ltd/eris-db/pull/468) correct specifications for params on unsubscribe on rpc/tendermint +- [pull-465](https://github.com/eris-ltd/eris-db/pull/465) fix divergence from JSON-RPC spec for Response object +- [pull-366](https://github.com/eris-ltd/eris-db/pull/366) correction to circle ci script +- [pull-379](https://github.com/eris-ltd/eris-db/pull/379) more descriptive error message for eris-client + +## v0.12.0 +This release marks the start of Eris-DB as the full permissioned blockchain node + of the Eris platform with the Tendermint permissioned consensus engine. + This involved significant refactoring of almost all parts of the code, + but provides a solid foundation to build the next generation of advanced + permissioned smart contract blockchains. + + Many changes are under the hood but here are the main externally + visible changes: + +- Features and improvements + - Upgrade to Tendermint 0.6.0 in-process consensus + - Support DELEGATECALL opcode in Ethereum Virtual Machine (important for solidity library calls) + - ARM support + - Docker image size reduced + - Introduction of eris-client companion library for interacting with + eris:db + - Improved single configuration file for all components written by eris-cm + - Allow multiple event subscriptions from same host under rpc/tendermint + + +- Tool changes + - Use glide instead of godeps for dependencies + + +- Testing + - integration tests over simulated RPC calls + - significantly improved unit tests + - the ethereum virtual machine and the consensus engine are now top-level + components and are exposed to continuous integration tests + + +- Bugfixes (incomplete list) + - [EVM] Fix calculation of child CALL gaslimit (allowing solidity library calls to work properly) + - [RPC/v0] Fix blocking event subscription in transactAndHold (preventing return in Javascript libraries) + - [Blockchain] Fix getBlocks to respect block height cap diff --git a/README.md b/README.md index ff5c306c1dcb2eed05a03e348ce530b82033e7ce..10c36f2c0c5162a225aa65934561b18efafd6c98 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Eris-DB +# Eris-DB v0.16 |[](https://godoc.org/github.com/eris-ltd/eris-db) | Linux | |---|-------| @@ -9,14 +9,32 @@ Eris-db is Monax' permissioned blockchain client. It executes Ethereum smart con ## Table of Contents -- [Background](#background) +- [What is Eris-db](#what-is-eris-db) - [Installation](#installation) +- [For developers](#for-developers) - [Usage](#usage) - - [Security](#security) +- [Configuration](#configuration) - [Contribute](#contribute) - [License](#license) +- [Future work](#future-work) -## Background +## What is Eris-db ? + +Eris-db is a permissioned blockchain node that executes smart contract code following the Ethereum specification. Eris-db is built for a multi-chain universe with application specific optimization in mind. Eris-db as a node is constructed out of three main components; the consensus engine, the permissioned Ethereum virtual machine and the rpc gateway. More specifically Eris-db consists of the following: + +- **Consensus Engine:** transactions are ordered and finalised with the Byzantine fault-tolerant Tendermint protocol. The Tendermint protocol provides high transaction throughput over a set of known validators and prevents the blockchain from forking. +- **Application Blockchain Interface (ABCI):** The smart contract application interfaces with the consensus engine over the ABCI. The ABCI allows for the consensus engine to remain agnostic from the smart contract application. +- **Smart Contract Application:** transactions are validated and applied to the application state in the order that the consensus engine has finalised them. The application state consists of all accounts, the validator set and the name registry. Accounts in eris-db have permissions and either contain smart contract code or correspond to a public-private key pair. A transaction that calls on the smart contract code in a given account will activate the execution of that account’s code in a permissioned virtual machine. +- **Permissioned Ethereum Virtual Machine:** This virtual machine is built to observe the Ethereum operation code specification and additionally asserts the correct permissions have been granted. Permissioning is enforced through secure native functions and underlies all smart contract code. An arbitrary but finite amount of gas is handed out for every execution to ensure a finite execution duration - “You don’t need money to play, when you have permission to playâ€. +- **Application Binary Interface (ABI):** transactions need to be formulated in a binary format that can be processed by the blockchain node. Currently tooling provides functionality to compile, deploy and link solidity smart contracts and formulate transactions to call smart contracts on the chain. For proof-of-concept purposes we provide a eris-contracts.js library that automatically mirrors the smart contracts deployed on the chain and to develop middleware solutions against the blockchain network. Future work on the light client will be aware of the ABI to natively translate calls on the API into signed transactions that can be broadcast on the network. +- **API Gateway:** eris-db exposes REST and JSON-RPC endpoints to interact with the blockchain network and the application state through broadcasting transactions, or querying the current state of the application. Websockets allow to subscribe to events, which is particularly valuable as the consensus engine and smart contract application can give unambiguously finalised results to transactions within one blocktime of about one second. + +Eris-db has been architected with a longer term vision on security and data privacy from the outset: + +- **Cryptographically Secured Consensus:** proof-of-stake Tendermint protocol achieves consensus over a known set of validators where every block is closed with cryptographic signatures from a majority of validators only. No unknown variables come into play while reaching consensus on the network (as is the case for proof-of-work consensus). This guarantees that all actions on the network are fully cryptographically verified and traceable. +- **Remote Signing:** transactions can be signed by elliptic curve cryptographic algorithms, either ed25519/sha512 or secp256k1/sha256 are currently supported. Eris-db connects to a remote signing solution to generate key pairs and request signatures. Eris-keys is a placeholder for a reverse proxy into your secure signing solution. This has always been the case for transaction formulation and work continues to enable remote signing for the validator block signatures too. +- **Secure Signing:** Monax is a legal engineering company; we partner with expert companies to natively support secure signing solutions going forward. +- **Multi-chain Universe (Step 1 of 3):** from the start the eris platform has been conceived for orchestrating many chains, as exemplified by the command “eris chains make†or by that transactions are only valid on the intended chain. Separating state into different chains is only the first of three steps towards privacy on smart contract chains (see future work below). See the [eris-db documentation](https://monax.io/docs/documentation/db/) for more information. @@ -27,26 +45,21 @@ See the [eris-db documentation](https://monax.io/docs/documentation/db/) for mor ### For Developers Dependency management for eris-db is managed with [glide](github.com/Masterminds/glide), and you can build eris-db from source by following -1. [Install go](https://golang.org/doc/install) -2. Ensure you have `gmp` installed (`sudo apt-get install libgmp3-dev || brew install gmp`) -3. and execute following commands in a terminal: -``` -go get github.com/Masterminds/glide - -go get -d github.com/eris-ltd/eris-db - -REPO=$($GOPATH/src/github.com/eris-ltd/eris-db) +- [Install go](https://golang.org/doc/install) +- Ensure you have `gmp` installed (`sudo apt-get install libgmp3-dev || brew install gmp`) +- and execute following commands in a terminal: +- `go get github.com/Masterminds/glide` +- `go get -d github.com/eris-ltd/eris-db` +- `REPO=$($GOPATH/src/github.com/eris-ltd/eris-db)` +- `cd $REPO && glide install` +- `cd $REPO/cmd/eris-db && go install` -cd $REPO && glide install -cd $REPO/cmd/eris-db && go install -``` +To run `eris-db`, just type `$ eris-db serve --work-dir <path to chain directory>`, where the chain directory needs to contain the configuration, genesis file, and private validator file as generated by `eris chains make`. +This will start the node using the provided folder as working dir. If the path is omitted it defaults to `~/.erisdb`. -To run `eris-db`, just type `$ eris-db serve --work-dir <path to chain directory>`, where the chain directory needs to contain the configuration files as generated by `eris chains make`. - -This will start the node using the provided folder as working dir. If the path is omitted it defaults to `~/.erisdb` - +For a Vagrant file see [eris-vagrant](https://github.com/eris-ltd/eris-vagrant) for drafts or soon this repo for [Vagrant](https://github.com/eris-ltd/eris-db/issues/514) and Packer files. ## Usage @@ -58,7 +71,17 @@ A commented template config will be written as part of the `eris chains make` [p ## Contribute -See the [CONTRIBUTING.md](.github/CONTRIBUTING.md) for more details. +We welcome all contributions and have submitted the code base to the Hyperledger project governance during incubation phase. As an integral part of this effort we want to invite new contributors, not just to maintain but also to steer the future direction of the code in an active and open process. + +You can find us on: +- [the Marmot Den (slack)](http://slack.monax.io) +- [here on Github](http://github.com/eris-ltd/eris-db/issues) +- [support.monax.io](http://support.monax.io) +- read the [Contributor file](.github/CONTRIBUTING.md) + +## Future work + +Some burrows marmots have already started digging to build the enterprise ecosystem applications of the future are listed in [docs/proposals](./docs/PROPOSALS.md). Marmots live in groups we welcome your help on these or other improvement proposals. Please help us by joining the conversation on what features matter to you. ## License diff --git a/circle.yml b/circle.yml index 54189a8cb08cbfc6968115f0be520cec9f7918a1..12e7160c86c7b8b536bceb55f01f0d5a63246c4b 100644 --- a/circle.yml +++ b/circle.yml @@ -84,3 +84,6 @@ deployment: - docker push quay.io/eris/db # push the updated documentation - docs/build.sh + + + diff --git a/config/config.go b/config/config.go index e49db3d10337f9e67149fc81de0b0ff0084bf6a6..97141bd4d34940e281f1b460756dad6781b4c7fb 100644 --- a/config/config.go +++ b/config/config.go @@ -90,7 +90,7 @@ func GetConfigurationFileBytes(chainId, moniker, seeds string, chainImageName st erisdbChain := &ConfigChainGeneral{ AssertChainId: chainId, ErisdbMajorVersion: uint8(0), - ErisdbMinorVersion: uint8(16), + ErisdbMinorVersion: uint8(17), GenesisRelativePath: "genesis.json", } chainConsensusModule := &ConfigChainModule{ @@ -102,7 +102,7 @@ func GetConfigurationFileBytes(chainId, moniker, seeds string, chainImageName st chainApplicationManagerModule := &ConfigChainModule{ Name: "erismint", MajorVersion: uint8(0), - MinorVersion: uint8(16), + MinorVersion: uint8(17), ModuleRelativeRoot: "erismint", } tendermintModule := &ConfigTendermint{ diff --git a/config/templates.go b/config/templates.go index 27372813daa38d25aac68b3b7619090eb155abeb..433d8c8adec8e5c4ab05f695cc4e829ebebd9ea8 100644 --- a/config/templates.go +++ b/config/templates.go @@ -280,7 +280,7 @@ const sectionErisMint = ` ################################################################################ ## ## Eris-Mint -## version 0.16 +## version 0.17 ## ## The original Ethereum virtual machine with IAVL merkle trees ## and tendermint/go-wire encoding diff --git a/core/config.go b/core/config.go index 9090c28ae91fa7fa79ffaaa997b71afec47672b3..eb4813956c40f0e7a4d0b1782bd64945d63d20bb 100644 --- a/core/config.go +++ b/core/config.go @@ -59,7 +59,7 @@ func LoadModuleConfig(conf *viper.Viper, rootWorkDir, rootDataDir, minorVersionString := version.MakeMinorVersionString(moduleName, majorVersion, minorVersion, 0) if !assertValidModule(module, moduleName, minorVersionString) { - return nil, fmt.Errorf("%s module %s (%s) is not supported by %s", + return nil, fmt.Errorf("Error reading config: %s module %s (%s) is not supported by %s", module, moduleName, minorVersionString, version.GetVersionString()) } // set up the directory structure for the module inside the data directory diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md deleted file mode 100644 index bac2584e400bdc88cc063d775a6917021abee1f1..0000000000000000000000000000000000000000 --- a/docs/CHANGELOG.md +++ /dev/null @@ -1,54 +0,0 @@ -# Eris-DB changelog -## 0.16.0 -This is a consolidation release that fixes various bugs and improves elements -of the architecture across the Eris Platform to support a quicker release -cadence. - -- Features and improvements - - Logging system overhauled based on the central logging interface of go-kit log. Configuration lacking in this release but should be in 0.16.1. Allows powerful routing, filtering, and output options for better operations and increasing the observability of an eris blockchain. More to follow. - - Genesis making is improved and moved into eris-db. - - Config templating is moved into eris-db for better synchronisation of server config between the consumer of it (eris-db) and the producers of it (eris cli and other tools). - - Some documentation updates in code and in specs. - - Makefile added to capture conventions around building and testing and replicate them across different environments such as continuous integration systems. - -- Bugfixes - - [RPC/v0] #464 fix divergence from JSON-RPC spec - - [CI] #366 correction to circle ci script - - [eris-client] #378 more descriptive error message - -## 0.12.0-RC3 -This release marks the start of Eris-DB as the full permissioned blockchain node - of the Eris platform with the Tendermint permissioned consensus engine. - This involved significant refactoring of almost all parts of the code, - but provides a solid foundation to build the next generation of advanced - permissioned smart contract blockchains. - - Many changes are under the hood but here are the main externally - visible changes: - -- Features and improvements - - Upgrade to Tendermint 0.6.0 in-process consensus - - Support DELEGATECALL opcode in Ethereum Virtual Machine (important for solidity library calls) - - ARM support - - Docker image size reduced - - Introduction of eris-client companion library for interacting with - eris:db - - Improved single configuration file for all components written by eris-cm - - Allow multiple event subscriptions from same host under rpc/tendermint - - -- Tool changes - - Use glide instead of godeps for dependencies - - -- Testing - - integration tests over simulated RPC calls - - significantly improved unit tests - - the ethereum virtual machine and the consensus engine are now top-level - components and are exposed to continuous integration tests - - -- Bugfixes (incomplete list) - - [EVM] Fix calculation of child CALL gaslimit (allowing solidity library calls to work properly) - - [RPC/v0] Fix blocking event subscription in transactAndHold (preventing return in Javascript libraries) - - [Blockchain] Fix getBlocks to respect block height cap diff --git a/docs/PROPOSALS.md b/docs/PROPOSALS.md new file mode 100644 index 0000000000000000000000000000000000000000..35cf450a7e304dd78522939496a6ff4bea93d504 --- /dev/null +++ b/docs/PROPOSALS.md @@ -0,0 +1,17 @@ +# Eris-db proposals for future work + +The following list is extra-ordinarily uncommitted to and deliberately incomplete, but we thought it may be worthwhile sharing with you for soliciting your input and collaboration going forward: + +#### Security, Identity and Privacy + +- **Advanced security framework:** Functionality preceding Monax’s Nightsky (see multi-chain universe continuation below) to enable global encryption of transactions, genesis files and account storage at rest. +- **Identity Management and Whitelisting:** write protection is inherent to the permissioning scheme but read protection will be enabled by integrating certificates for restricting connectivity access to the peer-to-peer network for validators, verifiers or light clients. This is in addition to normal VPN and firewall solutions and a precursor of Monax’s Nightsky, which restricts read-access through selective decryption. +- **Multi-chain Universe (Step 2 of 3):** The second step towards enabling the multi-chain universe is well-underway with the Tendermint Cosmos proposal for interblockchain communication. +- **Multi-chain Universe (Step 3 of 3):** The third and final step is the Monax’s Nightsky proposal for inherent encryption of transactions and allowing only partial reconstruction of the smart contract application state for verifiers or light clients (for mobile or IoT devices). Together Cosmos and Nightsky allow smart contracts to orchestrate where information flows and who has the ability to decypher what part of the data. + +#### Scalability and Governance + +- **Read-cache Optimisation and Queryability:** subjectively pipe the application state and event logs to a data warehousing solution. Building upon the read-cache the SQLsol prototype can be integrated as an SQL-opinionated transformation layer of smart contract events and data into a relational database. +- **Chain life-cycle management:** the tooling is the starting point for chain life-cycle management and will be extended with exporting snapshots of chain state. These snapshots can be used to administratively start a new network with an updated version of eris-db software as cold upgrade. In a second phase the Cosmos proposal is ideally suited to run a new version of the node software in parallel to existing chain and the validators of the network can atomically cast their vote of approval through the Cosmos hub to dynamically move the voting power over to the updated chain (hot upgrade) until a full vote of confidence is achieved. It is important to note that chain life-cycle management is complementary to and will support smart contract life-cycle management, known to some as DOUG, our marmot mascot. +- **Sharding and scalability framework:** interblockchain communication through the exchange of proofs leverages the peer-to-peer network - rather than oracles - to distribute the load across parallel chains and removes oracle-bridges as potential bottlenecks and security risks. +- **Light-client and ABI integration:** a significant usability upgrade of smart contract chains will be achieved through the ability for the ABI definition of the deployed smart contracts to be verifiably linked to the smart contract accounts. The introduction of the EIP-141 will enable the injection of an ABI fingerprint into smart contract code such that a light client, eris-worker can dynamically expose the smart contract functionality through API calls. As an aside it is worth noting that the tendermint consensus protocol provides a distinctive advantage for light-clients as the last block signed by a majority of validators is unambiguously the current state; diff --git a/manager/eris-mint/version.go b/manager/eris-mint/version.go index 734e5cea30254f5e501a9b2461644eced8033e84..c6346e93728e883cfb7330e43ab003c397e8535a 100644 --- a/manager/eris-mint/version.go +++ b/manager/eris-mint/version.go @@ -26,7 +26,7 @@ const ( // Major version component of the current release erisMintVersionMajor = 0 // Minor version component of the current release - erisMintVersionMinor = 16 + erisMintVersionMinor = 17 // Patch version component of the current release erisMintVersionPatch = 0 ) diff --git a/rpc/tendermint/test/config.go b/rpc/tendermint/test/config.go index 84fcaeb7997c7b31cc45843d65a1fde9785963c9..06f3520e1dfb8ceb4edeaf7ae42eb01f204bedef 100644 --- a/rpc/tendermint/test/config.go +++ b/rpc/tendermint/test/config.go @@ -38,7 +38,7 @@ var defaultConfig = `# Copyright 2017 Monax Industries Limited assert_chain_id = "MyChainId" # semantic major and minor version major_version = 0 -minor_version = 12 +minor_version = 17 # genesis file, relative path is to eris-db working directory genesis_file = "genesis.json" @@ -73,7 +73,7 @@ genesis_file = "genesis.json" # version is the major and minor semantic version; # the version will be asserted on major_version = 0 - minor_version = 16 + minor_version = 17 # relative path to application manager root folder relative_root = "erismint" @@ -217,7 +217,7 @@ private_validator_file = "priv_validator.json" ################################################################################ ## ## Eris-Mint -## version 0.16.0 +## version 0.17.0 ## ## The original Ethereum virtual machine with IAVL merkle trees ## and tendermint/go-wire encoding diff --git a/version/version.go b/version/version.go index 103c787d173a6f9b82a8aad73fd90a1266e7ad56..876fab2719a00bce042e11cfc6e94de5e4437b27 100644 --- a/version/version.go +++ b/version/version.go @@ -30,7 +30,7 @@ const ( // Major version component of the current release erisVersionMajor = 0 // Minor version component of the current release - erisVersionMinor = 16 + erisVersionMinor = 17 // Patch version component of the current release erisVersionPatch = 0 ) @@ -127,4 +127,4 @@ func (version *VersionIdentifier) MatchesMinorVersion( // IMPORTANT: Eris-DB version must be on the last line of this file for // the deployment script tests/build_tool.sh to pick up the right label. -const VERSION = "0.16.0" +const VERSION = "0.17.0"