Skip to content

Commit

Permalink
merge v1.0.2 (#12)
Browse files Browse the repository at this point in the history
* boscore basic improvement (#2)

* kafka_plugin code

* Automatic installation librdkafka/cppkafka

* Feature/ci

* Feature/48 kafka plugin

* add CMakeModules/FindCppkafka.cmake

* Production of block in time zone sequence

* P2p self discovery

* P2p self discovery

* add notify_plugin

* add api "get_block_detail"

* add free res limit and blklst code

* update free res limit and blklst code

* update res code

* update unittest code

* revert submodule version

* code typo

* update  blklist code

* update sync name list db object error code

* update  code

* update  index code

* Feature/5 ramdom

* Revert "Merge branch 'feature/5-ramdom' into 'develop'"

This reverts merge request !8

* adjust for setup BOSCore

* change description

* adjust the kafka plugin dependency be more special

* use boscore repository to improve security

* change version tag

* finish for docker/builder

* pass to build docker and update readme

* add actionseed, global action sequence (#5)

* delete renamed old file

* BOSCore v1.0.1-1.4.3

* restructure the version schema

* fix __gmpn_set_str error when build bos.contract

* prepare for the v1.0.1

* finish BOS basic functions

* add README files

* update info

* Release/1.0.x (#11)

* boscore basic improvement (#2)

* kafka_plugin code

* Automatic installation librdkafka/cppkafka

* Feature/ci

* Feature/48 kafka plugin

* add CMakeModules/FindCppkafka.cmake

* Production of block in time zone sequence

* P2p self discovery

* P2p self discovery

* add notify_plugin

* add api "get_block_detail"

* add free res limit and blklst code

* update free res limit and blklst code

* update res code

* update unittest code

* revert submodule version

* code typo

* update  blklist code

* update sync name list db object error code

* update  code

* update  index code

* Feature/5 ramdom

* Revert "Merge branch 'feature/5-ramdom' into 'develop'"

This reverts merge request !8

* adjust for setup BOSCore

* change description

* adjust the kafka plugin dependency be more special

* use boscore repository to improve security

* change version tag

* finish for docker/builder

* pass to build docker and update readme

* add actionseed, global action sequence (#5)

* delete renamed old file

* BOSCore v1.0.1-1.4.3

* restructure the version schema

* fix __gmpn_set_str error when build bos.contract

* prepare for the v1.0.1

* add README files

* update info

* readme for kafka & add time for action (#5)

* 重启 节点,黑名单 失效,fixes #7 (#8)

* restart sync list db

* recovery system account bos to eosio

* recovery system account bos to eosio

* recovery system account bos to eosio

* Fix/#3 notify plugin (#10)

* Add debug info

* comment log

* rm log for notify_plugin

* prepare for v1.0.2
  • Loading branch information
Thaipanda committed Dec 13, 2018
1 parent 59626f1 commit 37f7e6a
Show file tree
Hide file tree
Showing 74 changed files with 3,870 additions and 189 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ build:
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA -f Docker/Dockerfile .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ include( SetupTargetMacros )
include( InstallDirectoryPermissions )
include( MASSigning )

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

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

set( CLI_CLIENT_EXECUTABLE_NAME cleos )
set( NODE_EXECUTABLE_NAME nodeos )
Expand Down
2 changes: 1 addition & 1 deletion CMakeModules/EosioTester.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ macro(add_eosio_test test_name)
${liblogging}
${libchainbase}
${libbuiltins}
${GMP_LIBRARIES}
${libsecp256k1}
${GMP_LIBRARIES}

LLVMX86Disassembler
LLVMX86AsmParser
Expand Down
29 changes: 29 additions & 0 deletions CMakeModules/FindCppkafka.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Override default CMAKE_FIND_LIBRARY_SUFFIXES
if (CPPKAFKA_SHARED_LIB)
set(CPPKAFKA_SUFFIX so)
else()
set(CPPKAFKA_SUFFIX a)
endif()
message(STATUS "Cppkafka finding .${CPPKAFKA_SUFFIX} library")

FIND_PATH(
CPPKAFKA_INCLUDE_DIR cppkafka.h
PATH "/usr/local"
PATH_SUFFIXES "" "cppkafka")
MARK_AS_ADVANCED(CPPKAFKA_INCLUDE_DIR)

SET(CPPKAFKA_INCLUDE_DIR ${CPPKAFKA_INCLUDE_DIR})

FIND_LIBRARY(
CPPKAFKA_LIBRARY
NAMES cppkafka.${CPPKAFKA_SUFFIX} libcppkafka.${CPPKAFKA_SUFFIX}
HINTS ${CPPKAFKA_INCLUDE_DIR}/..
PATH_SUFFIXES lib${LIB_SUFFIX})
MARK_AS_ADVANCED(CPPKAFKA_LIBRARY)

SET(CPPKAFKA_LIBRARY ${CPPKAFKA_LIBRARY})
message(STATUS "Cppkafka found ${CPPKAFKA_LIBRARY}")

include(FindPackageHandleStandardArgs)
SET(_CPPKAFKA_REQUIRED_VARS CPPKAFKA_INCLUDE_DIR CPPKAFKA_LIBRARY)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Cppkafka DEFAULT_MSG ${_CPPKAFKA_REQUIRED_VARS})
14 changes: 9 additions & 5 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
FROM eosio/builder as builder
FROM boscore/builder as builder
ARG branch=master
ARG symbol=SYS

RUN git clone -b $branch https://github.com/EOSIO/eos.git --recursive \
&& cd eos && echo "$branch:$(git rev-parse HEAD)" > /etc/eosio-version \
ENV OPENSSL_ROOT_DIR /usr/include/openssl


RUN git clone -b $branch https://github.com/boscore/bos.git --recursive \
&& cd bos && echo "$branch:$(git rev-parse HEAD)" > /etc/eosio-version \
&& cmake -H. -B"/tmp/build" -GNinja -DCMAKE_BUILD_TYPE=Release -DWASM_ROOT=/opt/wasm -DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX=/tmp/build -DBUILD_MONGO_DB_PLUGIN=true -DCORE_SYMBOL_NAME=$symbol \
-DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" \
&& cmake --build /tmp/build --target install && rm /tmp/build/bin/eosiocpp


Expand All @@ -15,9 +19,9 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install openssl
COPY --from=builder /usr/local/lib/* /usr/local/lib/
COPY --from=builder /tmp/build/bin /opt/eosio/bin
COPY --from=builder /tmp/build/contracts /contracts
COPY --from=builder /eos/Docker/config.ini /
COPY --from=builder /bos/Docker/config.ini /
COPY --from=builder /etc/eosio-version /etc
COPY --from=builder /eos/Docker/nodeosd.sh /opt/eosio/bin/nodeosd.sh
COPY --from=builder /bos/Docker/nodeosd.sh /opt/eosio/bin/nodeosd.sh
ENV EOSIO_ROOT=/opt/eosio
RUN chmod +x /opt/eosio/bin/nodeosd.sh
ENV LD_LIBRARY_PATH /usr/local/lib
Expand Down
38 changes: 19 additions & 19 deletions Docker/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Run in docker

Simple and fast setup of EOS.IO on Docker is also available.
Simple and fast setup of BOSCore on Docker is also available.

## Install Dependencies

Expand All @@ -12,30 +12,30 @@ Simple and fast setup of EOS.IO on Docker is also available.
- At least 7GB RAM (Docker -> Preferences -> Advanced -> Memory -> 7GB or above)
- If the build below fails, make sure you've adjusted Docker Memory settings and try again.

## Build eos image
## Build BOSCore image

```bash
git clone https://github.com/EOSIO/eos.git --recursive --depth 1
cd eos/Docker
docker build . -t eosio/eos
git clone https://github.com/boscore/bos.git --recursive --depth 1
cd bos/Docker
docker build . -t boscore/bos
```

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.4.4 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.2 tag, you could do the following:

```bash
docker build -t eosio/eos:v1.4.4 --build-arg branch=v1.4.4 .
docker build -t boscore/bos:v1.0.2 --build-arg branch=v1.0.2 .
```

By default, the symbol in eosio.system is set to SYS. You can override this using the symbol argument while building the docker image.

```bash
docker build -t eosio/eos --build-arg symbol=<symbol> .
docker build -t boscore/bos --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 -e --http-alias=nodeos:8888 --http-alias=127.0.0.1:8888 --http-alias=localhost:8888 arg1 arg2
docker run --name nodeos -p 8888:8888 -p 9876:9876 -t boscore/bos nodeosd.sh -e --http-alias=nodeos:8888 --http-alias=127.0.0.1:8888 --http-alias=localhost:8888 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 -e --http-alias=nodeos:8888 --http-alias=127.0.0.1:8888 --http-alias=localhost:8888 arg1 arg2
docker run --name nodeos -v /path-to-data-dir:/opt/eosio/bin/data-dir -p 8888:8888 -p 9876:9876 -t boscore/bos nodeosd.sh -e --http-alias=nodeos:8888 --http-alias=127.0.0.1:8888 --http-alias=localhost:8888 arg1 arg2
```

## Get chain info
Expand Down Expand Up @@ -92,13 +92,13 @@ docker-compose stop keosd

### Develop/Build custom contracts

Due to the fact that the eosio/eos image does not contain the required dependencies for contract development (this is by design, to keep the image size small), you will need to utilize the eosio/eos-dev image. This image contains both the required binaries and dependencies to build contracts using eosiocpp.
Due to the fact that the boscore/bos image does not contain the required dependencies for contract development (this is by design, to keep the image size small), you will need to utilize the boscore/bos-dev image. This image contains both the required binaries and dependencies to build contracts using eosiocpp.

You can either use the image available on [Docker Hub](https://hub.docker.com/r/eosio/eos-dev/) or navigate into the dev folder and build the image manually.
You can either use the image available on [Docker Hub](https://hub.docker.com/r/boscore/bos-dev/) or navigate into the dev folder and build the image manually.

```bash
cd dev
docker build -t eosio/eos-dev .
docker build -t boscore/bos-dev .
```

### Change default configuration
Expand Down Expand Up @@ -133,15 +133,15 @@ docker volume rm keosd-data-volume

### Docker Hub

Docker Hub image available from [docker hub](https://hub.docker.com/r/eosio/eos/).
Docker Hub image available from [docker hub](https://hub.docker.com/r/boscore/bos/).
Create a new `docker-compose.yaml` file with the content below

```bash
version: "3"

services:
nodeosd:
image: eosio/eos:latest
image: boscore/bos:latest
command: /opt/eosio/bin/nodeosd.sh --data-dir /opt/eosio/bin/data-dir -e --http-alias=nodeosd:8888 --http-alias=127.0.0.1:8888 --http-alias=localhost:8888
hostname: nodeosd
ports:
Expand All @@ -153,7 +153,7 @@ services:
- nodeos-data-volume:/opt/eosio/bin/data-dir

keosd:
image: eosio/eos:latest
image: boscore/bos:latest
command: /opt/eosio/bin/keosd --wallet-dir /opt/eosio/bin/data-dir --http-server-address=127.0.0.1:8900 --http-alias=localhost:8900 --http-alias=keosd:8900
hostname: keosd
links:
Expand All @@ -169,13 +169,13 @@ volumes:

*NOTE:* the default version is the latest, you can change it to what you want

run `docker pull eosio/eos:latest`
run `docker pull boscore/bos:latest`

run `docker-compose up`

### EOSIO Testnet
### BOSCore Testnet

We can easily set up a EOSIO local testnet using docker images. Just run the following commands:
We can easily set up a BOSCore 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.

Expand Down
19 changes: 17 additions & 2 deletions Docker/builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:18.04

LABEL author="xiaobo <peterwillcn@gmail.com>" maintainer="Xiaobo <peterwillcn@gmail.com> Huang-Ming Huang <huangh@objectcomputing.com>" version="0.1.1" \
description="This is a base image for building eosio/eos"
LABEL author="xiaobo <peterwillcn@gmail.com>" maintainer="Xiaobo <peterwillcn@gmail.com> Huang-Ming Huang <huangh@objectcomputing.com> Winlin <pcguangtao@gmail.com>" version="0.1.2" \
description="This is a base image for building boscore/bos"

RUN echo 'APT::Install-Recommends 0;' >> /etc/apt/apt.conf.d/01norecommends \
&& echo 'APT::Install-Suggests 0;' >> /etc/apt/apt.conf.d/01norecommends \
Expand Down Expand Up @@ -56,3 +56,18 @@ RUN git clone --depth 1 -b releases/v3.3 https://github.com/mongodb/mongo-cxx-dr
&& make -j$(nproc) \
&& make install \
&& cd ../../ && rm -rf mongo-cxx-driver

RUN git clone --depth 1 -b v0.11.6 https://github.com/boscore/librdkafka.git \
&& cd librdkafka/ \
&& cmake -H. -B_cmake_build \
&& cmake -DRDKAFKA_BUILD_STATIC=1 --build _cmake_build \
&& cd _cmake_build \
&& make install \
&& cd ../../ && rm -rf librdkafka

RUN git clone --depth 1 -b 0.2 https://github.com/boscore/cppkafka.git \
&& cd cppkafka/ \
&& mkdir build && cd build \
&& cmake -DCPPKAFKA_RDKAFKA_STATIC_LIB=1 -DCPPKAFKA_BUILD_SHARED=0 .. \
&& make install \
&& cd ../../ && rm -rf cppkafka
5 changes: 5 additions & 0 deletions Docker/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ access-control-allow-credentials = false
# The actual host:port used to listen for incoming p2p connections. (eosio::net_plugin)
p2p-listen-endpoint = 0.0.0.0:9876

#The p2p-discoverable is used to enable or disable p2p network self-discovery (eosio::net_plugin)
#p2p-discoverable=

# An externally accessible host:port for identifying this node. Defaults to p2p-listen-endpoint. (eosio::net_plugin)
# p2p-server-address =

Expand Down Expand Up @@ -158,3 +161,5 @@ txn-reference-block-lag = 0
# plugin =
plugin = eosio::chain_api_plugin
plugin = eosio::history_api_plugin
# enable this option to produce blocks
#plugin = eosio::producer_plugin
4 changes: 2 additions & 2 deletions Docker/dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM eosio/builder
FROM boscore/builder
ARG branch=master
ARG symbol=SYS

RUN git clone -b $branch https://github.com/EOSIO/eos.git --recursive \
RUN git clone -b $branch https://github.com/boscore/bos.git --recursive \
&& cd eos && echo "$branch:$(git rev-parse HEAD)" > /etc/eosio-version \
&& cmake -H. -B"/opt/eosio" -GNinja -DCMAKE_BUILD_TYPE=Release -DWASM_ROOT=/opt/wasm -DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX=/opt/eosio -DBUILD_MONGO_DB_PLUGIN=true -DCORE_SYMBOL_NAME=$symbol \
Expand Down
Loading

0 comments on commit 37f7e6a

Please sign in to comment.