Skip to content

Commit

Permalink
Merge pull request EOSIO#13 from EOSIO/master
Browse files Browse the repository at this point in the history
V1
  • Loading branch information
igorls authored Jun 1, 2018
2 parents 3782945 + a9526dc commit ac75761
Show file tree
Hide file tree
Showing 44 changed files with 170,400 additions and 4,054 deletions.
30 changes: 14 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cmake_minimum_required( VERSION 3.5 )

# Defines EOS library target.
project( EOS )
project( EOSIO )

enable_testing()

Expand All @@ -13,13 +12,13 @@ include( VersionMacros )
include( SetupTargetMacros )
include( InstallDirectoryPermissions )

set( BLOCKCHAIN_NAME "Eos" )
set( BLOCKCHAIN_NAME "EOSIO" )
set( CMAKE_CXX_STANDARD 14 )
set( CMAKE_CXX_EXTENSIONS ON )
set( CXX_STANDARD_REQUIRED ON)

set(VERSION_MAJOR 4)
set(VERSION_MINOR 2)
set(VERSION_MAJOR 1)
set(VERSION_MINOR 0)
set(VERSION_PATCH 0)

set( CLI_CLIENT_EXECUTABLE_NAME cleos )
Expand All @@ -29,20 +28,19 @@ set( INSTALLER_APP_ID "68ad7005-8eee-49c9-95ce-9eed97e5b347" )

# http://stackoverflow.com/a/18369825
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
message(FATAL_ERROR "GCC version must be at least 4.8!")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
message(FATAL_ERROR "GCC version must be at least 6.0!")
endif()
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.3)
message(FATAL_ERROR "Clang version must be at least 3.3!")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0)
message(FATAL_ERROR "Clang version must be at least 4.0!")
endif()
endif()


set(CMAKE_EXPORT_COMPILE_COMMANDS "ON")
set(BUILD_DOXYGEN FALSE CACHE BOOL "Build doxygen documentation on every make")
set(BUILD_MONGO_DB_PLUGIN FALSE CACHE BOOL "Build mongo database plugin")
set(EOS_EGENESIS_JSON "${CMAKE_CURRENT_SOURCE_DIR}/genesis.json" )

#set (USE_PCH 1)

