Commit bcc7005c authored by RicoloveFeng's avatar RicoloveFeng
Browse files


Pipeline #2402 failed with stages
in 1 minute and 30 seconds
current_version = 1.8.0
commit = True
message = Aleth {new_version}
Bump version: {current_version} → {new_version}
tag = True
sign_tags = True
tag_message = Aleth {new_version}
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-(?P<prerel>rc|alpha)\.(?P<prerelver>\d+))?
serialize =
optional_value = rel
values =
Language: Cpp
# BasedOnStyle: Chromium
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: BeforeColon
ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
# Local includes "":
- Regex: '^".*'
Priority: 1
# Third party libraries:
- Regex: '^<cryptopp/.*'
Priority: 70
# Standard library extensions / common generic purpose libraries:
- Regex: '^<boost/.*'
Priority: 80
# Testing libraries:
- Regex: '^<benchmark/.*'
Priority: 90
- Regex: '^<gtest/.*'
Priority: 90
# Public includes <>:
- Regex: '^<.*\.h|hpp>'
Priority: 2
# Standard library:
- Regex: '^<.*'
Priority: 100
# Anything else:
- Regex: '.*'
Priority: 4
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakAssignment: 1
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 50
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
TabWidth: 4
UseTab: Never
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
root = true
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 4
# Compiled Object files
# Compiled Dynamic libraries
# Compiled Static libraries
# VS stuff
# VIM stuff
# Xcode stuff
# build system
# MacOS Development
# CocoaPods
# Xcode
# JetBrains stuff
# Visual Studio Code
[submodule "test/jsontests"]
path = test/jsontests
url =
[submodule "evmc"]
path = evmc
url =
[submodule "cable"]
path = cmake/cable
url =
[submodule "scripts/dopple"]
path = scripts/dopple
url =
# Aleth: Ethereum C++ client, tools and libraries.
# Copyright 2014-2019 Aleth Authors.
# Licensed under the GNU General Public License, Version 3.
language: cpp
# We need to whitelist the branches which we want to have "push" automation.
# Pull request automation is not constrained to this set of branches.
- develop
- release
- /travis/
- hunter
- secure: "Nm9HEvhW8wtbF9v44g2Vo2CfX8cFlw3UWutHMmVl5nrcri34BVPXulsPF3CrIdoGgdBQvGxzNmbmAgi0KokaWhLZ2WvuDUXRAU8wuU3SB/AV7hNIGFZDqgk1LBBzwaFngqDCqqIQ29v2Z59s3y8qakmPQbR8eNJ1YAc2F9O8iVI="
- os: linux
dist: trusty
sudo: required
- "8"
- ZIP_SUFFIX=ubuntu-trusty
# - os: osx
# osx_image: xcode9
# env:
# - ZIP_SUFFIX=macos-sierra
depth: 2
ccache: true
- ~/.ethash
- ~/.local
- ~/Library/Caches/Homebrew
# Cache whole deps dir hoping you will not need to download and
# build external dependencies next build.
- $TRAVIS_BUILD_DIR/build/deps
install: |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
./scripts/ && ./scripts/;
pyenv local 3.6
pip install --user requests
- travis_wait 150 ./scripts/ $TRAVIS_BUILD_TYPE
- ./scripts/
- cd $TRAVIS_BUILD_DIR/build && ../scripts/ $TRAVIS_TESTS
- pip install --user codecov
- codecov
# This is the deploy target for the native build (Linux and macOS)
# which generates ZIPs per commit. We are in agreement that
# generating ZIPs per commit for the develop branch is probably
# just noise, so we only run this deployment target on 'release'.
# Unlike the Appveyor GitHub Releases target, the support in TravisCI
# seemingly doesn't provide a means for passing a description, tag, etc.
# In practice, we are letting the Appveyor CI do all that stuff, and
# then this deployment flow just seems to find that most recent tag,
# and just add our Linux and macOS ZIPs into the same tag, which is
# what we want to happen. But is very accidental and brittle-looking.
# The 'skip_cleanup' stops the workspace being cleaned out prior to
# generation of the artifacts. Strange that we should explicitly
# need to do that, but we do.
# Tokens in TravisCI can be generated a few different ways. Bob had
# success using the 'travis' gem, and then using that gem to
# create/edit this .travis.yml file, and then cut-and-pasting the
# good bits back out of what it generated. The gem changes all the
# whitespace and deletes comments, so cannot be used as-is. But
# it does generate an appropriate auth token.
# See
# See
# See
- provider: releases
secure: HHcAWFjVNwf8b83KVQnEa172Eo7aur+scVCq4BzgPDXnF+v4GDXT7PAaXyWBwIyrFoIJduPCojsiIBP8QZwtjaKgnywnREjaLc0syTCLSeUHcp/+jPRdickvfgHJWG06sU7ZST8/HnGmoOqV/BUlGhHiqma1oJfGEJ6aaG4oza77ZYAxLPxwq9NOuTHVGJwlphcfeevcU3F0C/mxDEEMEz66lDolp4DCP5L4muHlrOCZ+HSjRwz5/anVNVWNO/nM1I0wmI2TRAS0RPzwClVD8iiGJHhZ/WdgenG4nosBG9UQjd/56LLKI25bIJijz/tpe89pCRUJtMYtcXR5C7w8Is05a1GMedBAiT7Bu35qHbpxJeqcw26DJL4U3+IeHfymXpK/E3RAj16bj+mtxxYSEzaae7obCm1rDA1LnPTI94kAea2ZNOUucDK5FaROX/uBXk422xrQTdJpEpg4TLa7GmQGdtyJC0OnzaOTXWg87lbVMq1PndDLE3STqXT5J/wj/WfUtXlN38x9aX7wwrmyCXY3WJ1zzShAgRO9YjRRosMBkahGDj5l75w9KX8yW3C5txcxjPVGSxQIl+bv9FPrBJmU1WOOPYQlHm92JQJus8BXXQCuhg3mEsZQfmGpgrS82NUB15V1nZB3xCXniKcKnQirzbRXLg8wjlPbT9DKGbc=
file: $TRAVIS_BUILD_DIR/cpp-ethereum-$
skip_cleanup: true
repo: ethereum/cpp-ethereum
branch: release
# See LICENSE file for license
import os
import ycm_core
def DirectoryOfThisScript():
return os.path.dirname( os.path.abspath( __file__ ) )
project_dir = DirectoryOfThisScript()
with open('build/_3rdParty/Hunter/install-root-dir') as f:
hunter_install_dir = f.readline()
except IOError:
# Ignore if file does not exist
hunter_install_dir = ''
flags = [
os.path.join(project_dir, 'build')
if hunter_install_dir:
flags += ['-I', hunter_install_dir]
compilation_database_folder = os.path.join(project_dir, 'build')
if os.path.exists( compilation_database_folder ):
database = ycm_core.CompilationDatabase( compilation_database_folder )
database = None
SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ]
def IsHeaderFile( filename ):
extension = os.path.splitext( filename )[ 1 ]
return extension in [ '.h', '.hxx', '.hpp', '.hh' ]
def GetCompilationInfoForFile( filename ):
# The compilation_commands.json file generated by CMake does not have entries
# for header files. So we do our best by asking the db for flags for a
# corresponding source file, if any. If one exists, the flags for that file
# should be good enough.
if IsHeaderFile( filename ):
basename = os.path.splitext( filename )[ 0 ]
for extension in SOURCE_EXTENSIONS:
replacement_file = basename + extension
if os.path.exists( replacement_file ):
compilation_info = database.GetCompilationInfoForFile(
replacement_file )
if compilation_info.compiler_flags_:
return compilation_info
return None
return database.GetCompilationInfoForFile( filename )
def FlagsForFile( filename, **kwargs ):
if not database:
return {
'flags': flags,
'include_paths_relative_to_dir': DirectoryOfThisScript()
compilation_info = GetCompilationInfoForFile( filename )
if not compilation_info:
return None
# Bear in mind that compilation_info.compiler_flags_ does NOT return a
# python list, but a "list-like" StringVec object.
final_flags = list( compilation_info.compiler_flags_ )
return {
'flags': final_flags,
'include_paths_relative_to_dir': compilation_info.compiler_working_dir_
# Changelog
## [1.9.0] - Unreleased
- Added: [#5868]( `test_importRawBlock` RPC method reports the detailed reason when import fails.
- Changed: [#5893]( testeth: RlpTests treat empty `out` field as invalid.
- Removed: [#5885]( Discontinue `testeth --filltests` support for BlockchainTests, TransitionTests, BCGeneralStateTests.
## [1.8.0] - 2019-12-16
- Added: [#5699]( EIP 2046: Reduced gas cost for static calls made to precompiles.
- Added: [#5741]( Support for individual EIP activation to facilitate EIP-centric network upgrade process.
- Added: [#5752]( [#5753]( [#5809]( Implement EIP1380 (reduced gas costs for call-to-self).
- Added: [#5859]( EIP-2384 Istanbul/Berlin Difficulty Bomb Delay and **Muir Glacier** fork support.
- Changed: [#5750]( Use `testeth -t <SUITE_NAME> -- --testfile <PATH>` to run the tests from file at any path. Use `testeth -t <SUITE_NAME> -- --testfile <PATH> --singletest <TEST_NAME>` to run only single test from any file.
- Changed: [#5801]( `testeth -t BlockchainTests` command now doesn't run the tests for the forks before Istanbul. To run those tests use a separate LegacyTests suite with command `testeth -t LegacyTests/Constantinople/BlockchainTests`.
- Changed: [#5807]( Optimize selfdestruct opcode in LegacyVM by reducing state accesses in certain out-of-gas scenarios.
- Changed: [#5806]( Optimize selfdestruct opcode in aleth-interpreter by reducing state accesses in certain out-of-gas scenarios.
- Changed: [#5837]( [#5839]( [#5845]( [#5846]( Output format of `testeth --jsontrace` command changed to better match output of geth's evm tool and to integrate with evmlab project.
- Changed: [#5848]( `aleth-vm --codefile <PATH>` now reads bytecode file from path and `aleth-vm --codefile - <bytecode>` now reads bytecode from standard input.
- Changed: [#5864]( Allow a user to send multiple transactions before a new block is mined.
- Removed: [#5760]( Official support for Visual Studio 2015 has been dropped. Compilation with this compiler is expected to stop working after migration to C++14.
- Removed: [#5840]( The list of precompiled contracts is not required in config files anymore.
- Removed: [#5850]( accounts section is now optional in config files.
- Fixed: [#5792]( Faster and cheaper execution of RPC functions which query blockchain state (e.g. getBalance).
- Fixed: [#5811]( RPC methods querying transactions (`eth_getTransactionByHash`, `eth_getBlockByNumber`) return correct `v` value.
- Fixed: [#5821]( `test_setChainParams` correctly initializes custom configuration of precompiled contracts.
- Fixed: [#5826]( Fix blocking bug in database rebuild functionality - users can now rebuild their databases via Aleth's '-R' switch.
- Fixed: [#5827]( Detect database upgrades and automatically rebuild the database when they occur.
- Fixed: [#5852]( Output correct original opcodes instead of synthetic `PUSHC`/`JUMPC`/`JUMPCI` in VM trace.
- Fixed: [#5829]( web3.eth.getBlock now returns block size in bytes. This requires a (automatic) database rebuild which can take a while depending on how many blocks are in the local chain.
- Fixed: [#5866]( Update output of `debug_accountRangeAt` and `eth_getTransactionCount` RPC functions to conform to Geth's output.
- Fixed: [#5865]( Fix bug which causes syncing to become permanently stuck.
## [1.7.2] - 2019-11-22
- Fixed: [#5834]( Fix segmentation fault during sync.
- Fixed: [#5841]( Revert the change introduced in 1.7.0 to wait 2 secods after sending `Disconnect` to peer before closing the socket, as it caused instabilty during sync.
## [1.7.1] - 2019-11-18
- Fixed: [#5830]( Fix cost of ECADD and ECMULL for Istanbul in Mainnet and Ropsten chain configs.
## [1.7.0] - 2019-11-14
- Added: [#5537]( Creating Ethereum Node Record (ENR) at program start.
- Added: [#5571]( Support Discovery v4 ENR Extension messages.
- Added: [#5557]( Improved debug logging of full sync.
- Added: [#5564]( Improved help output of Aleth by adding list of channels.
- Added: [#5575]( Log active peer count and peer list every 30 seconds.
- Added: [#5580]( Enable syncing from ETC nodes for blocks < dao hard fork block.
- Added: [#5591]( Network logging bugfixes and improvements and add p2pcap log channel.
- Added: [#5588]( Testeth prints similar test suite name suggestions, when the name passed in `-t` argument is not found.
- Added: [#5593]( Dynamically updating host ENR.
- Added: [#5624]( Remove useless peers from peer list.
- Added: [#5634]( Bootnodes for Rinkeby and Goerli.
- Added: [#5640]( Support EIP-1702 Generalized Account Versioning Scheme (active only in Experimental fork.)
- Added: [#5691]( Istanbul support: EIP-2028 Transaction data gas cost reduction.
- Added: [#5696]( [#5708]( Istanbul support: EIP-1344 ChainID opcode.
- Added: [#5700]( [#5725]( Istanbul support: EIP 1884 Repricing for trie-size-dependent opcodes.
- Added: [#5701]( Outputs ENR text representation in admin.nodeInfo RPC.
- Added: [#5705]( Istanbul support: EIP 1108 Reduce alt_bn128 precompile gas costs.
- Added: [#5707]( Aleth waits for 2 seconds after sending disconnect to peer before closing socket.
- Added: [#5709]( [#5728]( Istanbul support: EIP-2200 Structured Definitions for Net Gas Metering.
- Added: [#5751]( Istanbul support: EIP-152 Add BLAKE2 compression function `F` precompile.
- Added: [#5755]( testeth now runs `stChainId`, `stSLoadTest`, `stSelfBalance` tests for Istanbul.
- Added: [#5758]( Istanbul support: activation in Ropsten config.
- Added: [#5762]( aleth-vm supports `--network Istanbul` option.
- Changed: [#5532]( The leveldb is upgraded to 1.22. This is breaking change on Windows and the old databases are not compatible.
- Changed: [#5559]( Update peer validation error messages.
- Changed: [#5568]( Improve rlpx handshake log messages and create new rlpx log channel.
- Changed: [#5570]( Now it's not necessary to recompile with VMTRACE flag to get VM trace log. Just use `testeth -- --vmtrace` or `aleth -v 4 --log-vmtrace`.
- Changed: [#5576]( Moved sstore_combinations and static_Call50000_sha256 tests to stTimeConsuming test suite. (testeth runs them only with `--all` flag)
- Changed: [#5589]( Make aleth output always line-buffered even when redirected to file or pipe.
- Changed: [#5602]( Better predicting external IP address and UDP port.
- Changed: [#5605]( Network logging bugfixes and improvements and add warpcap log channel.
- Changed: [#5628]( Don't try to endlessly reconnect to official Ethereum bootnodes.
- Changed: [#5632]( RocksDB support is disabled by default. Enable with `-DROCKSB=ON` CMake option.
- Changed: [#5648]( `BlockChainTests` suite is split into `BlockChainTests/ValidBlocks` and `BlockChainTests/InvalidBlocks`.
- Changed: [#5678]( Enable optimizer in aleth-interpreter by default.
- Changed: [#5675]( Disconnect from peer when syncing is disabled for peer.
- Changed: [#5676]( When receiving large batches of new block hashes, process up to 1024 hashes instead of disabling the peer.
- Changed: [#5719]( Enable support for Visual Studio 2017 on Windows.
- Changed: [#5713]( Propagate new blocks after PoW check rather than after import into the blockchain.
- Changed: [#5734]( debug_accountRangeAt RPC method is renamed to debug_accountRange to conform with geth and retesteth requirements.
- Changed: [#5735]( `testeth -t GeneralStateTests` and `testeth -t BCGeneralStateTests` commands now don't run the tests for the forks before Istanbul. To run those tests use a separate `LegacyTests` suite with commands `testeth -t LegacyTests/Constantinople/GeneralStateTests` and `testeth -t LegacyTests/Constantinople/BCGeneralStateTests -- --all`
- Changed: [#5810]( [EVMC] has been upgraded to version 7.0.0.
- Removed: [#5631]( Removed PARANOID build option.
- Fixed: [#5562]( Don't send header request messages to peers that haven't sent us Status yet.
- Fixed: [#5581]( Fixed finding neighbour nodes in Discovery.
- Fixed: [#5599]( Prevent aleth from attempting concurrent connection to node which results in disconnect of original connection.
- Fixed: [#5609]( Log valid local enode-address when external IP is not known.
- Fixed: [#5627]( Correct testeth --help log output indentation.
- Fixed: [#5644]( Avoid attempting to sync with disconnected peers.
- Fixed: [#5647]( test_importRawBlock RPC method correctly fails in case of import failure.
- Fixed: [#5664]( Behavior in corner case tests about touching empty Precompiles now agrees with geth's results.
- Fixed: [#5662]( Correct depth value when aleth-interpreter invokes `evmc_host_interface::call` callback.
- Fixed: [#5666]( aleth-interpreter returns `EVMC_INVALID_INSTRUCTION` when `INVALID` opcode is encountered and `EVMC_UNKNOWN_INSTRUCTION` for undefined opcodes.
- Fixed: [#5706]( Stop tracking sent transactions after they've been imported into the blockchain.
- Fixed: [#5687]( Limit transaction queue's dropped transaction history to 1024 transactions.
- Fixed: [#5718]( Avoid checking contract balance or destination account existence when executing self-destruct operations on Frontier and Homestead.
- Fixed: [#5803]( Client version string reported by RPC and devp2p now better matches the format used by other clients. This will allow aleth to be correctly listed on
## [1.6.0] - 2019-04-16
- Added: [#5485]( aleth-bootnode now by default connects to official Ethereum bootnodes. This can be disabled with `--no-bootstrap` flag.
- Added: [#5505]( Allow building with libc++ on Linux.
- Added: [#5514]( Improved logging in case of RPC method failures.
- Added: [#5526]( Improved logging when loading chain config json containing syntax error.
- Changed: [#5464]( Upgrade OS and compilers in the docker image for tests.
- Changed: [#5560]( Upgrade [ethash]( library to version 0.4.4.
- Removed: [#5538]( Removed --private flag from aleth command-line arguments.
- Fixed: [#5483]( Don't ping the same node more than once in a row; also fixes the assertion failure.
- Fixed: [#5512]( Calling `eth_call` without `from` argument.
- Fixed: [#5502]( Fix Discovery terminating prematurely because of race condition.
- Fixed: [#5452]( Correctly handle Discovery messages when the peer changes public key.
- Fixed: [#5519]( Correctly handle Discovery messages with known public key but unknown endpoint.
- Fixed: [#5523]( [#5533]( Fix syncing terminating prematurely because of race condition.
- Fixed: [#5539]( Fix logic for determining if dao hard fork block header should be requested.
- Fixed: [#5547]( Fix unnecessary slow-down of eth_flush RPC method.
- Fixed: [#5548]( Fix rlp tool for long hexadecimal string inputs.
- Fixed: [#5181]( Fix building on PowerPC architecture where -mtune=generic is not available.
# Aleth: Ethereum C++ client, tools and libraries.
# Copyright 2013-2019 Aleth Authors.
# Licensed under the GNU General Public License, Version 3. See the LICENSE file.
cmake_minimum_required(VERSION 3.9.3)
if (NOT EXISTS ${CMAKE_SOURCE_DIR}/evmc/.git OR NOT EXISTS ${CMAKE_SOURCE_DIR}/cmake/cable/.git)
message(FATAL_ERROR "Git submodules not initialized, execute:\n git submodule update --init")
cable_configure_toolchain(DEFAULT cxx14-pic)
set(ETH_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}/cmake" CACHE PATH "The path to the cmake directory")
# Map current configuration to configurations of imported targets.
set(HUNTER_CONFIGURATION_TYPES Release CACHE STRING "Hunter configuration types")
set(HUNTER_JOBS_NUMBER 4 CACHE STRING "Hunter jobs number")
set(HUNTER_CACHE_SERVERS "" CACHE STRING "Hunter cache servers")
set(HUNTER_PASSWORDS_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Hunter/passwords.cmake CACHE STRING "Hunter password path")
# In CI builds upload the binaries if the GITHUB_USER_PASSWORD was decrypted
# (only for branches and internal PRs).
set(run_upload YES)
set(run_upload NO)
option(HUNTER_RUN_UPLOAD "Upload binaries to the cache server" ${run_upload})
URL ""
SHA1 "c022f0c2480e835a6bafdd734035ec2071b51897"