Skip to content
This repository has been archived by the owner on Feb 7, 2018. It is now read-only.

Commit

Permalink
Merge branch 'develop' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseth committed May 30, 2016
2 parents 28b30ec + ba110f1 commit cf2b961
Show file tree
Hide file tree
Showing 20 changed files with 147 additions and 159 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ include(EthPolicy)
eth_policy()

# project name and version should be set after cmake_policy CMP0048
project(cpp-ethereum VERSION "1.2.4")
project(cpp-ethereum VERSION "1.2.5")

include(EthCompilerSettings)

Expand Down
28 changes: 21 additions & 7 deletions CodingStandards.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
0. Formatting

GOLDEN RULE: Follow the style of the existing code when you make changes.

GOLDEN RULE: Never *ever* use spaces for formatting.

a. Use tabs for indentation!
a. Use tabs for leading indentation
- tab stops are every 4 characters.
- One indentation level -> exactly one byte (i.e. a tab character) in the source file.
- Never use spaces to line up sequential lines: If you have run-on lines, indent as you would for a block.
- If you have run-on lines, indent as you would for a block.
b. Line widths:
- Don't worry about having lines of code > 80-char wide.
- Lines of comments should be formatted according to ease of viewing, but simplicity is to be prefered over beauty.
Expand Down Expand Up @@ -60,8 +59,6 @@ std::tuple<float, float> meanAndSigma(std::vector<float> const& _v);
2. Preprocessor;