Expand Down Expand Up @@ -101,7 +99,7 @@ FIND_PACKAGE(Boost 1.67 REQUIRED COMPONENTS

if( WIN32 )

message( STATUS "Configuring Eos on WIN32")
message( STATUS "Configuring EOSIO on WIN32")
set( DB_VERSION 60 )
set( BDB_STATIC_LIBS 1 )

Expand Down Expand Up @@ -136,11 +134,11 @@ else( WIN32 ) # Apple AND Linux

if( APPLE )
# Apple Specific Options Here
message( STATUS "Configuring Eos on OS X" )
message( STATUS "Configuring EOSIO on OS X" )
set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-deprecated-declarations" )
else( APPLE )
# Linux Specific Options Here
message( STATUS "Configuring Eos on Linux" )
message( STATUS "Configuring EOSIO on Linux" )
set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wall" )
if ( FULL_STATIC_BUILD )
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc")
Expand Down Expand Up @@ -169,7 +167,7 @@ else( WIN32 ) # Apple AND Linux

endif( WIN32 )

set(ENABLE_COVERAGE_TESTING FALSE CACHE BOOL "Build Eos for code coverage analysis")
set(ENABLE_COVERAGE_TESTING FALSE CACHE BOOL "Build EOSIO for code coverage analysis")

if(ENABLE_COVERAGE_TESTING)
SET(CMAKE_CXX_FLAGS "--coverage ${CMAKE_CXX_FLAGS}")
Expand All @@ -187,7 +185,7 @@ string(TOUPPER ${CORE_SYMBOL_NAME} CORE_SYMBOL_NAME)

string(LENGTH ${CORE_SYMBOL_NAME} CORE_SYMBOL_NAME_LENGTH)
if (CORE_SYMBOL_NAME_LENGTH GREATER 7)
message(FATAL_ERROR "CORE_SYMBOL_NAME lenght must be a between 1 and 7 characters")
message(FATAL_ERROR "CORE_SYMBOL_NAME length must be between 1 and 7 characters")
endif()

message( STATUS "Using '${CORE_SYMBOL_NAME}' as CORE symbol name" )
Expand All @@ -196,7 +194,7 @@ if ("${EOSIO_ROOT_KEY}" STREQUAL "")
set(EOSIO_ROOT_KEY "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV")
endif()

message( STATUS "Using '${EOSIO_ROOT_KEY}' as public key for eosio account" )
message( STATUS "Using '${EOSIO_ROOT_KEY}' as public key for 'eosio' account" )

include(wasm)

Expand Down
2 changes: 1 addition & 1 deletion CMakeModules/doxygen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include(FindDoxygen)
if(NOT DOXYGEN_FOUND)
message(STATUS "Doxygen not found. Contract documentation will not be generated.")
else()
set(DOXY_EOS_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}" CACHE INTERNAL "Version string used in PROJECT_NUMBER.")
set(DOXY_EOS_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" CACHE INTERNAL "Version string used in PROJECT_NUMBER.")
# CMake strips trailing path separators off of variables it knows are paths,
# so the trailing '/' Doxygen expects is embedded in the doxyfile.
set(DOXY_DOC_DEST_DIR "${CMAKE_BINARY_DIR}/docs" CACHE PATH "Path to the doxygen output")
Expand Down
23 changes: 11 additions & 12 deletions Docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ cd eos/Docker
docker build . -t eosio/eos
```

The above will build off the most recent commit to the master branch by default. If you would like to target a specific branch/tag, you may use a build argument. For example, if you wished to generate a docker image based off of the dawn-v4.0.0 tag, you could do the following:
The above will build off the most recent commit to the master branch by default. If you would like to target a specific branch/tag, you may use a build argument. For example, if you wished to generate a docker image based off of the v1.0.0 tag, you could do the following:

```bash
docker build -t eosio/eos:dawn-v4.0.0 --build-arg branch=dawn-v4.0.0 .
docker build -t eosio/eos:v1.0.0 --build-arg branch=v1.0.0 .
```

By default, the symbol in eosio.system is set to SYS. You can override this using the symbol argument while building the docker image.
Expand All @@ -35,7 +35,7 @@ docker build -t eosio/eos --build-arg symbol=<symbol> .
## Start nodeos docker container only

```bash
docker run --name nodeos -p 8888:8888 -p 9876:9876 -t eosio/eos nodeosd.sh arg1 arg2
docker run --name nodeos -p 8888:8888 -p 9876:9876 -t eosio/eos nodeosd.sh -e arg1 arg2
```

By default, all data is persisted in a docker volume. It can be deleted if the data is outdated or corrupted:
Expand All @@ -49,7 +49,7 @@ $ docker volume rm fdc265730a4f697346fa8b078c176e315b959e79365fc9cbd11f090ea0cb5
Alternately, you can directly mount host directory into the container

```bash
docker run --name nodeos -v /path-to-data-dir:/opt/eosio/bin/data-dir -p 8888:8888 -p 9876:9876 -t eosio/eos nodeosd.sh arg1 arg2
docker run --name nodeos -v /path-to-data-dir:/opt/eosio/bin/data-dir -p 8888:8888 -p 9876:9876 -t eosio/eos nodeosd.sh -e arg1 arg2
```

## Get chain info
Expand Down Expand Up @@ -142,7 +142,7 @@ version: "3"
services:
nodeosd:
image: eosio/eos:latest
command: /opt/eosio/bin/nodeosd.sh
command: /opt/eosio/bin/nodeosd.sh -e
hostname: nodeosd
ports:
- 8888:8888
Expand Down Expand Up @@ -173,28 +173,27 @@ run `docker pull eosio/eos:latest`

run `docker-compose up`

### Dawn 4.2 Testnet
### EOSIO 1.0 Testnet

We can easily set up a Dawn 4.2 local testnet using docker images. Just run the following commands:
We can easily set up a EOSIO 1.0 local testnet using docker images. Just run the following commands:

Note: if you want to use the mongo db plugin, you have to enable it in your `data-dir/config.ini` first.

```
# pull images
docker pull eosio/eos:20180528
docker pull mongo:latest
docker pull eosio/eos:v1.0.0
# create volume
docker volume create --name=nodeos-data-volume
docker volume create --name=keosd-data-volume
docker volume create --name=mongo-data-volume
# start containers
docker-compose -f docker-compose-dawn4.2.yaml up -d
docker-compose -f docker-compose-eosio1.0.yaml up -d
# get chain info
curl http://127.0.0.1:8888/v1/chain/get_info
# get logs
docker-compose logs -f nodeosd
# stop containers
docker-compose -f docker-compose-dawn4.2.yaml down
docker-compose -f docker-compose-eosio1.0.yaml down
```

The `blocks` data are stored under `--data-dir` by default, and the wallet files are stored under `--wallet-dir` by default, of course you can change these as you want.
Expand Down
2 changes: 1 addition & 1 deletion Docker/builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN echo 'APT::Install-Recommends 0;' >> /etc/apt/apt.conf.d/01norecommends \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y sudo wget curl net-tools ca-certificates unzip gnupg

RUN echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-4.0 main" >> /etc/apt/sources.list.d/llvm.list \
RUN echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main" >> /etc/apt/sources.list.d/llvm.list \
&& wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y git-core automake autoconf libtool build-essential pkg-config libtool \
Expand Down
Loading

0 comments on commit ac75761

Please sign in to comment.