diff --git a/.buildkite/pipeline_linux_build.yml b/.buildkite/pipeline_linux_build.yml new file mode 100644 index 00000000000..b2eaaf5c4d4 --- /dev/null +++ b/.buildkite/pipeline_linux_build.yml @@ -0,0 +1,383 @@ +steps: + - command: | + echo "+++ :hammer: Building" && \ + echo 1 | ./eosio_build.sh && \ + echo "--- :compression: Compressing build directory" && \ + tar -pczf build.tar.gz build/ + label: ":ubuntu: Build" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: "build.tar.gz" + plugins: + docker#v1.4.0: + image: "eosio/ci:ubuntu" + workdir: /data/job + timeout: 60 + + - command: | + echo "+++ :hammer: Building" && \ + echo 1 | ./eosio_build.sh && \ + echo "--- :compression: Compressing build directory" && \ + tar -pczf build.tar.gz build/ + label: ":ubuntu: 18.04 Build" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: "build.tar.gz" + plugins: + docker#v1.4.0: + image: "eosio/ci:ubuntu18" + workdir: /data/job + timeout: 60 + + - command: | + echo "+++ :hammer: Building" && \ + echo 1 | ./eosio_build.sh && \ + echo "--- :compression: Compressing build directory" && \ + tar -pczf build.tar.gz build/ + label: ":fedora: Build" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: "build.tar.gz" + plugins: + docker#v1.4.0: + image: "eosio/ci:fedora" + workdir: /data/job + timeout: 60 + + - command: | + echo "+++ :hammer: Building" && \ + echo 1 | ./eosio_build.sh && \ + echo "--- :compression: Compressing build directory" && \ + tar -pczf build.tar.gz build/ + label: ":centos: Build" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: "build.tar.gz" + plugins: + docker#v1.4.0: + image: "eosio/ci:centos" + workdir: /data/job + timeout: 60 + + - command: | + echo "+++ :hammer: Building" && \ + echo 1 | ./eosio_build.sh && \ + echo "--- :compression: Compressing build directory" && \ + tar -pczf build.tar.gz build/ + label: ":aws: Build" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: "build.tar.gz" + plugins: + docker#v1.4.0: + image: "eosio/ci:amazonlinux" + workdir: /data/job + timeout: 60 + + - wait + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Build" && \ + tar -zxf build.tar.gz && \ + echo "--- :m: Starting MongoDB" && \ + $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ + echo "+++ :microscope: Running tests" && \ + cd /data/job/build && ctest -j8 -LE _tests --output-on-failure + label: ":ubuntu: Tests" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "mongod.log" + - "build/genesis.json" + - "build/config.ini" + plugins: + docker#v1.4.0: + image: "eosio/ci:ubuntu" + workdir: /data/job + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Build" && \ + tar -zxf build.tar.gz && \ + echo "--- :m: Starting MongoDB" && \ + $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ + echo "+++ :microscope: Running tests" && \ + cd /data/job/build && ctest -L nonparallelizable_tests --output-on-failure + label: ":ubuntu: NP Tests" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "mongod.log" + - "build/genesis.json" + - "build/config.ini" + plugins: + docker#v1.4.0: + image: "eosio/ci:ubuntu" + workdir: /data/job + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: 18.04 Build" && \ + tar -zxf build.tar.gz && \ + echo "--- :m: Starting MongoDB" && \ + $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ + echo "+++ :microscope: Running tests" && \ + cd /data/job/build && ctest -j8 -LE _tests --output-on-failure + label: ":ubuntu: 18.04 Tests" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "mongod.log" + - "build/genesis.json" + - "build/config.ini" + plugins: + docker#v1.4.0: + image: "eosio/ci:ubuntu18" + workdir: /data/job + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: 18.04 Build" && \ + tar -zxf build.tar.gz && \ + echo "--- :m: Starting MongoDB" && \ + $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ + echo "+++ :microscope: Running tests" && \ + cd /data/job/build && ctest -L nonparallelizable_tests --output-on-failure + label: ":ubuntu: 18.04 NP Tests" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "mongod.log" + - "build/genesis.json" + - "build/config.ini" + plugins: + docker#v1.4.0: + image: "eosio/ci:ubuntu18" + workdir: /data/job + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":fedora: Build" && \ + tar -zxf build.tar.gz && \ + echo "--- :m: Starting MongoDB" && \ + $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ + echo "+++ :microscope: Running tests" && \ + cd /data/job/build && ctest -j8 -LE _tests --output-on-failure + label: ":fedora: Tests" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "mongod.log" + - "build/genesis.json" + - "build/config.ini" + plugins: + docker#v1.4.0: + image: "eosio/ci:fedora" + workdir: /data/job + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":fedora: Build" && \ + tar -zxf build.tar.gz && \ + echo "--- :m: Starting MongoDB" && \ + $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ + echo "+++ :microscope: Running tests" && \ + cd /data/job/build && ctest -L nonparallelizable_tests --output-on-failure + label: ":fedora: NP Tests" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "mongod.log" + - "build/genesis.json" + - "build/config.ini" + plugins: + docker#v1.4.0: + image: "eosio/ci:fedora" + workdir: /data/job + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":centos: Build" && \ + tar -zxf build.tar.gz && \ + echo "--- :m: Starting MongoDB" && \ + $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ + echo "+++ :microscope: Running tests" && \ + cd /data/job/build && ctest -j8 -LE _tests --output-on-failure + label: ":centos: Tests" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "mongod.log" + - "build/genesis.json" + - "build/config.ini" + plugins: + docker#v1.4.0: + image: "eosio/ci:centos" + workdir: /data/job + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":centos: Build" && \ + tar -zxf build.tar.gz && \ + echo "--- :m: Starting MongoDB" && \ + $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ + echo "+++ :microscope: Running tests" && \ + cd /data/job/build && ctest -L nonparallelizable_tests --output-on-failure + label: ":centos: NP Tests" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "mongod.log" + - "build/genesis.json" + - "build/config.ini" + plugins: + docker#v1.4.0: + image: "eosio/ci:centos" + workdir: /data/job + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":aws: Build" && \ + tar -zxf build.tar.gz && \ + echo "--- :m: Starting MongoDB" && \ + $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ + echo "+++ :microscope: Running tests" && \ + cd /data/job/build && ctest -j8 -LE _tests --output-on-failure + label: ":aws: Tests" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "mongod.log" + - "build/genesis.json" + - "build/config.ini" + plugins: + docker#v1.4.0: + image: "eosio/ci:amazonlinux" + workdir: /data/job + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":aws: Build" && \ + tar -zxf build.tar.gz && \ + echo "--- :m: Starting MongoDB" && \ + $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ + echo "+++ :microscope: Running tests" && \ + cd /data/job/build && ctest -L nonparallelizable_tests --output-on-failure + label: ":aws: NP Tests" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "mongod.log" + - "build/genesis.json" + - "build/config.ini" + plugins: + docker#v1.4.0: + image: "eosio/ci:amazonlinux" + workdir: /data/job + timeout: 60 + + - wait + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: Build" && \ + tar -zxf build.tar.gz && \ + echo "+++ :microscope: Starting package build" && \ + cd /data/job/build/packages && bash generate_package.sh deb + label: ":ubuntu: Package builder" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "build/packages/*.deb" + plugins: + docker#v1.4.0: + image: "eosio/ci:ubuntu" + workdir: /data/job + env: + OS: "ubuntu-16.04" + PKGTYPE: "deb" + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":ubuntu: 18.04 Build" && \ + tar -zxf build.tar.gz && \ + echo "+++ :microscope: Starting package build" && \ + cd /data/job/build/packages && bash generate_package.sh deb + label: ":ubuntu: 18.04 Package builder" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "build/packages/*.deb" + plugins: + docker#v1.4.0: + image: "eosio/ci:ubuntu18" + workdir: /data/job + env: + OS: "ubuntu-18.04" + PKGTYPE: "deb" + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":fedora: Build" && \ + tar -zxf build.tar.gz && \ + echo "+++ :microscope: Starting package build" && \ + yum install -y rpm-build && \ + mkdir -p /root/rpmbuild/BUILD && \ + mkdir -p /root/rpmbuild/BUILDROOT && \ + mkdir -p /root/rpmbuild/RPMS && \ + mkdir -p /root/rpmbuild/SOURCES && \ + mkdir -p /root/rpmbuild/SPECS && \ + mkdir -p /root/rpmbuild/SRPMS && \ + cd /data/job/build/packages && bash generate_package.sh rpm + label: ":fedora: Package builder" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "build/packages/x86_64/*.rpm" + plugins: + docker#v1.4.0: + image: "eosio/ci:fedora" + workdir: /data/job + env: + OS: "fc27" + PKGTYPE: "rpm" + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":centos: Build" && \ + tar -zxf build.tar.gz && \ + echo "+++ :microscope: Starting package build" && \ + yum install -y rpm-build && \ + mkdir -p /root/rpmbuild/BUILD && \ + mkdir -p /root/rpmbuild/BUILDROOT && \ + mkdir -p /root/rpmbuild/RPMS && \ + mkdir -p /root/rpmbuild/SOURCES && \ + mkdir -p /root/rpmbuild/SPECS && \ + mkdir -p /root/rpmbuild/SRPMS && \ + cd /data/job/build/packages && bash generate_package.sh rpm + label: ":centos: Package builder" + agents: + queue: "automation-large-builder-fleet" + artifact_paths: + - "build/packages/x86_64/*.rpm" + plugins: + docker#v1.4.0: + image: "eosio/ci:centos" + workdir: /data/job + env: + OS: "el7" + PKGTYPE: "rpm" + timeout: 60 \ No newline at end of file diff --git a/.buildkite/pipeline_mac_build.yml b/.buildkite/pipeline_mac_build.yml new file mode 100644 index 00000000000..73d0ab98ffd --- /dev/null +++ b/.buildkite/pipeline_mac_build.yml @@ -0,0 +1,131 @@ +steps: + - command: | + echo "--- Creating symbolic link to job directory :file_folder:" && \ + sleep 5 && ln -s "$(pwd)" /data/job && cd /data/job && \ + echo "+++ Building :hammer:" && \ + echo 1 | ./eosio_build.sh && \ + echo "--- Compressing build directory :compression:" && \ + tar -pczf build.tar.gz build/ + label: ":darwin: High Sierra Build" + agents: + - "role=macos-builder" + artifact_paths: "build.tar.gz" + timeout: 60 + + - command: | + echo "--- Creating symbolic link to job directory :file_folder:" && \ + sleep 5 && ln -s "$(pwd)" /data/job && cd /data/job && \ + echo "+++ Building :hammer:" && \ + echo 1 | ./eosio_build.sh && \ + echo "--- Compressing build directory :compression:" && \ + tar -pczf build.tar.gz build/ + label: ":darwin: Mojave Build" + agents: + - "role=builder" + - "os=mojave" + artifact_paths: "build.tar.gz" + timeout: 60 + + - wait + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":darwin: High Sierra Build" && \ + tar -zxf build.tar.gz && \ + echo "--- :m: Starting MongoDB" && \ + $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ + echo "+++ :microscope: Running tests" && \ + ln -s "$(pwd)" /data/job && cd /data/job/build && ctest -j8 -LE _tests --output-on-failure + label: ":darwin: High Sierra Tests" + agents: + - "role=macos-builder" + artifact_paths: + - "mongod.log" + - "build/genesis.json" + - "build/config.ini" + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":darwin: High Sierra Build" && \ + tar -zxf build.tar.gz && \ + echo "--- :m: Starting MongoDB" && \ + $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ + echo "+++ :microscope: Running tests" && \ + ln -s "$(pwd)" /data/job && cd /data/job/build && ctest -L nonparallelizable_tests --output-on-failure + label: ":darwin: High Sierra NP Tests" + agents: + - "role=macos-builder" + artifact_paths: + - "mongod.log" + - "build/genesis.json" + - "build/config.ini" + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" && \ + tar -zxf build.tar.gz && \ + echo "--- :m: Starting MongoDB" && \ + $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ + echo "+++ :microscope: Running tests" && \ + ln -s "$(pwd)" /data/job && cd /data/job/build && ctest -j8 -LE _tests --output-on-failure + label: ":darwin: Mojave Tests" + agents: + - "role=builder" + - "os=mojave" + artifact_paths: + - "mongod.log" + - "build/genesis.json" + - "build/config.ini" + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" && \ + tar -zxf build.tar.gz && \ + echo "--- :m: Starting MongoDB" && \ + $(which mongod) --fork --logpath "$(pwd)"/mongod.log && \ + echo "+++ :microscope: Running tests" && \ + ln -s "$(pwd)" /data/job && cd /data/job/build && ctest -L nonparallelizable_tests --output-on-failure + label: ":darwin: Mojave NP Tests" + agents: + - "role=builder" + - "os=mojave" + artifact_paths: + - "mongod.log" + - "build/genesis.json" + - "build/config.ini" + timeout: 60 + + - wait + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":darwin: High Sierra Build" && \ + tar -zxf build.tar.gz && \ + echo "+++ :microscope: Starting package build" && \ + ln -s "$(pwd)" /data/job && cd /data/job/build/packages && bash generate_package.sh brew + label: ":darwin: High Sierra Package Builder" + agents: + - "role=macos-builder" + - "os=high-sierra" + artifact_paths: + - "build/packages/*.tar.gz" + - "build/packages/*.rb" + timeout: 60 + + - command: | + echo "--- :arrow_down: Downloading build directory" && \ + buildkite-agent artifact download "build.tar.gz" . --step ":darwin: Mojave Build" && \ + tar -zxf build.tar.gz && \ + echo "+++ :microscope: Starting package build" && \ + ln -s "$(pwd)" /data/job && cd /data/job/build/packages && bash generate_package.sh brew + label: ":darwin: Mojave Package Builder" + agents: + - "role=builder" + - "os=mojave" + artifact_paths: + - "build/packages/*.tar.gz" + - "build/packages/*.rb" + timeout: 60 diff --git a/CMakeLists.txt b/CMakeLists.txt index e49f6dd0907..2276554450b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,9 +33,9 @@ set( CMAKE_CXX_STANDARD 14 ) set( CMAKE_CXX_EXTENSIONS ON ) set( CXX_STANDARD_REQUIRED ON) -set(VERSION_MAJOR 2) +set(VERSION_MAJOR 3) set(VERSION_MINOR 0) -set(VERSION_PATCH 3) +set(VERSION_PATCH 2) if(VERSION_SUFFIX) set(VERSION_FULL "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-${VERSION_SUFFIX}") diff --git a/Docker/Dockerfile b/Docker/Dockerfile index 81b09c4171a..3ccc4bd0e62 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -4,26 +4,22 @@ ARG symbol=SYS 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}" \ + -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DCMAKE_CXX_STANDARD_LIBRARIES="-lpthread" \ && cmake --build /tmp/build --target install - - FROM ubuntu:18.04 RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install openssl ca-certificates && rm -rf /var/lib/apt/lists/* 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 /bos/Docker/config.ini / COPY --from=builder /etc/eosio-version /etc 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 -ENV PATH /opt/eosio/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV PATH /opt/eosio/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ No newline at end of file diff --git a/Docker/README.md b/Docker/README.md index b5228e17bbc..c06694deffb 100644 --- a/Docker/README.md +++ b/Docker/README.md @@ -20,10 +20,10 @@ 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 v2.0.3 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 v3.0.2 tag, you could do the following: ```bash -docker build -t boscore/bos:v2.0.3 --build-arg branch=v2.0.3 . +docker build -t boscore/bos:v3.0.2 --build-arg branch=v3.0.2 . ``` diff --git a/Docker/nodeosd.sh b/Docker/nodeosd.sh index 870548d6b6b..86f676dd159 100755 --- a/Docker/nodeosd.sh +++ b/Docker/nodeosd.sh @@ -11,12 +11,6 @@ if [ -f '/opt/eosio/bin/data-dir/config.ini' ]; then cp /config.ini /opt/eosio/bin/data-dir fi -if [ -d '/opt/eosio/bin/data-dir/contracts' ]; then - echo - else - cp -r /contracts /opt/eosio/bin/data-dir -fi - while :; do case $1 in --config-dir=?*) diff --git a/README.md b/README.md index 0b90a01c333..334f7cad8e0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # BOSCore - Born for DApps. Born for Usability. -## BOSCore Version: v2.0.3 -### Basic EOSIO Version: v1.6.4 (support REX) +## BOSCore Version: v3.0.2 +### Basic EOSIO Version: v1.6.6 (support REX) # Background The emergence of EOS has brought new imagination to the blockchain. In just a few months since the main network was launched, the version has undergone dozens of upgrades, not only the stability has been greatly improved, but also the new functions have been gradually realized. The node team is also actively involved in building the EOSIO ecosystem. What is even more exciting is that EOS has attracted more and more development teams. There are already hundreds of DApp running on the EOS main network. The transaction volume and circulation market value far exceed Ethereum, and the space for development is growing broader. @@ -29,15 +29,11 @@ As BOS continues to develop, developer rewards will be appropriately adjusted to 1. Build from code : `bash ./eosio_build.sh -s BOS` 2. Docker Style,check [Docker](./Docker/README.md) -## BOSCore Workflow -BOSCore encourage community developer actively participate in contributing the code, members should follow the workflow below. -![BOSCore Workflow](./images/bos-workflow.png) - -Attention: -1. Only allow Feature Branch or bug fix to submit PR to Develop Branch. -2. Rebase is required before submitting PR to Develop Branch. -3. Treat update of eosio/eos code as new feature. -4. Emergent issues must repaired by adopting hotfixes mode. +## Tips: +- HTTP&P2P endpoints can be get from the [validator](https://validate.eosnation.io/bos/reports/endpoints.html) by EOS Nation +- BOS Mainnet [genesis.json](https://github.com/boscore/bosres/blob/master/genesis.json) +- BOS Mainnet [Genesis](https://github.com/boscore/bosres/blob/master/BOS_Genesis.md) +- EOS Mainnet [snapshot](https://github.com/boscore/bos-airdrop-snapshots/blob/master/README.md) ## BOSCore Workflow BOSCore encourage community developer actively participate in contributing the code, members should follow the workflow below. diff --git a/README_CN.md b/README_CN.md index 23b9199068f..f7b893a12f7 100644 --- a/README_CN.md +++ b/README_CN.md @@ -1,7 +1,7 @@ # BOSCore - 更可用的链,为DApp而生。 -## BOSCore Version: v2.0.3 -### Basic EOSIO Version: v1.6.4 (support REX) +## BOSCore Version: v3.0.2 +### Basic EOSIO Version: v1.6.6 (support REX) # 背景 EOS的出现给区块链带来了新的想象力,主网启动短短几个月以来,版本经历了几十次升级,不仅稳定性得到了很大提高,并且新功能也逐步实现,各个节点团队也积极参与建设EOSIO生态。让人更加兴奋的是,EOS已经吸引了越来越多的开发团队,当前已经有数百个DApp在EOS主网上面运行,其交易量和流通市值远超以太坊,可发展的空间愈来愈广阔。 @@ -29,15 +29,11 @@ BOS链的代码完全由社区贡献并维护,每个生态参与者都可以 1. 源码直接编译: `bash ./eosio_build.sh -s BOS` 2. Docker方式部署,参看 [Docker](./Docker/README.md) -## BOSCore 开发流程 -BOSCore 鼓励社区开发者参与代码贡献,社区成员应当遵循以下工作流: -![BOSCore Workflow](./images/bos-workflow.png) - -注意: -1. 只有待发布的 Feature Branch 或者Bug修复才应该向 Develop Branch 提交 -2. 向 Develop Branch 提交 PR 之前需要现在本地执行 rebase 操作 -3. EOSIO 主网版本作为一个 Feature Branch 来对待 -4. 紧急问题修复采用 hotfixes 模式 +## Tips: +- HTTP&P2P 列表可以从 EOS Nation 提供的[验证页面](https://validate.eosnation.io/bos/reports/endpoints.html)获取 +- BOS Mainnet [genesis.json](https://github.com/boscore/bosres/blob/master/genesis.json) +- BOS Mainnet [创世纪](https://github.com/boscore/bosres/blob/master/BOS_Genesis.md) +- EOS Mainnet [账户空投信息](https://github.com/boscore/bos-airdrop-snapshots/blob/master/README.md) ## BOSCore 开发流程 BOSCore 鼓励社区开发者参与代码贡献,社区成员应当遵循以下工作流: diff --git a/eosio_build.sh b/eosio_build.sh index b600e0905ea..eba45661cdd 100755 --- a/eosio_build.sh +++ b/eosio_build.sh @@ -272,6 +272,7 @@ -DCMAKE_C_COMPILER="${C_COMPILER}" -DWASM_ROOT="${WASM_ROOT}" -DCORE_SYMBOL_NAME="${CORE_SYMBOL_NAME}" \ -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DBUILD_MONGO_DB_PLUGIN=true \ -DENABLE_COVERAGE_TESTING="${ENABLE_COVERAGE_TESTING}" -DBUILD_DOXYGEN="${DOXYGEN}" \ + -DCMAKE_CXX_STANDARD_LIBRARIES="-lpthread" \ -DCMAKE_INSTALL_PREFIX="/usr/local/eosio" ${LOCAL_CMAKE_FLAGS} "${SOURCE_DIR}" then printf "\\n\\t>>>>>>>>>>>>>>>>>>>> CMAKE building BOSCore has exited with the above error.\\n\\n" diff --git a/programs/cleos/main.cpp b/programs/cleos/main.cpp index f0ac7a53937..9fe50efa771 100644 --- a/programs/cleos/main.cpp +++ b/programs/cleos/main.cpp @@ -3545,7 +3545,9 @@ int main( int argc, char** argv ) { enum class approval_status { unapproved, approved, - invalidated + invalidated, + opposed, + abstained }; std::map> all_approvals; @@ -3647,6 +3649,46 @@ int main( int argc, char** argv ) { } } } + + //get opposed and obstained + fc::variants rows5; + try { + const auto& result5 = call(get_table_func, fc::mutable_variant_object("json", true) + ("code", "eosio.msig") + ("scope", proposer) + ("table", "opposes") + ("table_key", "") + ("lower_bound", name(proposal_name).value) + ("upper_bound", name(proposal_name).value + 1) + // Less than ideal upper_bound usage preserved so cleos can still work with old buggy nodeos versions + // Change to name(proposal_name).value when cleos no longer needs to support nodeos versions older than 1.5.0 + ("limit", 1) + ); + rows5 = result5.get_object()["rows"].get_array(); + } catch( ... ) { + } + if( !rows5.empty() && rows5[0].get_object()["proposal_name"] == proposal_name ) { + const auto& oppo_object = rows5[0].get_object(); + + for( const auto& opa : oppo_object["opposed_approvals"].get_array() ) { + permission_level pl = opa.as(); + for( auto& a : all_approvals ) { + if( a.first == pl ) { + a.second.second = approval_status::opposed; + } + } + } + + for( const auto& aba : oppo_object["abstained_approvals"].get_array() ) { + auto pl = aba.as(); + for( auto& a : all_approvals ) { + if( a.first == pl ) { + a.second.second = approval_status::abstained; + } + } + } + } + } auto trx_hex = proposal_object["packed_transaction"].as_string(); @@ -3699,6 +3741,16 @@ int main( int argc, char** argv ) { approval_obj["invalidation_time"] = provided_approvers[approval.first.actor].first; } break; + case approval_status::opposed: + { + approval_obj["status"] = "opposed"; + } + break; + case approval_status::abstained: + { + approval_obj["status"] = "abstained"; + } + break; } approvals.push_back( std::move(approval_obj) ); @@ -3748,6 +3800,40 @@ int main( int argc, char** argv ) { unapprove->add_option("permissions", perm, localized("The JSON string of filename defining approving permissions"))->required(); unapprove->set_callback([&] { approve_or_unapprove("unapprove"); }); + // multisig oppose + auto oppose = msig->add_subcommand("oppose", localized("Oppose proposed transaction")); + add_standard_transaction_options(oppose, "proposer@active"); + oppose->add_option("proposer", proposer, localized("proposer name (string)"))->required(); + oppose->add_option("proposal_name", proposal_name, localized("proposal name (string)"))->required(); + oppose->add_option("permissions", perm, localized("The JSON string of filename defining opposing permissions"))->required(); + oppose->add_option("proposal_hash", proposal_hash, localized("Hash of proposed transaction (i.e. transaction ID) to optionally enforce as a condition of the approval")); + oppose->set_callback([&] { approve_or_unapprove("oppose"); }); + + // multisig unoppose + auto unoppose = msig->add_subcommand("unoppose", localized("Unoppose proposed transaction")); + add_standard_transaction_options(unoppose, "proposer@active"); + unoppose->add_option("proposer", proposer, localized("proposer name (string)"))->required(); + unoppose->add_option("proposal_name", proposal_name, localized("proposal name (string)"))->required(); + unoppose->add_option("permissions", perm, localized("The JSON string of filename defining unopposing permissions"))->required(); + unoppose->set_callback([&] { approve_or_unapprove("unoppose"); }); + + // multisig abstain + auto abstain = msig->add_subcommand("abstain", localized("Abstain proposed transaction")); + add_standard_transaction_options(abstain, "proposer@active"); + abstain->add_option("proposer", proposer, localized("proposer name (string)"))->required(); + abstain->add_option("proposal_name", proposal_name, localized("proposal name (string)"))->required(); + abstain->add_option("permissions", perm, localized("The JSON string of filename defining abstaining permissions"))->required(); + abstain->add_option("proposal_hash", proposal_hash, localized("Hash of proposed transaction (i.e. transaction ID) to optionally enforce as a condition of the approval")); + abstain->set_callback([&] { approve_or_unapprove("abstain"); }); + + // multisig unabstain + auto unabstain = msig->add_subcommand("unabstain", localized("Unabstain proposed transaction")); + add_standard_transaction_options(unabstain, "proposer@active"); + unabstain->add_option("proposer", proposer, localized("proposer name (string)"))->required(); + unabstain->add_option("proposal_name", proposal_name, localized("proposal name (string)"))->required(); + unabstain->add_option("permissions", perm, localized("The JSON string of filename defining unabstaining permissions"))->required(); + unabstain->set_callback([&] { approve_or_unapprove("unabstain"); }); + // multisig invalidate string invalidator; auto invalidate = msig->add_subcommand("invalidate", localized("Invalidate all multisig approvals of an account"));