Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bos202 #6

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ steps:
cd /data/job/build/packages && bash generate_package.sh deb
label: ":ubuntu: 18.04 Package builder"
agents:
- "role=linux-builder"
queue: "automation-large-builder-fleet"
artifact_paths:
- "build/packages/*.deb"
plugins:
Expand All @@ -469,7 +469,7 @@ steps:
cd /data/job/build/packages && bash generate_package.sh rpm
label: ":fedora: Package builder"
agents:
- "role=linux-builder"
queue: "automation-large-builder-fleet"
artifact_paths:
- "build/packages/x86_64/*.rpm"
plugins:
Expand All @@ -496,7 +496,7 @@ steps:
cd /data/job/build/packages && bash generate_package.sh rpm
label: ":centos: Package builder"
agents:
- "role=linux-builder"
queue: "automation-large-builder-fleet"
artifact_paths:
- "build/packages/x86_64/*.rpm"
plugins:
Expand Down
8 changes: 4 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<!-- PLEASE FILL OUT THE FOLLOWING MARKDOWN TEMPLATE -->
<!-- Give your PR a title that is sufficient to understand what is being changed. -->

**Change Description**
## Change Description

<!-- Describe the change you made, the motivation for it, and the impact it will have. Reference issues or pull requests where possible (use '#XX' or 'GH-XX' where XX is the issue or pull request number). -->

**Consensus Changes**
## Consensus Changes

<!-- If this PR introduces a change to the validation of blocks in the chain or consensus in general, please describe the impact. -->


**API Changes**
## API Changes

<!-- If this PR introduces API changes, please describe the changes here. What will developers need to know before upgrading to this version? -->


**Documentation Additions**
## Documentation Additions

<!-- List all the information that needs to be added to the documentation after merge. -->
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
14 changes: 10 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,20 @@ 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_MAJOR 2)
set(VERSION_MINOR 0)
set(VERSION_PATCH 1)

if(VERSION_SUFFIX)
set(VERSION_FULL "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-${VERSION_SUFFIX}")
else()
set(VERSION_FULL "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
endif()

set( CLI_CLIENT_EXECUTABLE_NAME cleos )
set( NODE_EXECUTABLE_NAME nodeos )
Expand Down
6 changes: 3 additions & 3 deletions CMakeModules/EosioTester.cmake.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cmake_minimum_required( VERSION 3.5 )
message(STATUS "Setting up Eosio Tester @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ at @EOS_ROOT_DIR@")
message(STATUS "Setting up Eosio Tester @VERSION_FULL@ at @EOS_ROOT_DIR@")

set(CMAKE_CXX_COMPILER @CMAKE_CXX_COMPILER@)
set(CMAKE_C_COMPILER @CMAKE_C_COMPILER@)

set(EOSIO_VERSION "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@")
set(EOSIO_VERSION "@VERSION_FULL@")

enable_testing()

Expand Down Expand Up @@ -97,8 +97,8 @@ macro(add_eosio_test test_name)
${liblogging}
${libchainbase}
${libbuiltins}
${GMP_LIBRARIES}
${libsecp256k1}
${GMP_LIBRARIES}

LLVMX86Disassembler
LLVMX86AsmParser
Expand Down
6 changes: 3 additions & 3 deletions CMakeModules/EosioTesterBuild.cmake.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cmake_minimum_required( VERSION 3.5 )
message(STATUS "Setting up Eosio Tester @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ at @EOS_ROOT_DIR@")
message(STATUS "Setting up Eosio Tester @VERSION_FULL@ at @EOS_ROOT_DIR@")

set(CMAKE_CXX_COMPILER @CMAKE_CXX_COMPILER@)
set(CMAKE_C_COMPILER @CMAKE_C_COMPILER@)

set(EOSIO_VERSION "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@")
set(EOSIO_VERSION "@VERSION_FULL@")

enable_testing()

Expand Down Expand Up @@ -98,8 +98,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})
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}.${VERSION_PATCH}" CACHE INTERNAL "Version string used in PROJECT_NUMBER.")
set(DOXY_EOS_VERSION "${VERSION_FULL}" 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
17 changes: 11 additions & 6 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
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 \
&& cmake --build /tmp/build --target install && rm /tmp/build/bin/eosiocpp
-DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" \
&& cmake --build /tmp/build --target install



FROM ubuntu:18.04
Expand All @@ -15,9 +20,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
39 changes: 20 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,31 @@ 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 -s 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 v2.0.1 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:v2.0.1 --build-arg branch=v2.0.1 .

```

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 +50,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 +93,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 +134,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 +154,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 +170,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