a. File comment is always at top, and includes:
- Original author, date.
- Later maintainers (not contributors - they can be seen through VCS log).
- Copyright.
- License (e.g. see COPYING).
b. Never use #ifdef/#define/#endif file guards. Prefer #pragma once as first line below file comment.
Expand Down Expand Up @@ -179,7 +176,7 @@ a. Collection conventions:
b. Class conventions:
- -Face means the interface of some shared concept. (e.g. FooFace might be a pure virtual class.)
c. Avoid unpronouncable names;
- If you need to shorten a name favour a pronouncable slice of the original to a scatterred set of consonants.
- If you need to shorten a name favour a pronouncable slice of the original to a scattered set of consonants.
- e.g. Manager shortens to Man rather than Mgr.
d. Avoid prefixes of initials (e.g. DON'T use IMyInterface, CMyImplementation)
e. Find short, memorable & (at least semi-) descriptive names for commonly used classes or name-fragments.
Expand All @@ -201,6 +198,7 @@ c. Where there are exceptions to this (due to excessive use and clear meaning),
d. In general expressions should be roughly as important/semantically meaningful as the space they occupy.



11. Commenting

a. Comments should be doxygen-compilable, using @notation rather than \notation.
Expand Down Expand Up @@ -228,6 +226,8 @@ a. Includes should go in order of lower level (STL -> boost -> libdevcore -> lib

b. The only exception to the above rule is the top of a .cpp file where its corresponding header should be located.



13. Logging

Logging should be performed at appropriate verbosities depending on the logging message.
Expand All @@ -239,3 +239,17 @@ Some rules to keep in mind:
- Verbosity >= 2 -> Anything that is or might be displayed more than once every minute
- Verbosity >= 3 -> Anything that only a developer would understand
- Verbosity >= 4 -> Anything that is low-level (e.g. peer disconnects, timers being cancelled)


14. Recommended reading

Herb Sutter and Bjarne Stroustrup
- "C++ Core Guidelines" (https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md)

Herb Sutter and Andrei Alexandrescu
- "C++ Coding Standards: 101 Rules, Guidelines, and Best Practices"

Scott Meyers
- "Effective C++: 55 Specific Ways to Improve Your Programs and Designs (3rd Edition)"
- "More Effective C++: 35 New Ways to Improve Your Programs and Designs"
- "Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14"
2 changes: 1 addition & 1 deletion alethzero
11 changes: 0 additions & 11 deletions astylerc

This file was deleted.

2 changes: 1 addition & 1 deletion dependency_graph/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def processSubmodule(root, submodule):

# Mix doesn't have the same sub-module structure as everything else
if (submodule == "mix"):
print 'Mix\n'
print '"Mix-ide"\n'
else:
print getLibraryAndApplicationNames(submodulePath)

Expand Down
16 changes: 0 additions & 16 deletions diffscript.sh

This file was deleted.

14 changes: 0 additions & 14 deletions foreach.sh

This file was deleted.

67 changes: 0 additions & 67 deletions getcoverage.sh

This file was deleted.

7 changes: 0 additions & 7 deletions getdev.sh

This file was deleted.

2 changes: 1 addition & 1 deletion libethereum
Submodule libethereum updated 86 files
+4 −0 .gitmodules
+4 −2 CMakeLists.txt
+0 −9 ConfigInfo.h.in
+4 −0 ethkey/main.cpp
+1 −1 ethminer/CMakeLists.txt
+5 −1 ethminer/MinerAux.h
+5 −0 ethvm/main.cpp
+1 −0 evmjit
+0 −1 evmjit/.gitignore
+0 −37 evmjit/CMakeLists.txt
+0 −21 evmjit/LICENSE.md
+0 −36 evmjit/README.md
+0 −76 evmjit/include/evmjit/JIT-c.h
+0 −222 evmjit/include/evmjit/JIT.h
+0 −572 evmjit/libevmjit/Arith256.cpp
+0 −41 evmjit/libevmjit/Arith256.h
+0 −275 evmjit/libevmjit/Array.cpp
+0 −72 evmjit/libevmjit/Array.h
+0 −210 evmjit/libevmjit/BasicBlock.cpp
+0 −88 evmjit/libevmjit/BasicBlock.h
+0 −9 evmjit/libevmjit/BuildInfo.h.in
+0 −61 evmjit/libevmjit/CMakeLists.txt
+0 −178 evmjit/libevmjit/Cache.cpp
+0 −59 evmjit/libevmjit/Cache.h
+0 −16 evmjit/libevmjit/Common.h
+0 −841 evmjit/libevmjit/Compiler.cpp
+0 −58 evmjit/libevmjit/Compiler.h
+0 −46 evmjit/libevmjit/CompilerHelper.cpp
+0 −63 evmjit/libevmjit/CompilerHelper.h
+0 −33 evmjit/libevmjit/Endianness.cpp
+0 −23 evmjit/libevmjit/Endianness.h
+0 −95 evmjit/libevmjit/ExecStats.cpp
+0 −68 evmjit/libevmjit/ExecStats.h
+0 −212 evmjit/libevmjit/Ext.cpp
+0 −79 evmjit/libevmjit/Ext.h
+0 −280 evmjit/libevmjit/GasMeter.cpp
+0 −71 evmjit/libevmjit/GasMeter.h
+0 −39 evmjit/libevmjit/Instruction.cpp
+0 −237 evmjit/libevmjit/Instruction.h
+0 −49 evmjit/libevmjit/JIT-c.cpp
+0 −293 evmjit/libevmjit/JIT.cpp
+0 −249 evmjit/libevmjit/Memory.cpp
+0 −51 evmjit/libevmjit/Memory.h
+0 −182 evmjit/libevmjit/Optimizer.cpp
+0 −21 evmjit/libevmjit/Optimizer.h
+0 −281 evmjit/libevmjit/RuntimeManager.cpp
+0 −83 evmjit/libevmjit/RuntimeManager.h
+0 −73 evmjit/libevmjit/Type.cpp
+0 −61 evmjit/libevmjit/Type.h
+0 −27 evmjit/libevmjit/Utils.cpp
+0 −40 evmjit/libevmjit/Utils.h
+0 −7 evmjit/libevmjit/preprocessor/llvm_includes_end.h
+0 −12 evmjit/libevmjit/preprocessor/llvm_includes_start.h
+0 −53 evmjit/libevmjit/support/Path.cpp
+0 −36 evmjit/libevmjit/support/Path.h
+4 −0 libethash-cl/cl.hpp
+1 −1 libethash/internal.c
+6 −24 libethashseal/Ethash.cpp
+3 −3 libethashseal/EthashAux.cpp
+2 −2 libethcore/ABI.h
+1 −1 libethcore/Common.cpp
+2 −2 libethcore/CommonJS.cpp
+1 −1 libethcore/ICAP.cpp
+1 −1 libethcore/Precompiled.cpp
+3 −1 libethcore/SealEngine.cpp
+3 −3 libethereum/BlockChain.cpp
+4 −4 libethereum/BlockChainSync.cpp
+2 −2 libethereum/BlockQueue.cpp
+3 −0 libethereum/ChainParams.cpp
+0 −1 libethereum/Client.h
+2 −2 libethereum/ClientBase.cpp
+5 −5 libethereum/EthereumPeer.cpp
+26 −18 libethereum/Executive.cpp
+13 −1 libethereum/Executive.h
+2 −2 libevm/ExtVMFace.h
+28 −28 libevm/VM.cpp
+6 −6 test/TestHelper.cpp
+0 −2 test/libethereum/BlockChain.cpp
+91 −0 test/libethereum/BlockchainTestsFiller/bcStateTestFiller.json
+5 −0 test/libethereum/State.cpp
+858 −0 test/libethereum/StateTestsFiller/Homestead/stBoundsTestFiller.json
+1 −1 test/libevm/VMTestsFiller/vmArithmeticTestFiller.json
+10 −7 test/libevm/VMTestsFiller/vmBitwiseLogicOperationTestFiller.json
+3 −3 test/libevm/VMTestsFiller/vmEnvironmentalInfoTestFiller.json
+4 −2 test/libevm/VMTestsFiller/vmIOandFlowOperationsTestFiller.json
+2 −2 test/libevm/VMTestsFiller/vmLogTestFiller.json
2 changes: 1 addition & 1 deletion libweb3core
2 changes: 1 addition & 1 deletion mix
Submodule mix updated 2 files
+1 −1 CMakeLists.txt
+2 −2 src/CodeModel.cpp
14 changes: 0 additions & 14 deletions nameeach.sh

This file was deleted.

6 changes: 0 additions & 6 deletions new.sh

This file was deleted.

7 changes: 0 additions & 7 deletions push.sh

This file was deleted.

116 changes: 116 additions & 0 deletions recreate-cpp-ethereum.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
#!/usr/bin/env bash
#
# Script to recreate the cpp-ethereum repository by copying directories from webthree-umbrella.
#
# This is for one step of the "Dry run for repository reorganization" which is to get the content
# correct, automated and tested, before pulling the trigger on the real move, which will need to
# preserve history.
#
# See https://github.com/ethereum/webthree-umbrella/issues/453

outputDirectory=../cpp-ethereum-recreated

rm -rf $outputDirectory
mkdir -p $outputDirectory
mkdir -p $outputDirectory/test/

# alethzero intentionally omitted
rsync -r ./dependency_graph/ $outputDirectory/dependency_graph/
rsync -r ./doc/ $outputDirectory/doc/
rsync -r ./docker/ $outputDirectory/docker/
rsync -r ./libethereum/ethkey/ $outputDirectory/ethkey/
rsync -r ./libethereum/ethminer/ $outputDirectory/ethminer/
rsync -r ./libethereum/ethvm/ $outputDirectory/ethvm/
rsync -r ./libethereum/libethash/ $outputDirectory/libethash/
rsync -r ./libethereum/libethash-cl/ $outputDirectory/libethash-cl/
rsync -r ./libethereum/libethashseal/ $outputDirectory/libethashseal/
rsync -r ./libethereum/libethcore/ $outputDirectory/libethcore/
rsync -r ./libethereum/libethereum/ $outputDirectory/libethereum/
rsync -r ./libethereum/libevm/ $outputDirectory/libevm/
rsync -r ./libethereum/libevmcore/ $outputDirectory/libevmcore/
rsync -r ./libethereum/libnatspec/ $outputDirectory/libnatspec/
rsync -r ./libethereum/libtestutils/ $outputDirectory/libtestutils/
rsync -r ./libethereum/test/deprecated/ $outputDirectory/test/deprecated/
rsync -r ./libethereum/test/external-dependencies/ $outputDirectory/test/external-dependencies/
rsync -r ./libethereum/test/fuzzTesting/ $outputDirectory/test/fuzzTesting/
rsync -r ./libethereum/test/libethcore/ $outputDirectory/test/libethcore/
rsync -r ./libethereum/test/libethereum/ $outputDirectory/test/libethereum/
rsync -r ./libethereum/test/libevm/ $outputDirectory/test/libevm/
rsync -r ./libethereum/test/libnatspec/ $outputDirectory/test/libnatspec/
rsync -r ./libethereum/test/libweb3core/ $outputDirectory/test/libweb3core/
rsync -r ./libethereum/test/BlockChainHelper.cpp $outputDirectory/test/BlockChainHelper.cpp
rsync -r ./libethereum/test/BlockChainHelper.h $outputDirectory/test/BlockChainHelper.h
rsync -r ./libethereum/test/boostTest.cpp $outputDirectory/test/boostTest.cpp
rsync -r ./libethereum/test/JSON_test.sol $outputDirectory/test/JSON_test.sol
rsync -r ./libethereum/test/JsonSpiritHeaders.h $outputDirectory/test/JsonSpiritHeaders.h
rsync -r ./libethereum/test/Stats.cpp $outputDirectory/test/Stats.cpp
rsync -r ./libethereum/test/Stats.h $outputDirectory/test/Stats.h
rsync -r ./libethereum/test/TestHelper.cpp $outputDirectory/test/TestHelper.cpp
rsync -r ./libethereum/test/TestHelper.h $outputDirectory/test/TestHelper.h
rsync -r ./libethereum/test/TestUtils.cpp $outputDirectory/test/TestUtils.cpp
rsync -r ./libethereum/test/TestUtils.h $outputDirectory/test/TestUtils.h
rsync -r ./libweb3core/bench/ $outputDirectory/bench/
rsync -r ./libweb3core/libdevcore/ $outputDirectory/libdevcore/
rsync -r ./libweb3core/libdevcrypto/ $outputDirectory/libdevcrypto/
rsync -r ./libweb3core/libp2p/ $outputDirectory/libp2p/
rsync -r ./libweb3core/rlp/ $outputDirectory/rlp/
rsync -r ./libweb3core/test/libdevcore/ $outputDirectory/test/libdevcore/
rsync -r ./libweb3core/test/libdevcrypto/ $outputDirectory/test/libdevcrypto/
rsync -r ./libweb3core/test/libp2p/ $outputDirectory/test/libp2p/
rsync -r ./libweb3core/test/memorydb.cpp $outputDirectory/test/memorydb.cpp
rsync -r ./libweb3core/test/overlaydb.cpp $outputDirectory/test/overlaydb.cpp
# libweb3core/test/test.cpp and test.h intentionally omitted because they clash with boosttest.cpp from libethereum/test.
# mix intentionally omitted
# res intentionally omitted
# solidity intentionally omitted
# web3.js intentionally omitted
rsync -r ./webthree/eth/ $outputDirectory/eth/
rsync -r ./webthree/libweb3jsonrpc/ $outputDirectory/libweb3jsonrpc/
rsync -r ./webthree/libwebthree/ $outputDirectory/libwebthree/
rsync -r ./webthree/libwhisper/ $outputDirectory/libwhisper/
rsync -r ./webthree/test/ethrpctest/ $outputDirectory/test/ethrpctest/
rsync -r ./webthree/test/libweb3jsonrpc/ $outputDirectory/test/libweb3jsonrpc/
rsync -r ./webthree/test/libwhisper/ $outputDirectory/test/libwhisper/
rsync -r ./webthree-helpers/cmake/ $outputDirectory/cmake/
rsync -r ./webthree-helpers/extdep/ $outputDirectory/extdep/
rsync -r ./webthree-helpers/homebrew/ $outputDirectory/homebrew/
rsync -r ./webthree-helpers/js/ $outputDirectory/js/
rsync -r ./webthree-helpers/scripts/ $outputDirectory/scripts/
rsync -r ./webthree-helpers/templates/ $outputDirectory/templates/
rsync -r ./webthree-helpers/utils/ $outputDirectory/utils/
# intentionally left /webthree-helpers root files behind: (LICENSE, new.sh, README.md)
# TODO /webthree-helpers/cmake has (LICENSE, README.md), but why?
# TODO /webthree-helpers/homebrew has (LICENSE, README.md), but why?
# Tried unsuccessfully to delete homebrew ones. Needed in some release flow?

# Loose files in the root directory of webthree-umbrella.
# TODO - Move all these loose scripts in the root into /scripts
# CMakeLists.txt intentionally omitted.
rsync -r ./CodingStandards.txt $outputDirectory/CodingStandards.txt
rsync -r ./CONTRIBUTING.md $outputDirectory/CONTRIBUTING.md
rsync -r ./GPLV3_LICENSE $outputDirectory/GPLV3_LICENSE
rsync -r ./LICENSE $outputDirectory/LICENSE
# qtcreator-style intentionally omitted.
# README.md intentionally omitted.
rsync -r ./sanitizer-blacklist.txt $outputDirectory/sanitizer-blacklist.txt
rsync -r ./sync.sh $outputDirectory/sync.sh

# These files cannot be upstreamed, but instead need to be manually maintained and then dropped into 'cpp-ethereum' when we merge.
# These CMakeLists.txt were manually synthesized by Bob.
curl https://raw.githubusercontent.com/bobsummerwill/cpp-ethereum/merge_repos/cmake/EthOptions.cmake > $outputDirectory/cmake/EthOptions.cmake
curl https://raw.githubusercontent.com/bobsummerwill/cpp-ethereum/merge_repos/CMakeLists.txt > $outputDirectory/CMakeLists.txt
curl https://raw.githubusercontent.com/bobsummerwill/cpp-ethereum/merge_repos/README.md > $outputDirectory/README.md
curl https://raw.githubusercontent.com/bobsummerwill/cpp-ethereum/merge_repos/test/CMakeLists.txt > $outputDirectory/test/CMakeLists.txt

# These files could be upstreamed, but it isn't worth doing so, because they can only be used after the repo reorganization.
curl https://raw.githubusercontent.com/bobsummerwill/cpp-ethereum/merge_repos/.travis.yml > $outputDirectory/.travis.yml
curl https://raw.githubusercontent.com/bobsummerwill/cpp-ethereum/merge_repos/appveyor.yml > $outputDirectory/appveyor.yml
curl https://raw.githubusercontent.com/bobsummerwill/cpp-ethereum/merge_repos/circle.yml > $outputDirectory/circle.yml
curl https://raw.githubusercontent.com/bobsummerwill/cpp-ethereum/merge_repos/setup.sh > $outputDirectory/setup.sh

# TODO - evmjit submodule will need "hooking up", for now we'll just git clone it into a local directory to get
# the content we need for testing.
git clone https://github.com/ethereum/evmjit $outputDirectory/evmjit

# TODO - Move Contributing and coding standards to http://ethdocs.org
# TODO - Where will qtcreator-style go? Ditto for res folder.
2 changes: 1 addition & 1 deletion solidity
Submodule solidity updated 54 files
+11 −0 .travis.yml
+1 −1 CMakeLists.txt
+1 −3 README.md
+8 −1 docs/common-patterns.rst
+1 −1 docs/conf.py
+175 −41 docs/contracts.rst
+362 −284 docs/control-structures.rst
+69 −38 docs/frequently-asked-questions.rst
+32 −4 docs/index.rst
+11 −11 docs/installing-solidity.rst
+4 −8 docs/introduction-to-smart-contracts.rst
+15 −14 docs/layout-of-source-files.rst
+9 −5 docs/miscellaneous.rst
+98 −66 docs/solidity-by-example.rst
+36 −36 docs/structure-of-a-contract.rst
+28 −20 docs/style-guide.rst
+201 −142 docs/types.rst
+6 −5 docs/units-and-global-variables.rst
+2 −2 libevmasm/Instruction.cpp
+8 −10 libevmasm/SourceLocation.h
+4 −0 liblll/Parser.cpp
+3 −3 libsolidity/analysis/ConstantEvaluator.cpp
+1 −1 libsolidity/analysis/NameAndTypeResolver.cpp
+3 −4 libsolidity/analysis/ReferencesResolver.cpp
+79 −34 libsolidity/analysis/TypeChecker.cpp
+428 −153 libsolidity/ast/Types.cpp
+64 −13 libsolidity/ast/Types.h
+9 −815 libsolidity/codegen/Compiler.cpp
+3 −63 libsolidity/codegen/Compiler.h
+54 −18 libsolidity/codegen/CompilerContext.cpp
+42 −8 libsolidity/codegen/CompilerContext.h
+32 −11 libsolidity/codegen/CompilerUtils.cpp
+853 −0 libsolidity/codegen/ContractCompiler.cpp
+134 −0 libsolidity/codegen/ContractCompiler.h
+80 −42 libsolidity/codegen/ExpressionCompiler.cpp
+1 −1 libsolidity/codegen/ExpressionCompiler.h
+6 −0 libsolidity/codegen/LValue.cpp
+10 −2 libsolidity/formal/Why3Translator.cpp
+55 −26 libsolidity/inlineasm/AsmCodeGen.cpp
+3 −1 libsolidity/inlineasm/AsmCodeGen.h
+24 −9 libsolidity/inlineasm/AsmData.h
+59 −33 libsolidity/inlineasm/AsmParser.cpp
+17 −1 libsolidity/inlineasm/AsmParser.h
+7 −3 libsolidity/inlineasm/AsmStack.cpp
+1 −1 libsolidity/inlineasm/AsmStack.h
+4 −1 libsolidity/parsing/Token.cpp
+1 −1 lllc/CMakeLists.txt
+1 −1 solc/CMakeLists.txt
+9 −2 solc/CommandLineInterface.cpp
+1 −1 test/CMakeLists.txt
+160 −0 test/libsolidity/SolidityEndToEndTest.cpp
+4 −3 test/libsolidity/SolidityExpressionCompiler.cpp
+496 −32 test/libsolidity/SolidityNameAndTypeResolution.cpp
+46 −0 test/libsolidity/SolidityParser.cpp
2 changes: 1 addition & 1 deletion web3.js

0 comments on commit cf2b961

Please sign in to comment.