diff --git a/.cicd/README.md b/.cicd/README.md
new file mode 100644
index 00000000000..93ad073ae53
--- /dev/null
+++ b/.cicd/README.md
@@ -0,0 +1,105 @@
+# eosio
+The [eosio](https://buildkite.com/EOSIO/eosio) and [eosio-build-unpinned](https://buildkite.com/EOSIO/eosio-build-unpinned) pipelines are the primary pipelines for the [eos](https://github.com/EOSIO/eos) repository, running with specific or default versions of our dependencies, respectively. Both run against every commit to a base branch or pull request, along with the [eosio-code-coverage](https://buildkite.com/EOSIO/eosio-code-coverage) pipeline.
+
+The [eosio](https://buildkite.com/EOSIO/eosio) pipeline further triggers the [eosio-sync-from-genesis](https://buildkite.com/EOSIO/eosio-sync-from-genesis) and [eosio-resume-from-state](https://buildkite.com/EOSIO/eosio-resume-from-state) pipelines on each build, and the the [eosio-lrt](https://buildkite.com/EOSIO/eosio-lrt) pipeline on merge commits. Each of these pipelines are described in more detail below and in their respective READMEs.
+
+
+See More
+
+## Index
+1. [Configuration](README.md#configuration)
+ 1. [Variables](README.md#variables)
+ 1. [Examples](README.md#examples)
+1. [Pipelines](README.md#pipelines)
+1. [See Also](README.md#see-also)
+
+## Configuration
+Most EOSIO pipelines are run any time you push a commit or tag to an open pull request in [eos](https://github.com/EOSIO/eos), any time you merge a pull request, and nightly. The [eosio-lrt](https://buildkite.com/EOSIO/eosio-lrt) pipeline only runs when you merge a pull request because it takes so long. Long-running tests are also run in the [eosio](https://buildkite.com/EOSIO/eosio) nightly builds, which have `RUN_ALL_TESTS='true'` set.
+
+### Variables
+Most pipelines in the organization have several environment variables that can be used to configure how the pipeline runs. These environment variables can be specified when manually triggering a build via the Buildkite UI.
+
+Configure which platforms are run:
+```bash
+SKIP_LINUX='true|false' # skip all steps on Linux distros
+SKIP_MAC='true|false' # skip all steps on Mac hardware
+```
+These will override more specific operating system declarations, and primarily exist to disable one of our two buildfleets should one be sick or the finite macOS agents are congested.
+
+Configure which operating systems are built, tested, and packaged:
+```bash
+RUN_ALL_TESTS='true' # run all tests in the current build (including LRTs, overridden by SKIP* variables)
+SKIP_AMAZON_LINUX_2='true|false' # skip all steps for Amazon Linux 2
+SKIP_CENTOS_7_7='true|false' # skip all steps for Centos 7.7
+SKIP_CENTOS_8='true|false' # skip all steps for Centos 8
+SKIP_MACOS_10_14='true|false' # skip all steps for MacOS 10.14
+SKIP_MACOS_10_15='true|false' # skip all steps for MacOS 10.15
+SKIP_MACOS_11='true|false' # skip all steps for MacOS 11
+SKIP_UBUNTU_16_04='true|false' # skip all steps for Ubuntu 16.04
+SKIP_UBUNTU_18_04='true|false' # skip all steps for Ubuntu 18.04
+SKIP_UBUNTU_20_04='true|false' # skip all steps for Ubuntu 20.04
+```
+
+Configure which steps are executed for each operating system:
+```bash
+SKIP_BUILD='true|false' # skip all build steps
+SKIP_UNIT_TESTS='true|false' # skip all unit tests
+SKIP_WASM_SPEC_TESTS='true|false' # skip all wasm spec tests
+SKIP_SERIAL_TESTS='true|false' # skip all integration tests
+SKIP_LONG_RUNNING_TESTS='true|false' # skip all long running tests
+SKIP_MULTIVERSION_TEST='true|false' # skip all multiversion tests
+SKIP_SYNC_TESTS='true|false' # skip all sync tests
+SKIP_PACKAGE_BUILDER='true|false' # skip all packaging steps
+```
+
+Configure how the steps are executed:
+```bash
+PINNED='true|false' # use specific versions of dependencies instead of whatever version is provided by default on a given platform
+TIMEOUT='##' # set timeout in minutes for all steps
+```
+
+### Examples
+Build and test on Linux only:
+```bash
+SKIP_MAC='true'
+```
+
+Build and test on MacOS only:
+```bash
+SKIP_LINUX='true'
+```
+
+Skip all tests:
+```bash
+SKIP_UNIT_TESTS='true'
+SKIP_WASM_SPEC_TESTS='true'
+SKIP_SERIAL_TESTS='true'
+SKIP_LONG_RUNNING_TESTS='true'
+SKIP_MULTIVERSION_TEST='true'
+SKIP_SYNC_TESTS='true'
+```
+
+## Pipelines
+There are several eosio pipelines that exist and are triggered by pull requests, pipelines, or schedules:
+
+Pipeline | Details
+---|---
+[eosio](https://buildkite.com/EOSIO/eosio) | [eos](https://github.com/EOSIO/eos) build, tests, and packaging with pinned dependencies; runs on every pull request and base branch commit, and nightly
+[eosio-base-images](https://buildkite.com/EOSIO/eosio-base-images) | pack EOSIO dependencies into docker and Anka base-images nightly
+[eosio-big-sur-beta](https://buildkite.com/EOSIO/eosio-big-sur-beta) | build and test [eos](https://github.com/EOSIO/eos) on macOS 11 "Big Sur" weekly
+[eosio-build-scripts](https://buildkite.com/EOSIO/eosio-build-scripts) | run [eos](https://github.com/EOSIO/eos) build scripts nightly on empty operating systems
+[eosio-build-unpinned](https://buildkite.com/EOSIO/eosio-build-unpinned) | [eos](https://github.com/EOSIO/eos) build and tests with platform-provided dependencies; runs on every pull request and base branch commit, and nightly
+[eosio-code-coverage](https://buildkite.com/EOSIO/eosio-code-coverage) | assess [eos](https://github.com/EOSIO/eos) unit test coverage; runs on every pull request and base branch commit
+[eosio-debug-build](https://buildkite.com/EOSIO/eosio-debug-build) | perform a debug build for [eos](https://github.com/EOSIO/eos) on every pull request and base branch commit
+[eosio-lrt](https://buildkite.com/EOSIO/eosio-lrt) | runs tests that need more time on merge commits
+[eosio-resume-from-state](https://buildkite.com/EOSIO/eosio-resume-from-state) | loads the current version of `nodeos` from state files generated by specific previous versions of `nodeos` in each [eosio](https://buildkite.com/EOSIO/eosio) build ([Documentation](https://github.com/EOSIO/auto-eks-sync-nodes/blob/master/pipelines/eosio-resume-from-state/README.md))
+[eosio-sync-from-genesis](https://buildkite.com/EOSIO/eosio-sync-from-genesis) | sync the current version of `nodeos` past genesis from peers on common public chains as a smoke test, for each [eosio](https://buildkite.com/EOSIO/eosio) build
+
+## See Also
+- Buildkite
+ - [DevDocs](https://github.com/EOSIO/devdocs/wiki/Buildkite)
+ - [eosio-resume-from-state Documentation](https://github.com/EOSIO/auto-eks-sync-nodes/blob/master/pipelines/eosio-resume-from-state/README.md)
+ - [Run Your First Build](https://buildkite.com/docs/tutorials/getting-started#run-your-first-build)
+- [#help-automation](https://blockone.slack.com/archives/CMTAZ9L4D) Slack Channel
+
+
diff --git a/.cicd/base-images.yml b/.cicd/base-images.yml
index cf142664186..717193f4fe1 100644
--- a/.cicd/base-images.yml
+++ b/.cicd/base-images.yml
@@ -45,6 +45,29 @@ steps:
cd: ~
agents: "queue=mac-anka-node-fleet"
timeout: 180
+
+ - label: ":darwin: macOS 10.15 - Base Image Pinned"
+ command:
+ - "git clone git@github.com:EOSIO/eos.git eos && cd eos && git checkout -f $BUILDKITE_BRANCH"
+ - "cd eos && ./.cicd/platforms/pinned/macos-10.15-pinned.sh"
+ plugins:
+ - EOSIO/anka#v0.6.1:
+ debug: true
+ vm-name: "10.15.5_6C_14G_80G"
+ no-volume: true
+ always-pull: true
+ wait-network: true
+ pre-execute-sleep: 5
+ pre-execute-ping-sleep: github.com
+ vm-registry-tag: "clean::cicd::git-ssh::nas::brew::buildkite-agent"
+ failover-registries:
+ - "registry_1"
+ - "registry_2"
+ inherit-environment-vars: true
+ - EOSIO/skip-checkout#v0.1.1:
+ cd: ~
+ agents: "queue=mac-anka-node-fleet"
+ timeout: 180
- label: ":ubuntu: Ubuntu 16.04 - Base Image Pinned"
command:
@@ -112,6 +135,29 @@ steps:
cd: ~
agents: "queue=mac-anka-node-fleet"
timeout: 180
+
+ - label: ":darwin: macOS 10.15 - Base Image Unpinned"
+ command:
+ - "git clone git@github.com:EOSIO/eos.git eos && cd eos && git checkout -f $BUILDKITE_BRANCH"
+ - "cd eos && ./.cicd/platforms/unpinned/macos-10.15-unpinned.sh"
+ plugins:
+ - EOSIO/anka#v0.6.1:
+ debug: true
+ vm-name: "10.15.5_6C_14G_80G"
+ no-volume: true
+ always-pull: true
+ wait-network: true
+ pre-execute-sleep: 5
+ pre-execute-ping-sleep: github.com
+ vm-registry-tag: "clean::cicd::git-ssh::nas::brew::buildkite-agent"
+ failover-registries:
+ - "registry_1"
+ - "registry_2"
+ inherit-environment-vars: true
+ - EOSIO/skip-checkout#v0.1.1:
+ cd: ~
+ agents: "queue=mac-anka-node-fleet"
+ timeout: 180
- label: ":ubuntu: Ubuntu 18.04 - Base Image Unpinned"
command:
diff --git a/.cicd/build-scripts.yml b/.cicd/build-scripts.yml
index b3018066b5d..2d09492fa19 100644
--- a/.cicd/build-scripts.yml
+++ b/.cicd/build-scripts.yml
@@ -21,7 +21,18 @@ steps:
command:
- "./scripts/eosio_build.sh -P -y"
timeout: 180
-
+
+ - label: ":centos: CentOS 8 - Build Pinned"
+ plugins:
+ - docker#v3.3.0:
+ image: "centos:8"
+ always-pull: true
+ agents:
+ queue: "automation-eks-eos-builder-fleet"
+ command:
+ - "./scripts/eosio_build.sh -P -y"
+ timeout: 180
+
- label: ":darwin: macOS 10.14 - Build Pinned"
env:
REPO: "git@github.com:EOSIO/eos.git"
@@ -29,7 +40,7 @@ steps:
TEMPLATE_TAG: "clean::cicd::git-ssh::nas::brew::buildkite-agent"
agents: "queue=mac-anka-large-node-fleet"
command:
- - "git clone git@github.com:EOSIO/eos.git eos && cd eos && git checkout -f $BUILDKITE_BRANCH && git submodule update --init --recursive"
+ - "git clone git@github.com:EOSIO/eos.git eos && cd eos && git checkout -f $BUILDKITE_BRANCH && git submodule update --init --recursive"
- "cd eos && ./scripts/eosio_build.sh -P -y"
plugins:
- EOSIO/anka#v0.6.1:
@@ -50,6 +61,36 @@ steps:
- EOSIO/skip-checkout#v0.1.1:
cd: ~
timeout: 180
+
+
+ - label: ":darwin: macOS 10.15 - Build Pinned"
+ env:
+ REPO: "git@github.com:EOSIO/eos.git"
+ TEMPLATE: "10.15.5_6C_14G_80G"
+ TEMPLATE_TAG: "clean::cicd::git-ssh::nas::brew::buildkite-agent"
+ agents: "queue=mac-anka-large-node-fleet"
+ command:
+ - "git clone git@github.com:EOSIO/eos.git eos && cd eos && git checkout -f $BUILDKITE_BRANCH && git submodule update --init --recursive"
+ - "cd eos && ./scripts/eosio_build.sh -P -y"
+ plugins:
+ - EOSIO/anka#v0.6.1:
+ debug: true
+ vm-name: "10.15.5_6C_14G_80G"
+ no-volume: true
+ modify-cpu: 12
+ modify-ram: 24
+ always-pull: true
+ wait-network: true
+ pre-execute-sleep: 5
+ pre-execute-ping-sleep: github.com
+ vm-registry-tag: "clean::cicd::git-ssh::nas::brew::buildkite-agent"
+ failover-registries:
+ - "registry_1"
+ - "registry_2"
+ inherit-environment-vars: true
+ - EOSIO/skip-checkout#v0.1.1:
+ cd: ~
+ timeout: 180
- label: ":ubuntu: Ubuntu 16.04 - Build Pinned"
plugins:
@@ -75,6 +116,21 @@ steps:
- "./scripts/eosio_build.sh -P -y"
timeout: 180
+ - label: ":ubuntu: Ubuntu 20.04 - Build Pinned"
+ env:
+ DEBIAN_FRONTEND: "noninteractive"
+ plugins:
+ - docker#v3.3.0:
+ image: "ubuntu:20.04"
+ always-pull: true
+ agents:
+ queue: "automation-eks-eos-builder-fleet"
+ command:
+ - "ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime"
+ - "apt update && apt upgrade -y && apt install -y git"
+ - "./scripts/eosio_build.sh -P -y"
+ timeout: 180
+
- label: ":aws: Amazon_Linux 2 - Build UnPinned"
plugins:
- docker#v3.3.0:
@@ -96,6 +152,17 @@ steps:
command:
- "./scripts/eosio_build.sh -y"
timeout: 180
+
+ - label: ":centos: CentOS 8 - Build UnPinned"
+ plugins:
+ - docker#v3.3.0:
+ image: "centos:8"
+ always-pull: true
+ agents:
+ queue: "automation-eks-eos-builder-fleet"
+ command:
+ - "./scripts/eosio_build.sh -y"
+ timeout: 180
- label: ":darwin: macOS 10.14 - Build UnPinned"
env:
@@ -125,6 +192,35 @@ steps:
- EOSIO/skip-checkout#v0.1.1:
cd: ~
timeout: 180
+
+ - label: ":darwin: macOS 10.15 - Build UnPinned"
+ env:
+ REPO: "git@github.com:EOSIO/eos.git"
+ TEMPLATE: "10.15.5_6C_14G_80G"
+ TEMPLATE_TAG: "clean::cicd::git-ssh::nas::brew::buildkite-agent"
+ agents: "queue=mac-anka-large-node-fleet"
+ command:
+ - "git clone git@github.com:EOSIO/eos.git eos && cd eos && git checkout -f $BUILDKITE_BRANCH && git submodule update --init --recursive"
+ - "cd eos && ./scripts/eosio_build.sh -y"
+ plugins:
+ - EOSIO/anka#v0.6.1:
+ debug: true
+ vm-name: "10.15.5_6C_14G_80G"
+ no-volume: true
+ modify-cpu: 12
+ modify-ram: 24
+ always-pull: true
+ wait-network: true
+ pre-execute-sleep: 5
+ pre-execute-ping-sleep: github.com
+ vm-registry-tag: "clean::cicd::git-ssh::nas::brew::buildkite-agent"
+ failover-registries:
+ - "registry_1"
+ - "registry_2"
+ inherit-environment-vars: true
+ - EOSIO/skip-checkout#v0.1.1:
+ cd: ~
+ timeout: 180
- label: ":ubuntu: Ubuntu 18.04 - Build UnPinned"
plugins:
@@ -136,4 +232,19 @@ steps:
command:
- "apt update && apt upgrade -y && apt install -y git"
- "./scripts/eosio_build.sh -y"
- timeout: 180
\ No newline at end of file
+ timeout: 180
+
+ - label: ":ubuntu: Ubuntu 20.04 - Build UnPinned"
+ env:
+ DEBIAN_FRONTEND: "noninteractive"
+ plugins:
+ - docker#v3.3.0:
+ image: "ubuntu:20.04"
+ always-pull: true
+ agents:
+ queue: "automation-eks-eos-builder-fleet"
+ command:
+ - "ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime"
+ - "apt update && apt upgrade -y && apt install -y git g++"
+ - "./scripts/eosio_build.sh -y"
+ timeout: 180
diff --git a/.cicd/build.sh b/.cicd/build.sh
index 5ffcff277fb..1989f507851 100755
--- a/.cicd/build.sh
+++ b/.cicd/build.sh
@@ -4,7 +4,7 @@ set -eo pipefail
. ./.cicd/helpers/general.sh
mkdir -p "$BUILD_DIR"
[[ -z "$DCMAKE_BUILD_TYPE" ]] && export DCMAKE_BUILD_TYPE='Release'
-CMAKE_EXTRAS="-DCMAKE_BUILD_TYPE=\"$DCMAKE_BUILD_TYPE\" -DENABLE_MULTIVERSION_PROTOCOL_TEST=\"true\" -DBUILD_MONGO_DB_PLUGIN=\"true\""
+CMAKE_EXTRAS="-DCMAKE_BUILD_TYPE=\"$DCMAKE_BUILD_TYPE\" -DENABLE_MULTIVERSION_PROTOCOL_TEST=\"true\""
if [[ "$(uname)" == 'Darwin' && "$FORCE_LINUX" != 'true' ]]; then
# You can't use chained commands in execute
if [[ "$GITHUB_ACTIONS" == 'true' ]]; then
@@ -12,6 +12,7 @@ if [[ "$(uname)" == 'Darwin' && "$FORCE_LINUX" != 'true' ]]; then
fi
[[ ! "$PINNED" == 'false' ]] && CMAKE_EXTRAS="$CMAKE_EXTRAS -DCMAKE_TOOLCHAIN_FILE=\"$HELPERS_DIR/clang.make\""
cd "$BUILD_DIR"
+ [[ "$CI" == 'true' ]] && source ~/.bash_profile # Make sure node is available for ship_test
echo '+++ :hammer_and_wrench: Building EOSIO'
CMAKE_COMMAND="cmake $CMAKE_EXTRAS .."
echo "$ $CMAKE_COMMAND"
@@ -29,11 +30,14 @@ else # Linux
if [[ "$IMAGE_TAG" == 'amazon_linux-2-unpinned' ]]; then
CMAKE_EXTRAS="$CMAKE_EXTRAS -DCMAKE_CXX_COMPILER=\"clang++\" -DCMAKE_C_COMPILER=\"clang\""
elif [[ "$IMAGE_TAG" == 'centos-7.7-unpinned' ]]; then
- PRE_COMMANDS="$PRE_COMMANDS && source \"/opt/rh/devtoolset-8/enable\" && source \"/opt/rh/rh-python36/enable\""
+ PRE_COMMANDS="$PRE_COMMANDS && source /opt/rh/devtoolset-8/enable"
CMAKE_EXTRAS="$CMAKE_EXTRAS -DLLVM_DIR=\"/opt/rh/llvm-toolset-7.0/root/usr/lib64/cmake/llvm\""
elif [[ "$IMAGE_TAG" == 'ubuntu-18.04-unpinned' ]]; then
CMAKE_EXTRAS="$CMAKE_EXTRAS -DCMAKE_CXX_COMPILER=\"clang++-7\" -DCMAKE_C_COMPILER=\"clang-7\" -DLLVM_DIR=\"/usr/lib/llvm-7/lib/cmake/llvm\""
fi
+ if [[ "$IMAGE_TAG" == centos-7.* ]]; then
+ PRE_COMMANDS="$PRE_COMMANDS && source /opt/rh/rh-python36/enable"
+ fi
CMAKE_COMMAND="cmake \$CMAKE_EXTRAS .."
MAKE_COMMAND="make -j $JOBS"
BUILD_COMMANDS="echo \"+++ :hammer_and_wrench: Building EOSIO\" && echo \"$ $CMAKE_COMMAND\" && eval $CMAKE_COMMAND && echo \"$ $MAKE_COMMAND\" && eval $MAKE_COMMAND"
diff --git a/.cicd/create-docker-from-binary.sh b/.cicd/create-docker-from-binary.sh
index aa58f3e1b38..42bbfc47569 100755
--- a/.cicd/create-docker-from-binary.sh
+++ b/.cicd/create-docker-from-binary.sh
@@ -1,54 +1,65 @@
#!/bin/bash
-
+echo '--- :evergreen_tree: Configuring Environment'
set -euo pipefail
-
+. ./.cicd/helpers/general.sh
buildkite-agent artifact download '*.deb' --step ':ubuntu: Ubuntu 18.04 - Package Builder' .
-echo ":done: download successful"
-
-SANITIZED_BRANCH=$(echo "$BUILDKITE_BRANCH" | sed 's.^/..' | sed 's/[:/]/_/g')
-SANITIZED_TAG=$(echo "$BUILDKITE_TAG" | sed 's.^/..' | tr '/' '_')
-echo "$SANITIZED_BRANCH"
-echo "$SANITIZED_TAG"
-
-# do docker build
-echo ":docker::build: Building image..."
-DOCKERHUB_REGISTRY="docker.io/eosio/eosio"
-
-BUILD_TAG=${BUILDKITE_BUILD_NUMBER:-latest}
-DOCKER_BUILD_GEN="docker build -t eosio_image:$BUILD_TAG -f ./docker/dockerfile ."
-echo "$ $DOCKER_BUILD_GEN"
-eval $DOCKER_BUILD_GEN
-
-#tag and push on each destination AWS & DOCKERHUB
-
-EOSIO_REGS=("$EOSIO_REGISTRY" "$DOCKERHUB_REGISTRY")
-for REG in ${EOSIO_REGS[@]}; do
- DOCKER_TAG_COMMIT="docker tag eosio_image:$BUILD_TAG $REG:$BUILDKITE_COMMIT"
- DOCKER_TAG_BRANCH="docker tag eosio_image:$BUILD_TAG $REG:$SANITIZED_BRANCH"
- echo -e "$ Tagging Images: \n$DOCKER_TAG_COMMIT \n$DOCKER_TAG_BRANCH"
- eval $DOCKER_TAG_COMMIT
+SANITIZED_BRANCH="$(sanitize "$BUILDKITE_BRANCH")"
+echo "Branch '$BUILDKITE_BRANCH' sanitized as '$SANITIZED_BRANCH'."
+SANITIZED_TAG="$(sanitize "$BUILDKITE_TAG")"
+[[ -z "$SANITIZED_TAG" ]] || echo "Branch '$BUILDKITE_TAG' sanitized as '$SANITIZED_TAG'."
+# docker build
+echo "+++ :docker: Build Docker Container"
+DOCKERHUB_REGISTRY='docker.io/eosio/eosio'
+IMAGE="${DOCKERHUB_REGISTRY}:${BUILDKITE_COMMIT:-latest}"
+DOCKER_BUILD="docker build -t '$IMAGE' -f ./docker/dockerfile ."
+echo "$ $DOCKER_BUILD"
+eval $DOCKER_BUILD
+# docker tag
+echo '--- :label: Tag Container'
+REGISTRIES=("$EOSIO_REGISTRY" "$DOCKERHUB_REGISTRY")
+for REG in ${REGISTRIES[@]}; do
+ DOCKER_TAG_BRANCH="docker tag '$IMAGE' '$REG:$SANITIZED_BRANCH'"
+ echo "$ $DOCKER_TAG_BRANCH"
eval $DOCKER_TAG_BRANCH
- DOCKER_PUSH_COMMIT="docker push $REG:$BUILDKITE_COMMIT"
- DOCKER_PUSH_BRANCH="docker push $REG:$SANITIZED_BRANCH"
- echo -e "$ Pushing Images: \n$DOCKER_PUSH_COMMIT \n$DOCKER_PUSH_BRANCH"
- eval $DOCKER_PUSH_COMMIT
- eval $DOCKER_PUSH_BRANCH
- CLEAN_IMAGE_COMMIT="docker rmi $REG:$BUILDKITE_COMMIT || :"
- CLEAN_IMAGE_BRANCH="docker rmi $REG:$SANITIZED_BRANCH || :"
- echo -e "Cleaning Up: \n$CLEAN_IMAGE_COMMIT \n$CLEAN_IMAGE_BRANCH$"
- eval $CLEAN_IMAGE_COMMIT
- eval $CLEAN_IMAGE_BRANCH
- if [[ ! -z "$SANITIZED_TAG" ]]; then
- DOCKER_TAG="docker tag eosio_image:$BUILD_TAG $REG:$SANITIZED_TAG"
- DOCKER_PUSH_TAG="docker push $REG:$SANITIZED_TAG"
- DOCKER_REM="docker rmi $REG:$SANITIZED_TAG || :"
- echo -e "$ \n Tagging Image: \n$DOCKER_TAG \n Cleaning Up: \n$DOCKER_REM"
+ DOCKER_TAG_COMMIT="docker tag '$IMAGE' '$REG:$BUILDKITE_COMMIT'"
+ echo "$ $DOCKER_TAG_COMMIT"
+ eval $DOCKER_TAG_COMMIT
+ if [[ ! -z "$SANITIZED_TAG" && "$SANITIZED_BRANCH" != "$SANITIZED_TAG" ]]; then
+ DOCKER_TAG="docker tag '$IMAGE' '$REG:$SANITIZED_TAG'"
+ echo "$ $DOCKER_TAG"
eval $DOCKER_TAG
+ fi
+done
+# docker push
+echo '--- :arrow_up: Push Container'
+for REG in ${REGISTRIES[@]}; do
+ DOCKER_PUSH_BRANCH="docker push '$REG:$SANITIZED_BRANCH'"
+ echo "$ $DOCKER_PUSH_BRANCH"
+ eval $DOCKER_PUSH_BRANCH
+ DOCKER_PUSH_COMMIT="docker push '$REG:$BUILDKITE_COMMIT'"
+ echo "$ $DOCKER_PUSH_COMMIT"
+ eval $DOCKER_PUSH_COMMIT
+ if [[ ! -z "$SANITIZED_TAG" && "$SANITIZED_BRANCH" != "$SANITIZED_TAG" ]]; then
+ DOCKER_PUSH_TAG="docker push '$REG:$SANITIZED_TAG'"
+ echo "$ $DOCKER_PUSH_TAG"
eval $DOCKER_PUSH_TAG
- eval $DOCKER_REM
fi
done
-
-DOCKER_GEN="docker rmi eosio_image:$BUILD_TAG || :"
-echo "Clean up base image"
-eval $DOCKER_GEN
\ No newline at end of file
+# docker rmi
+echo '--- :put_litter_in_its_place: Cleanup'
+for REG in ${REGISTRIES[@]}; do
+ CLEAN_IMAGE_BRANCH="docker rmi '$REG:$SANITIZED_BRANCH' || :"
+ echo "$ $CLEAN_IMAGE_BRANCH"
+ eval $CLEAN_IMAGE_BRANCH
+ CLEAN_IMAGE_COMMIT="docker rmi '$REG:$BUILDKITE_COMMIT' || :"
+ echo "$ $CLEAN_IMAGE_COMMIT"
+ eval $CLEAN_IMAGE_COMMIT
+ if [[ ! -z "$SANITIZED_TAG" && "$SANITIZED_BRANCH" != "$SANITIZED_TAG" ]]; then
+ DOCKER_RMI="docker rmi '$REG:$SANITIZED_TAG' || :"
+ echo "$ $DOCKER_RMI"
+ eval $DOCKER_RMI
+ fi
+done
+DOCKER_RMI="docker rmi '$IMAGE' || :"
+echo "$ $DOCKER_RMI"
+eval $DOCKER_RMI
diff --git a/.cicd/docker-tag.sh b/.cicd/docker-tag.sh
index 85142e60b52..33211ac88d8 100755
--- a/.cicd/docker-tag.sh
+++ b/.cicd/docker-tag.sh
@@ -3,8 +3,10 @@ set -eo pipefail
echo '--- :evergreen_tree: Configuring Environment'
. ./.cicd/helpers/general.sh
PREFIX='base-ubuntu-18.04'
-SANITIZED_BRANCH=$(echo "$BUILDKITE_BRANCH" | sed 's.^/..' | sed 's/[:/]/_/g')
-SANITIZED_TAG=$(echo "$BUILDKITE_TAG" | sed 's.^/..' | tr '/' '_')
+SANITIZED_BRANCH="$(sanitize "$BUILDKITE_BRANCH")"
+echo "Branch '$BUILDKITE_BRANCH' sanitized as '$SANITIZED_BRANCH'."
+SANITIZED_TAG="$(sanitize "$BUILDKITE_TAG")"
+[[ -z "$SANITIZED_TAG" ]] || echo "Branch '$BUILDKITE_TAG' sanitized as '$SANITIZED_TAG'."
echo '$ echo ${#CONTRACT_REGISTRIES[*]} # array length'
echo ${#CONTRACT_REGISTRIES[*]}
echo '$ echo ${CONTRACT_REGISTRIES[*]} # array'
@@ -23,7 +25,7 @@ for REGISTRY in ${CONTRACT_REGISTRIES[*]}; do
DOCKER_TAG_COMMAND="docker tag '$IMAGE' '$REGISTRY:$PREFIX-$SANITIZED_BRANCH'"
echo "$ $DOCKER_TAG_COMMAND"
eval $DOCKER_TAG_COMMAND
- if [[ ! -z "$BUILDKITE_TAG" && "$SANITIZED_BRANCH" != "$SANITIZED_TAG" ]]; then
+ if [[ ! -z "$SANITIZED_TAG" && "$SANITIZED_BRANCH" != "$SANITIZED_TAG" ]]; then
DOCKER_TAG_COMMAND="docker tag '$IMAGE' '$REGISTRY:$PREFIX-$SANITIZED_TAG'"
echo "$ $DOCKER_TAG_COMMAND"
eval $DOCKER_TAG_COMMAND
@@ -38,7 +40,7 @@ for REGISTRY in ${CONTRACT_REGISTRIES[*]}; do
DOCKER_PUSH_COMMAND="docker push '$REGISTRY:$PREFIX-$SANITIZED_BRANCH'"
echo "$ $DOCKER_PUSH_COMMAND"
eval $DOCKER_PUSH_COMMAND
- if [[ ! -z "$BUILDKITE_TAG" && "$SANITIZED_BRANCH" != "$SANITIZED_TAG" ]]; then
+ if [[ ! -z "$SANITIZED_TAG" && "$SANITIZED_BRANCH" != "$SANITIZED_TAG" ]]; then
DOCKER_PUSH_COMMAND="docker push '$REGISTRY:$PREFIX-$SANITIZED_TAG'"
echo "$ $DOCKER_PUSH_COMMAND"
eval $DOCKER_PUSH_COMMAND
@@ -56,7 +58,7 @@ for REGISTRY in ${CONTRACT_REGISTRIES[*]}; do
DOCKER_RMI_COMMAND="docker rmi '$REGISTRY:$PREFIX-$BUILDKITE_COMMIT' || :"
echo "$ $DOCKER_RMI_COMMAND"
eval $DOCKER_RMI_COMMAND
- if [[ ! -z "$BUILDKITE_TAG" && "$SANITIZED_BRANCH" != "$SANITIZED_TAG" ]]; then
+ if [[ ! -z "$SANITIZED_TAG" && "$SANITIZED_BRANCH" != "$SANITIZED_TAG" ]]; then
DOCKER_RMI_COMMAND="docker rmi '$REGISTRY:$PREFIX-$SANITIZED_TAG' || :"
echo "$ $DOCKER_RMI_COMMAND"
eval $DOCKER_RMI_COMMAND
diff --git a/.cicd/generate-pipeline.sh b/.cicd/generate-pipeline.sh
index 71f96466de3..511779fb8f4 100755
--- a/.cicd/generate-pipeline.sh
+++ b/.cicd/generate-pipeline.sh
@@ -2,18 +2,22 @@
set -eo pipefail
# environment
. ./.cicd/helpers/general.sh
-export MOJAVE_ANKA_TAG_BASE=${MOJAVE_ANKA_TAG_BASE:-'clean::cicd::git-ssh::nas::brew::buildkite-agent'}
-export MOJAVE_ANKA_TEMPLATE_NAME=${MOJAVE_ANKA_TEMPLATE_NAME:-'10.14.6_6C_14G_80G'}
export PLATFORMS_JSON_ARRAY='[]'
+[[ -z "$ROUNDS" ]] && export ROUNDS='1'
BUILDKITE_BUILD_AGENT_QUEUE='automation-eks-eos-builder-fleet'
BUILDKITE_TEST_AGENT_QUEUE='automation-eks-eos-tester-fleet'
-[[ -z "$ROUNDS" ]] && export ROUNDS='1'
+# attach pipeline documentation
+export DOCS_URL="https://github.com/EOSIO/eos/blob/${BUILDKITE_COMMIT:-master}/.cicd/README.md"
+export RETRY="$(buildkite-agent meta-data get pipeline-upload-retries --default '0')"
+if [[ "$BUILDKITE" == 'true' && "$RETRY" == '0' ]]; then
+ echo "This documentation is also available on [GitHub]($DOCS_URL)." | buildkite-agent annotate --append --style 'info' --context 'documentation'
+ cat .cicd/README.md | buildkite-agent annotate --append --style 'info' --context 'documentation'
+fi
# Determine if it's a forked PR and make sure to add git fetch so we don't have to git clone the forked repo's url
if [[ $BUILDKITE_BRANCH =~ ^pull/[0-9]+/head: ]]; then
PR_ID=$(echo $BUILDKITE_BRANCH | cut -d/ -f2)
export GIT_FETCH="git fetch -v --prune origin refs/pull/$PR_ID/head &&"
fi
-[[ "$BUILDKITE_PIPELINE_SLUG" == 'eosio-debug-build' ]] && export SKIP_UBUNTU_18_04='false'
# Determine which dockerfiles/scripts to use for the pipeline.
if [[ $PINNED == false ]]; then
export PLATFORM_TYPE="unpinned"
@@ -32,6 +36,11 @@ for FILE in $(ls "$CICD_DIR/platforms/$PLATFORM_TYPE"); do
export FILE_NAME="$(echo "$FILE" | awk '{split($0,a,/\.(d|s)/); print a[1] }')"
# macos-10.14
# ubuntu-16.04
+ # skip Mojave if it's anything but the post-merge build
+ if [[ "$FILE_NAME" =~ 'macos-10.14' && "$SKIP_MACOS_10_14" != 'false' && "$RUN_ALL_TESTS" != 'true' && ( "$BUILDKITE_SOURCE" != 'webhook' || "$BUILDKITE_PULL_REQUEST" != 'false' || ! "$BUILDKITE_MESSAGE" =~ 'Merge pull request' ) ]]; then
+ export SKIP_MACOS_10_14='true'
+ continue
+ fi
export PLATFORM_NAME="$(echo $FILE_NAME | cut -d- -f1 | sed 's/os/OS/g')"
# macOS
# ubuntu
@@ -58,6 +67,16 @@ for FILE in $(ls "$CICD_DIR/platforms/$PLATFORM_TYPE"); do
[[ $FILE_NAME =~ 'macos' ]] && export ICON=':darwin:'
. "$HELPERS_DIR/file-hash.sh" "$CICD_DIR/platforms/$PLATFORM_TYPE/$FILE" # returns HASHED_IMAGE_TAG, etc
export PLATFORM_SKIP_VAR="SKIP_${PLATFORM_NAME_UPCASE}_${VERSION_MAJOR}${VERSION_MINOR}"
+ # Anka Template and Tags
+ export ANKA_TAG_BASE='clean::cicd::git-ssh::nas::brew::buildkite-agent'
+ if [[ $FILE_NAME =~ 'macos-10.14' ]]; then
+ export ANKA_TEMPLATE_NAME='10.14.6_6C_14G_80G'
+ elif [[ $FILE_NAME =~ 'macos-10.15' ]]; then
+ export ANKA_TEMPLATE_NAME='10.15.5_6C_14G_80G'
+ else # Linux
+ export ANKA_TAG_BASE=''
+ export ANKA_TEMPLATE_NAME=''
+ fi
export PLATFORMS_JSON_ARRAY=$(echo $PLATFORMS_JSON_ARRAY | jq -c '. += [{
"FILE_NAME": env.FILE_NAME,
"PLATFORM_NAME": env.PLATFORM_NAME,
@@ -69,7 +88,9 @@ for FILE in $(ls "$CICD_DIR/platforms/$PLATFORM_TYPE"); do
"PLATFORM_NAME_FULL": env.PLATFORM_NAME_FULL,
"DOCKERHUB_FULL_TAG": env.FULL_TAG,
"HASHED_IMAGE_TAG": env.HASHED_IMAGE_TAG,
- "ICON": env.ICON
+ "ICON": env.ICON,
+ "ANKA_TAG_BASE": env.ANKA_TAG_BASE,
+ "ANKA_TEMPLATE_NAME": env.ANKA_TEMPLATE_NAME
}]')
done
# set build_source whether triggered or not
@@ -91,6 +112,7 @@ oIFS="$IFS"
IFS=$''
nIFS=$IFS # fix array splitting (\n won't work)
# start with a wait step
+echo 'steps:'
echo ' - wait'
echo ''
# build steps
@@ -129,8 +151,8 @@ EOF
- EOSIO/anka#v0.6.1:
no-volume: true
inherit-environment-vars: true
- vm-name: ${MOJAVE_ANKA_TEMPLATE_NAME}
- vm-registry-tag: "${MOJAVE_ANKA_TAG_BASE}::$(echo "$PLATFORM_JSON" | jq -r .HASHED_IMAGE_TAG)"
+ vm-name: $(echo "$PLATFORM_JSON" | jq -r .ANKA_TEMPLATE_NAME)
+ vm-registry-tag: $(echo "$PLATFORM_JSON" | jq -r .ANKA_TAG_BASE)::$(echo "$PLATFORM_JSON" | jq -r .HASHED_IMAGE_TAG)
modify-cpu: 12
modify-ram: 24
always-pull: true
@@ -142,15 +164,15 @@ EOF
- 'registry_1'
- 'registry_2'
pre-commands:
- - "git clone git@github.com:EOSIO/mac-anka-fleet.git && cd mac-anka-fleet && . ./ensure-tag.bash -u 12 -r 25G -a '-n'"
+ - "rm -rf mac-anka-fleet; git clone git@github.com:EOSIO/mac-anka-fleet.git && cd mac-anka-fleet && . ./ensure-tag.bash -u 12 -r 25G -a '-n'"
- EOSIO/skip-checkout#v0.1.1:
cd: ~
env:
DCMAKE_BUILD_TYPE: $DCMAKE_BUILD_TYPE
REPO: ${BUILDKITE_PULL_REQUEST_REPO:-$BUILDKITE_REPO}
REPO_COMMIT: $BUILDKITE_COMMIT
- TEMPLATE: $MOJAVE_ANKA_TEMPLATE_NAME
- TEMPLATE_TAG: $MOJAVE_ANKA_TAG_BASE
+ TEMPLATE: $(echo "$PLATFORM_JSON" | jq -r .ANKA_TEMPLATE_NAME)
+ TEMPLATE_TAG: $(echo "$PLATFORM_JSON" | jq -r .ANKA_TAG_BASE)
IMAGE_TAG: $(echo "$PLATFORM_JSON" | jq -r .FILE_NAME)
PLATFORM_TYPE: $PLATFORM_TYPE
TAG_COMMANDS: "git clone ${BUILDKITE_PULL_REQUEST_REPO:-$BUILDKITE_REPO} eos && cd eos && $GIT_FETCH git checkout -f \$BUILDKITE_COMMIT && git submodule update --init --recursive && export IMAGE_TAG=$(echo "$PLATFORM_JSON" | jq -r .FILE_NAME) && export PLATFORM_TYPE=$PLATFORM_TYPE && . ./.cicd/platforms/$PLATFORM_TYPE/$(echo "$PLATFORM_JSON" | jq -r .FILE_NAME).sh && cd ~/eos && cd .. && rm -rf eos"
@@ -215,8 +237,8 @@ EOF
- EOSIO/anka#v0.6.1:
no-volume: true
inherit-environment-vars: true
- vm-name: ${MOJAVE_ANKA_TEMPLATE_NAME}
- vm-registry-tag: "${MOJAVE_ANKA_TAG_BASE}::$(echo "$PLATFORM_JSON" | jq -r .HASHED_IMAGE_TAG)"
+ vm-name: $(echo "$PLATFORM_JSON" | jq -r .ANKA_TEMPLATE_NAME)
+ vm-registry-tag: $(echo "$PLATFORM_JSON" | jq -r .ANKA_TAG_BASE)::$(echo "$PLATFORM_JSON" | jq -r .HASHED_IMAGE_TAG)
always-pull: true
debug: true
wait-network: true
@@ -273,8 +295,8 @@ EOF
- EOSIO/anka#v0.6.1:
no-volume: true
inherit-environment-vars: true
- vm-name: ${MOJAVE_ANKA_TEMPLATE_NAME}
- vm-registry-tag: "${MOJAVE_ANKA_TAG_BASE}::$(echo "$PLATFORM_JSON" | jq -r .HASHED_IMAGE_TAG)"
+ vm-name: $(echo "$PLATFORM_JSON" | jq -r .ANKA_TEMPLATE_NAME)
+ vm-registry-tag: $(echo "$PLATFORM_JSON" | jq -r .ANKA_TAG_BASE)::$(echo "$PLATFORM_JSON" | jq -r .HASHED_IMAGE_TAG)
always-pull: true
debug: true
wait-network: true
@@ -331,8 +353,8 @@ EOF
- EOSIO/anka#v0.6.1:
no-volume: true
inherit-environment-vars: true
- vm-name: ${MOJAVE_ANKA_TEMPLATE_NAME}
- vm-registry-tag: "${MOJAVE_ANKA_TAG_BASE}::$(echo "$PLATFORM_JSON" | jq -r .HASHED_IMAGE_TAG)"
+ vm-name: $(echo "$PLATFORM_JSON" | jq -r .ANKA_TEMPLATE_NAME)
+ vm-registry-tag: $(echo "$PLATFORM_JSON" | jq -r .ANKA_TAG_BASE)::$(echo "$PLATFORM_JSON" | jq -r .HASHED_IMAGE_TAG)
always-pull: true
debug: true
wait-network: true
@@ -391,8 +413,8 @@ EOF
- EOSIO/anka#v0.6.1:
no-volume: true
inherit-environment-vars: true
- vm-name: ${MOJAVE_ANKA_TEMPLATE_NAME}
- vm-registry-tag: "${MOJAVE_ANKA_TAG_BASE}::$(echo "$PLATFORM_JSON" | jq -r .HASHED_IMAGE_TAG)"
+ vm-name: $(echo "$PLATFORM_JSON" | jq -r .ANKA_TEMPLATE_NAME)
+ vm-registry-tag: $(echo "$PLATFORM_JSON" | jq -r .ANKA_TAG_BASE)::$(echo "$PLATFORM_JSON" | jq -r .HASHED_IMAGE_TAG)
always-pull: true
debug: true
wait-network: true
@@ -417,16 +439,10 @@ EOF
IFS=$nIFS
done
IFS=$oIFS
- if [[ "$ROUND" != "$ROUNDS" ]]; then
- echo ' - wait'
- echo ''
- fi
- done
- # Execute multiversion test
- if [[ ! "$PINNED" == 'false' || "$SKIP_MULTIVERSION_TEST" == 'false' ]]; then
- cat <> ~/.ssh/known_hosts"
+ - "git clone \$BUILDKITE_REPO ."
+ - "$GIT_FETCH git checkout -f \$BUILDKITE_COMMIT"
+ - "echo '+++ :compression: Extracting Test Metrics Code'"
+ - "tar -zxf .cicd/metrics/test-metrics.tar.gz"
+ - "echo '+++ :javascript: Running test-metrics.js'"
+ - "node --max-old-space-size=32768 test-metrics.js"
+ plugins:
+ - EOSIO/skip-checkout#v0.1.1:
+ cd: ~
agents:
queue: "$BUILDKITE_TEST_AGENT_QUEUE"
timeout: ${TIMEOUT:-10}
@@ -524,7 +552,7 @@ cat <(count)/' src/mongocxx/options/change_stream.cpp && \
- sed -i 's/add_subdirectory(test)//' src/mongocxx/CMakeLists.txt src/bsoncxx/CMakeLists.txt && \
- cd build && \
- cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_TOOLCHAIN_FILE='/tmp/clang.cmake' .. && \
- make -j$(nproc) && \
- make install && \
- cd / && \
- rm -rf mongo-cxx-driver-r3.4.0.tar.gz /mongo-cxx-driver-r3.4.0
-# add mongodb to path
-ENV PATH=${PATH}:/mongodb-linux-x86_64-amazon-3.6.3/bin
\ No newline at end of file
+ rm -rf boost_1_72_0.tar.bz2 /boost_1_72_0
+#install libpq postgresql-server
+RUN amazon-linux-extras enable postgresql11 && \
+ yum install -y libpq-devel postgresql-server && \
+ yum clean all && rm -rf /var/cache/yum
+#build libpqxx
+RUN curl -L https://github.com/jtv/libpqxx/archive/7.2.1.tar.gz | tar zxvf - && \
+ cd libpqxx-7.2.1 && \
+ cmake -DCMAKE_TOOLCHAIN_FILE=/tmp/clang.cmake -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/libpq -DSKIP_BUILD_TEST=ON -DCMAKE_BUILD_TYPE=Release -S . -B build && \
+ cmake --build build && cmake --install build && \
+ cd .. && rm -rf libpqxx-7.2.1
+ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
+# install nvm
+RUN touch ~/.bashrc
+RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
+# load nvm in non-interactive shells
+RUN echo 'export NVM_DIR="$HOME/.nvm"' > ~/.bashrc && \
+ echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> ~/.bashrc
+# install node 10
+RUN bash -c '. ~/.bashrc; nvm install --lts=dubnium' && \
+ ln -s "/root/.nvm/versions/node/$(ls -p /root/.nvm/versions/node | sort -Vr | head -1)bin/node" /usr/local/bin/node && \
+ ln -s "/root/.nvm/versions/node/$(ls -p /root/.nvm/versions/node | sort -Vr | head -1)bin/npm" /usr/local/bin/npm
+# setup Postgress
+RUN su - postgres -c "/usr/bin/initdb"
\ No newline at end of file
diff --git a/.cicd/platforms/pinned/centos-7.7-pinned.dockerfile b/.cicd/platforms/pinned/centos-7.7-pinned.dockerfile
index 00310a96b7a..219a08da5d1 100644
--- a/.cicd/platforms/pinned/centos-7.7-pinned.dockerfile
+++ b/.cicd/platforms/pinned/centos-7.7-pinned.dockerfile
@@ -6,85 +6,72 @@ RUN yum update -y && \
yum --enablerepo=extras install -y centos-release-scl && \
yum --enablerepo=extras install -y devtoolset-8 && \
yum --enablerepo=extras install -y which git autoconf automake libtool make bzip2 doxygen \
- graphviz bzip2-devel openssl-devel gmp-devel ocaml libicu-devel \
- python python-devel rh-python36 gettext-devel file libusbx-devel \
- libcurl-devel patch vim-common jq
-# build cmake.
-RUN curl -LO https://cmake.org/files/v3.13/cmake-3.13.2.tar.gz && \
+ graphviz bzip2-devel openssl-devel gmp-devel ocaml \
+ python python-devel rh-python36 file libusbx-devel \
+ libcurl-devel patch vim-common jq glibc-locale-source glibc-langpack-en && \
+ yum clean all && rm -rf /var/cache/yum
+# build cmake
+RUN curl -LO https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3.16.2.tar.gz && \
+ tar -xzf cmake-3.16.2.tar.gz && \
+ cd cmake-3.16.2 && \
source /opt/rh/devtoolset-8/enable && \
- source /opt/rh/rh-python36/enable && \
- tar -xzf cmake-3.13.2.tar.gz && \
- cd cmake-3.13.2 && \
./bootstrap --prefix=/usr/local && \
make -j$(nproc) && \
make install && \
- cd / && \
- rm -rf cmake-3.13.2.tar.gz /cmake-3.13.2
-COPY ./scripts/clang-devtoolset8-support.patch /tmp/clang-devtoolset8-support.patch
-# build clang8
-RUN git clone --single-branch --branch release_80 https://github.com/llvm-mirror/llvm.git clang8 && cd clang8 && git checkout 18e41dc && sed -i 's,https://github.com/llvm-mirror/,https://git.llvm.org/git/,g' .git/config && \
- cd tools && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/lld.git && cd lld && git checkout d60a035 && \
- cd ../ && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/polly.git && cd polly && git checkout 1bc06e5 && \
- cd ../ && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/clang.git clang && cd clang && git checkout a03da8b && sed -i 's,https://github.com/llvm-mirror/,https://git.llvm.org/git/,g' .git/config && \
- patch -p2 < /tmp/clang-devtoolset8-support.patch && \
- cd tools && mkdir extra && cd extra && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/clang-tools-extra.git && cd clang-tools-extra && git checkout 6b34834 && \
- cd /clang8/projects && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/libcxx.git && cd libcxx && git checkout 1853712 && \
- cd ../ && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/libcxxabi.git && cd libcxxabi && git checkout d7338a4 && \
- cd ../ && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/libunwind.git && cd libunwind && git checkout 57f6739 && \
- cd ../ && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/compiler-rt.git && cd compiler-rt && git checkout 5bc7979 && \
- mkdir /clang8/build && cd /clang8/build && \
+ rm -rf cmake-3.16.2.tar.gz cmake-3.16.2
+# build clang10
+RUN git clone --single-branch --branch llvmorg-10.0.0 https://github.com/llvm/llvm-project clang10 && \
+ mkdir /clang10/build && cd /clang10/build && \
source /opt/rh/devtoolset-8/enable && \
source /opt/rh/rh-python36/enable && \
- cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX='/usr/local' -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Release .. && \
+ cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX='/usr/local' -DLLVM_ENABLE_PROJECTS='lld;polly;clang;clang-tools-extra;libcxx;libcxxabi;libunwind;compiler-rt' -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release ../llvm && \
make -j $(nproc) && \
make install && \
cd / && \
- rm -rf /clang8
+ rm -rf /clang10
COPY ./.cicd/helpers/clang.make /tmp/clang.cmake
-# build llvm8
-RUN git clone --depth 1 --single-branch --branch release_80 https://github.com/llvm-mirror/llvm.git llvm && \
- cd llvm && \
+# build llvm10
+RUN git clone --depth 1 --single-branch --branch llvmorg-10.0.0 https://github.com/llvm/llvm-project llvm && \
+ cd llvm/llvm && \
mkdir build && \
cd build && \
- cmake -G 'Unix Makefiles' -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_TOOLCHAIN_FILE='/tmp/clang.cmake' -DCMAKE_EXE_LINKER_FLAGS=-pthread -DCMAKE_SHARED_LINKER_FLAGS=-pthread -DLLVM_ENABLE_PIC=NO .. && \
+ cmake -G 'Unix Makefiles' -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_TOOLCHAIN_FILE='/tmp/clang.cmake' -DCMAKE_EXE_LINKER_FLAGS=-pthread -DCMAKE_SHARED_LINKER_FLAGS=-pthread -DLLVM_ENABLE_PIC=NO -DLLVM_ENABLE_TERMINFO=OFF .. && \
make -j$(nproc) && \
make install && \
cd / && \
rm -rf /llvm
# build boost
-RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2 && \
- tar -xjf boost_1_71_0.tar.bz2 && \
- cd boost_1_71_0 && \
+RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 && \
+ tar -xjf boost_1_72_0.tar.bz2 && \
+ cd boost_1_72_0 && \
./bootstrap.sh --with-toolset=clang --prefix=/usr/local && \
./b2 toolset=clang cxxflags='-stdlib=libc++ -D__STRICT_ANSI__ -nostdinc++ -I/usr/local/include/c++/v1 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fpie' linkflags='-stdlib=libc++ -pie' link=static threading=multi --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(nproc) install && \
cd / && \
- rm -rf boost_1_71_0.tar.bz2 /boost_1_71_0
-# build mongodb
-RUN curl -LO https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-3.6.3.tgz && \
- tar -xzf mongodb-linux-x86_64-amazon-3.6.3.tgz && \
- rm -rf mongodb-linux-x86_64-amazon-3.6.3.tgz
-# build mongodb c driver
-RUN curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/1.13.0/mongo-c-driver-1.13.0.tar.gz && \
- tar -xzf mongo-c-driver-1.13.0.tar.gz && \
- cd mongo-c-driver-1.13.0 && \
- mkdir -p build && \
- cd build && \
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON -DENABLE_ICU=OFF -DENABLE_SNAPPY=OFF -DCMAKE_TOOLCHAIN_FILE='/tmp/clang.cmake' .. && \
- make -j$(nproc) && \
- make install && \
- cd / && \
- rm -rf mongo-c-driver-1.13.0.tar.gz /mongo-c-driver-1.13.0
-# build mongodb cxx driver
-RUN curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o mongo-cxx-driver-r3.4.0.tar.gz && \
- tar -xzf mongo-cxx-driver-r3.4.0.tar.gz && \
- cd mongo-cxx-driver-r3.4.0 && \
- sed -i 's/\"maxAwaitTimeMS\", count/\"maxAwaitTimeMS\", static_cast(count)/' src/mongocxx/options/change_stream.cpp && \
- sed -i 's/add_subdirectory(test)//' src/mongocxx/CMakeLists.txt src/bsoncxx/CMakeLists.txt && \
- cd build && \
- cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_TOOLCHAIN_FILE='/tmp/clang.cmake' .. && \
- make -j$(nproc) && \
- make install && \
- cd / && \
- rm -rf mongo-cxx-driver-r3.4.0.tar.gz /mongo-cxx-driver-r3.4.0
-# add mongodb to path
-ENV PATH=${PATH}:/mongodb-linux-x86_64-amazon-3.6.3/bin
\ No newline at end of file
+ rm -rf boost_1_72_0.tar.bz2 /boost_1_72_0
+#install libpq
+RUN yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm && \
+ yum install -y postgresql13-devel postgresql13-server && \
+ yum clean all && rm -rf /var/cache/yum
+ENV PostgreSQL_ROOT=/usr/pgsql-13
+ENV PKG_CONFIG_PATH=/usr/pgsql-13/lib/pkgconfig:/usr/local/lib64/pkgconfig
+#build libpqxx
+RUN curl -L https://github.com/jtv/libpqxx/archive/7.2.1.tar.gz | tar zxvf - && \
+ cd libpqxx-7.2.1 && \
+ cmake -DCMAKE_TOOLCHAIN_FILE=/tmp/clang.cmake -DSKIP_BUILD_TEST=ON -DCMAKE_BUILD_TYPE=Release -S . -B build && \
+ cmake --build build && cmake --install build && \
+ cd .. && rm -rf libpqxx-7.2.1
+# install nvm
+RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
+# load nvm in non-interactive shells
+RUN cp ~/.bashrc ~/.bashrc.bak && \
+ cat ~/.bashrc.bak | tail -3 > ~/.bashrc && \
+ cat ~/.bashrc.bak | head -n '-3' >> ~/.bashrc && \
+ rm ~/.bashrc.bak
+# install node 10
+RUN bash -c '. ~/.bashrc; nvm install --lts=dubnium' && \
+ ln -s "/root/.nvm/versions/node/$(ls -p /root/.nvm/versions/node | sort -Vr | head -1)bin/node" /usr/local/bin/node
+RUN yum install -y nodejs && \
+ yum clean all && rm -rf /var/cache/yum
+# setup Postgress
+RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8 && \
+ su - postgres -c "/usr/pgsql-13/bin/initdb"
diff --git a/.cicd/platforms/pinned/centos-8-pinned.dockerfile b/.cicd/platforms/pinned/centos-8-pinned.dockerfile
new file mode 100644
index 00000000000..4e4233c921c
--- /dev/null
+++ b/.cicd/platforms/pinned/centos-8-pinned.dockerfile
@@ -0,0 +1,75 @@
+FROM centos:8
+ENV VERSION 1
+#install dependencies
+RUN yum update -y && \
+ yum install -y epel-release && \
+ yum --enablerepo=extras install -y which git autoconf automake libtool make bzip2 && \
+ yum --enablerepo=extras install -y graphviz bzip2-devel openssl-devel gmp-devel && \
+ yum --enablerepo=extras install -y file libusbx-devel && \
+ yum --enablerepo=extras install -y libcurl-devel patch vim-common jq && \
+ yum install -y python3 glibc-locale-source glibc-langpack-en && \
+ yum clean all && rm -rf /var/cache/yum
+RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
+ dnf group install -y "Development Tools" && \
+ dnf --enablerepo=powertools install -y doxygen ocaml
+# cmake3.18.0
+RUN curl -LO https://github.com/Kitware/CMake/releases/download/v3.18.0/cmake-3.18.0.tar.gz && \
+ tar -xzf cmake-3.18.0.tar.gz && \
+ cd cmake-3.18.0 && \
+ ./bootstrap --prefix=/usr/local && \
+ make -j$(nproc) && make install && \
+ rm -rf cmake-3.18.0.tar.gz cmake-3.18.2
+# clang10.0.0
+RUN git clone --single-branch --branch llvmorg-10.0.0 https://github.com/llvm/llvm-project clang10 && \
+ mkdir /clang10/build && cd /clang10/build && \
+ cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX='/usr/local' -DLLVM_ENABLE_PROJECTS='lld;polly;clang;clang-tools-extra;libcxx;libcxxabi;libunwind;compiler-rt' -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release ../llvm && \
+ make -j$(nproc) && make install && \
+ cd / && \
+ rm -rf /clang10
+COPY ./.cicd/helpers/clang.make /tmp/clang.cmake
+#build llvm10
+RUN git clone --depth 1 --single-branch --branch llvmorg-10.0.0 https://github.com/llvm/llvm-project llvm && \
+ cd llvm/llvm && \
+ mkdir build && \
+ cd build && \
+ cmake -G 'Unix Makefiles' -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_TOOLCHAIN_FILE='/tmp/clang.cmake' -DCMAKE_EXE_LINKER_FLAGS=-pthread -DCMAKE_SHARED_LINKER_FLAGS=-pthread -DLLVM_ENABLE_PIC=NO -DLLVM_ENABLE_TERMINFO=OFF .. && \
+ make -j$(nproc) && \
+ make install && \
+ cd / && \
+ rm -rf /llvm
+# build boost
+RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 && \
+ tar -xjf boost_1_72_0.tar.bz2 && \
+ cd boost_1_72_0 && \
+ ./bootstrap.sh --with-toolset=clang --prefix=/usr/local && \
+ ./b2 toolset=clang cxxflags='-stdlib=libc++ -D__STRICT_ANSI__ -nostdinc++ -I/usr/local/include/c++/v1 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fpie' linkflags='-stdlib=libc++ -pie' link=static threading=multi --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(nproc) install && \
+ cd / && \
+ rm -rf boost_1_72_0.tar.bz2 /boost_1_72_0
+# install libpq & postgres
+RUN dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm && \
+ dnf -qy module disable postgresql && \
+ dnf install -y postgresql13-devel postgresql13-server \
+ && dnf clean all && rm -rf /var/cache/yum
+ENV PostgreSQL_ROOT=/usr/pgsql-13
+ENV PKG_CONFIG_PATH=/usr/pgsql-13/lib/pkgconfig:/usr/local/lib64/pkgconfig
+#build libpqxx
+RUN curl -L https://github.com/jtv/libpqxx/archive/7.2.1.tar.gz | tar zxvf - && \
+ cd libpqxx-7.2.1 && \
+ cmake -DCMAKE_TOOLCHAIN_FILE=/tmp/clang.cmake -DSKIP_BUILD_TEST=ON -DCMAKE_BUILD_TYPE=Release -S . -B build && \
+ cmake --build build && cmake --install build && \
+ cd .. && rm -rf libpqxx-7.2.1
+# install nvm
+RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
+# load nvm in non-interactive shells
+RUN cp ~/.bashrc ~/.bashrc.bak && \
+ cat ~/.bashrc.bak | tail -3 > ~/.bashrc && \
+ cat ~/.bashrc.bak | head -n '-3' >> ~/.bashrc && \
+ rm ~/.bashrc.bak
+# install node 10
+RUN bash -c '. ~/.bashrc; nvm install --lts=dubnium' && \
+ ln -s "/root/.nvm/versions/node/$(ls -p /root/.nvm/versions/node | sort -Vr | head -1)bin/node" /usr/local/bin/node
+RUN yum install -y nodejs && \
+ yum clean all && rm -rf /var/cache/yum
+# setup Postgress
+RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8 && \
+ su - postgres -c "/usr/pgsql-13/bin/initdb"
\ No newline at end of file
diff --git a/.cicd/platforms/pinned/macos-10.14-pinned.sh b/.cicd/platforms/pinned/macos-10.14-pinned.sh
index 779a566adb0..ad8baf25c73 100755
--- a/.cicd/platforms/pinned/macos-10.14-pinned.sh
+++ b/.cicd/platforms/pinned/macos-10.14-pinned.sh
@@ -2,89 +2,36 @@
set -eo pipefail
VERSION=1
brew update
-brew install git cmake python libtool libusb graphviz automake wget gmp llvm@7 pkgconfig doxygen openssl@1.1 jq || :
+brew install git cmake python libtool libusb graphviz automake wget gmp pkgconfig doxygen openssl@1.1 jq libpq postgres || :
# install clang from source
-git clone --single-branch --branch release_80 https://github.com/llvm-mirror/llvm.git clang8
-cd clang8
-git checkout 18e41dc
-sed -i.bak 's,https://github.com/llvm-mirror/,https://git.llvm.org/git/,g' .git/config
-cd tools
-git clone --single-branch --branch release_80 https://github.com/llvm-mirror/lld.git
-cd lld
-git checkout d60a035
-cd ../
-git clone --single-branch --branch release_80 https://github.com/llvm-mirror/polly.git
-cd polly
-git checkout 1bc06e5
-cd ../
-git clone --single-branch --branch release_80 https://github.com/llvm-mirror/clang.git clang
-cd clang
-git checkout a03da8b
-sed -i.bak 's,https://github.com/llvm-mirror/,https://git.llvm.org/git/,g' .git/config
-cd tools
-mkdir extra
-cd extra
-git clone --single-branch --branch release_80 https://github.com/llvm-mirror/clang-tools-extra.git
-cd clang-tools-extra
-git checkout 6b34834
-cd ../../../../../projects/
-git clone --single-branch --branch release_80 https://github.com/llvm-mirror/libcxx.git
-cd libcxx
-git checkout 1853712
-cd ../
-git clone --single-branch --branch release_80 https://github.com/llvm-mirror/libcxxabi.git
-cd libcxxabi
-git checkout d7338a4
-cd ../
-git clone --single-branch --branch release_80 https://github.com/llvm-mirror/libunwind.git
-cd libunwind
-git checkout 57f6739
-cd ../
-git clone --single-branch --branch release_80 https://github.com/llvm-mirror/compiler-rt.git
-cd compiler-rt
-git checkout 5bc7979
-mkdir ../../build
-cd ../../build
-cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX='/usr/local' -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Release ..
+git clone --single-branch --branch llvmorg-10.0.0 https://github.com/llvm/llvm-project clang10
+mkdir clang10/build
+cd clang10/build
+cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX='/usr/local' -DLLVM_ENABLE_PROJECTS='lld;polly;clang;clang-tools-extra;libcxx;libcxxabi;libunwind;compiler-rt' -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release ../llvm && \
make -j $(getconf _NPROCESSORS_ONLN)
sudo make install
cd ../..
-rm -rf clang8
+rm -rf clang10
# install boost from source
-# Boost Fix: eosio/install/bin/../include/c++/v1/stdlib.h:94:15: fatal error: 'stdlib.h' file not found
+## Boost Fix: eosio/install/bin/../include/c++/v1/stdlib.h:94:15: fatal error: 'stdlib.h' file not found
export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)"
-curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2
-tar -xjf boost_1_71_0.tar.bz2
-cd boost_1_71_0
+curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2
+tar -xjf boost_1_72_0.tar.bz2
+cd boost_1_72_0
./bootstrap.sh --prefix=/usr/local
sudo SDKROOT="$SDKROOT" ./b2 --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(getconf _NPROCESSORS_ONLN) install
cd ..
-sudo rm -rf boost_1_71_0.tar.bz2 boost_1_71_0
-# install mongoDB
-cd ~
-curl -OL https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-3.6.3.tgz
-tar -xzf mongodb-osx-ssl-x86_64-3.6.3.tgz
-rm -f mongodb-osx-ssl-x86_64-3.6.3.tgz
-ln -s ~/mongodb-osx-x86_64-3.6.3 ~/mongodb
-# install mongo-c-driver from source
-cd /tmp
-curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/1.13.0/mongo-c-driver-1.13.0.tar.gz
-tar -xzf mongo-c-driver-1.13.0.tar.gz
-cd mongo-c-driver-1.13.0
-mkdir -p cmake-build
-cd cmake-build
-cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX='/usr/local' -DENABLE_BSON=ON -DENABLE_SSL=DARWIN -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON -DENABLE_ICU=OFF -DENABLE_SASL=OFF -DENABLE_SNAPPY=OFF ..
-make -j $(getconf _NPROCESSORS_ONLN)
-sudo make install
-cd ../..
-rm mongo-c-driver-1.13.0.tar.gz
-# install mongo-cxx-driver from source
-cd /tmp
-curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o mongo-cxx-driver-r3.4.0.tar.gz
-tar -xzf mongo-cxx-driver-r3.4.0.tar.gz
-cd mongo-cxx-driver-r3.4.0/build
-cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX='/usr/local' ..
-make -j $(getconf _NPROCESSORS_ONLN) VERBOSE=1
-sudo make install
-cd ../..
-rm -f mongo-cxx-driver-r3.4.0.tar.gz
\ No newline at end of file
+sudo rm -rf boost_1_72_0.tar.bz2 boost_1_72_0
+
+# install libpqxx from source
+curl -L https://github.com/jtv/libpqxx/archive/7.2.1.tar.gz | tar zxvf -
+cd libpqxx-7.2.1
+cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DPostgreSQL_ROOT=/usr/local/opt/libpq -DSKIP_BUILD_TEST=ON -DCMAKE_BUILD_TYPE=Release -S . -B build
+cmake --build build && cmake --install build
+cd .. && rm -rf libpqxx-7.2.1
+
+# install nvm for ship_test
+cd ~ && brew install nvm && mkdir -p ~/.nvm && echo "export NVM_DIR=$HOME/.nvm" >> ~/.bash_profile && echo 'source $(brew --prefix nvm)/nvm.sh' >> ~/.bash_profile && cat ~/.bash_profile && source ~/.bash_profile && echo $NVM_DIR && nvm install --lts=dubnium
+# initialize postgres configuration files
+sudo rm -rf /usr/local/var/postgres
+initdb --locale=C -E UTF-8 /usr/local/var/postgres
diff --git a/.cicd/platforms/pinned/macos-10.15-pinned.sh b/.cicd/platforms/pinned/macos-10.15-pinned.sh
new file mode 100755
index 00000000000..1f7d043d5f4
--- /dev/null
+++ b/.cicd/platforms/pinned/macos-10.15-pinned.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+set -eo pipefail
+VERSION=1
+export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)"
+brew update
+brew install git cmake python libtool libusb graphviz automake wget gmp pkgconfig doxygen openssl jq postgres || :
+# install clang from source
+git clone --single-branch --branch llvmorg-10.0.0 https://github.com/llvm/llvm-project clang10
+mkdir clang10/build
+cd clang10/build
+cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX='/usr/local' -DLLVM_ENABLE_PROJECTS='lld;polly;clang;clang-tools-extra;libcxx;libcxxabi;libunwind;compiler-rt' -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release ../llvm && \
+make -j $(getconf _NPROCESSORS_ONLN)
+sudo make install
+cd ../..
+rm -rf clang10
+# install boost from source
+curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2
+tar -xjf boost_1_72_0.tar.bz2
+cd boost_1_72_0
+./bootstrap.sh --prefix=/usr/local
+sudo -E ./b2 --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(getconf _NPROCESSORS_ONLN) install
+cd ..
+sudo rm -rf boost_1_72_0.tar.bz2 boost_1_72_0
+
+# install libpqxx from source
+curl -L https://github.com/jtv/libpqxx/archive/7.2.1.tar.gz | tar zxvf -
+cd libpqxx-7.2.1
+cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DPostgreSQL_ROOT=/usr/local/opt/libpq -DSKIP_BUILD_TEST=ON -DCMAKE_BUILD_TYPE=Release -S . -B build
+cmake --build build && cmake --install build
+cd .. && rm -rf libpqxx-7.2.1
+
+# install nvm for ship_test
+cd ~ && brew install nvm && mkdir -p ~/.nvm && echo "export NVM_DIR=$HOME/.nvm" >> ~/.bash_profile && echo 'source $(brew --prefix nvm)/nvm.sh' >> ~/.bash_profile && cat ~/.bash_profile && source ~/.bash_profile && echo $NVM_DIR && nvm install --lts=dubnium
+# initialize postgres configuration files
+sudo rm -rf /usr/local/var/postgres
+initdb --locale=C -E UTF-8 /usr/local/var/postgres
diff --git a/.cicd/platforms/pinned/ubuntu-16.04-pinned.dockerfile b/.cicd/platforms/pinned/ubuntu-16.04-pinned.dockerfile
index 012e5ea4688..45d06c8bb11 100644
--- a/.cicd/platforms/pinned/ubuntu-16.04-pinned.dockerfile
+++ b/.cicd/platforms/pinned/ubuntu-16.04-pinned.dockerfile
@@ -4,79 +4,69 @@ ENV VERSION 1
RUN apt-get update && \
apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential git automake \
- libbz2-dev libssl-dev doxygen graphviz libgmp3-dev autotools-dev libicu-dev \
+ libbz2-dev libssl-dev doxygen graphviz libgmp3-dev autotools-dev \
python2.7 python2.7-dev python3 python3-dev autoconf libtool curl zlib1g-dev \
sudo ruby libusb-1.0-0-dev libcurl4-gnutls-dev pkg-config apt-transport-https vim-common jq
-# build cmake.
-RUN curl -LO https://cmake.org/files/v3.13/cmake-3.13.2.tar.gz && \
- tar -xzf cmake-3.13.2.tar.gz && \
- cd cmake-3.13.2 && \
+# build cmake
+RUN curl -LO https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3.16.2.tar.gz && \
+ tar -xzf cmake-3.16.2.tar.gz && \
+ cd cmake-3.16.2 && \
./bootstrap --prefix=/usr/local && \
make -j$(nproc) && \
make install && \
- cd / && \
- rm -rf cmake-3.13.2.tar.gz /cmake-3.13.2
-# build clang
-RUN git clone --single-branch --branch release_80 https://github.com/llvm-mirror/llvm.git clang8 && cd clang8 && git checkout 18e41dc && sed -i 's,https://github.com/llvm-mirror/,https://git.llvm.org/git/,g' .git/config && \
- cd tools && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/lld.git && cd lld && git checkout d60a035 && \
- cd ../ && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/polly.git && cd polly && git checkout 1bc06e5 && \
- cd ../ && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/clang.git clang && cd clang && git checkout a03da8b && sed -i 's,https://github.com/llvm-mirror/,https://git.llvm.org/git/,g' .git/config && \
- cd tools && mkdir extra && cd extra && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/clang-tools-extra.git && cd clang-tools-extra && git checkout 6b34834 && \
- cd /clang8/projects && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/libcxx.git && cd libcxx && git checkout 1853712 && \
- cd ../ && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/libcxxabi.git && cd libcxxabi && git checkout d7338a4 && \
- cd ../ && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/libunwind.git && cd libunwind && git checkout 57f6739 && \
- cd ../ && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/compiler-rt.git && cd compiler-rt && git checkout 5bc7979 && \
- mkdir /clang8/build && cd /clang8/build && \
- cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX='/usr/local' -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Release .. && \
+ rm -rf cmake-3.16.2.tar.gz cmake-3.16.2
+# build clang10
+RUN git clone --single-branch --branch llvmorg-10.0.0 https://github.com/llvm/llvm-project clang10 && \
+ mkdir /clang10/build && cd /clang10/build && \
+ cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX='/usr/local' -DLLVM_ENABLE_PROJECTS='lld;polly;clang;clang-tools-extra;libcxx;libcxxabi;libunwind;compiler-rt' -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release ../llvm && \
make -j $(nproc) && \
make install && \
cd / && \
- rm -rf /clang8
+ rm -rf /clang10
COPY ./.cicd/helpers/clang.make /tmp/clang.cmake
-# build llvm8
-RUN git clone --depth 1 --single-branch --branch release_80 https://github.com/llvm-mirror/llvm.git llvm && \
- cd llvm && \
+# build llvm10
+RUN git clone --depth 1 --single-branch --branch llvmorg-10.0.0 https://github.com/llvm/llvm-project llvm && \
+ cd llvm/llvm && \
mkdir build && \
cd build && \
- cmake -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_TOOLCHAIN_FILE='/tmp/clang.cmake' -DCMAKE_EXE_LINKER_FLAGS=-pthread -DCMAKE_SHARED_LINKER_FLAGS=-pthread -DLLVM_ENABLE_PIC=NO .. && \
+ cmake -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_TOOLCHAIN_FILE='/tmp/clang.cmake' -DCMAKE_EXE_LINKER_FLAGS=-pthread -DCMAKE_SHARED_LINKER_FLAGS=-pthread -DLLVM_ENABLE_PIC=NO -DLLVM_ENABLE_TERMINFO=OFF .. && \
make -j$(nproc) && \
make install && \
cd / && \
rm -rf /llvm
# build boost
-RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2 && \
- tar -xjf boost_1_71_0.tar.bz2 && \
- cd boost_1_71_0 && \
+RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 && \
+ tar -xjf boost_1_72_0.tar.bz2 && \
+ cd boost_1_72_0 && \
./bootstrap.sh --with-toolset=clang --prefix=/usr/local && \
./b2 toolset=clang cxxflags='-stdlib=libc++ -D__STRICT_ANSI__ -nostdinc++ -I/usr/local/include/c++/v1 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fpie' linkflags='-stdlib=libc++ -pie' link=static threading=multi --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(nproc) install && \
cd / && \
- rm -rf boost_1_71_0.tar.bz2 /boost_1_71_0
-# build mongodb
-RUN curl -LO http://downloads.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-3.6.3.tgz && \
- tar -xzf mongodb-linux-x86_64-ubuntu1604-3.6.3.tgz && \
- rm -f mongodb-linux-x86_64-ubuntu1604-3.6.3.tgz
-# build mongodb c driver
-RUN curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/1.13.0/mongo-c-driver-1.13.0.tar.gz && \
- tar -xzf mongo-c-driver-1.13.0.tar.gz && \
- cd mongo-c-driver-1.13.0 && \
- mkdir -p build && \
- cd build && \
- cmake --DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON -DCMAKE_TOOLCHAIN_FILE='/tmp/clang.cmake' .. && \
- make -j$(nproc) && \
- make install && \
- cd / && \
- rm -rf mongo-c-driver-1.13.0.tar.gz /mongo-c-driver-1.13.0
-# build mongodb cxx driver
-RUN curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o mongo-cxx-driver-r3.4.0.tar.gz && \
- tar -xzf mongo-cxx-driver-r3.4.0.tar.gz && \
- cd mongo-cxx-driver-r3.4.0 && \
- sed -i 's/\"maxAwaitTimeMS\", count/\"maxAwaitTimeMS\", static_cast(count)/' src/mongocxx/options/change_stream.cpp && \
- sed -i 's/add_subdirectory(test)//' src/mongocxx/CMakeLists.txt src/bsoncxx/CMakeLists.txt && \
- cd build && \
- cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_TOOLCHAIN_FILE='/tmp/clang.cmake' .. && \
- make -j$(nproc) && \
- make install && \
- cd / && \
- rm -rf mongo-cxx-driver-r3.4.0.tar.gz /mongo-cxx-driver-r3.4.0
-# add mongodb to path
-ENV PATH=${PATH}:/mongodb-linux-x86_64-ubuntu1604-3.6.3/bin
\ No newline at end of file
+ rm -rf boost_1_72_0.tar.bz2 /boost_1_72_0
+# install libpq, postgresql-13
+ENV TZ=America/Chicago
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
+ echo "deb http://apt.postgresql.org/pub/repos/apt xenial-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
+ curl -sL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
+ apt-get update && apt-get -y install libpq-dev postgresql-13 && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
+# build libpqxx
+RUN curl -L https://github.com/jtv/libpqxx/archive/7.2.1.tar.gz | tar zxvf - && \
+ cd libpqxx-7.2.1 && \
+ cmake -DCMAKE_TOOLCHAIN_FILE=/tmp/clang.cmake -DSKIP_BUILD_TEST=ON -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql -DCMAKE_BUILD_TYPE=Release -S . -B build && \
+ cmake --build build && cmake --install build && \
+ cd .. && rm -rf libpqxx-7.2.1
+#install nvm
+RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
+# load nvm in non-interactive shells
+RUN cp ~/.bashrc ~/.bashrc.bak && \
+ cat ~/.bashrc.bak | tail -3 > ~/.bashrc && \
+ cat ~/.bashrc.bak | head -n '-3' >> ~/.bashrc && \
+ rm ~/.bashrc.bak
+# install node 10
+RUN bash -c '. ~/.bashrc; nvm install --lts=dubnium' && \
+ ln -s "/root/.nvm/versions/node/$(ls -p /root/.nvm/versions/node | sort -Vr | head -1)bin/node" /usr/local/bin/node
+RUN curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
+RUN apt-get update && apt-get install -y nodejs && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
diff --git a/.cicd/platforms/pinned/ubuntu-18.04-pinned.dockerfile b/.cicd/platforms/pinned/ubuntu-18.04-pinned.dockerfile
index b76efc04dd4..b41f3e2176a 100644
--- a/.cicd/platforms/pinned/ubuntu-18.04-pinned.dockerfile
+++ b/.cicd/platforms/pinned/ubuntu-18.04-pinned.dockerfile
@@ -5,80 +5,74 @@ RUN apt-get update && \
apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y git make \
bzip2 automake libbz2-dev libssl-dev doxygen graphviz libgmp3-dev \
- autotools-dev libicu-dev python2.7 python2.7-dev python3 \
+ autotools-dev python2.7 python2.7-dev python3 \
python3-dev python-configparser python-requests python-pip \
- autoconf libtool g++ gcc curl zlib1g-dev sudo ruby libusb-1.0-0-dev \
- libcurl4-gnutls-dev pkg-config patch vim-common jq
-# build cmake.
-RUN curl -LO https://cmake.org/files/v3.13/cmake-3.13.2.tar.gz && \
- tar -xzf cmake-3.13.2.tar.gz && \
- cd cmake-3.13.2 && \
+ autoconf libtool g++ gcc curl zlib1g-dev sudo ruby libusb-1.0-0-dev\
+ libcurl4-gnutls-dev pkg-config patch vim-common jq && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
+# build cmake
+RUN curl -LO https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3.16.2.tar.gz && \
+ tar -xzf cmake-3.16.2.tar.gz && \
+ cd cmake-3.16.2 && \
./bootstrap --prefix=/usr/local && \
make -j$(nproc) && \
make install && \
- cd / && \
- rm -rf cmake-3.13.2.tar.gz /cmake-3.13.2
-# build clang8
-RUN git clone --single-branch --branch release_80 https://github.com/llvm-mirror/llvm.git clang8 && cd clang8 && git checkout 18e41dc && sed -i 's,https://github.com/llvm-mirror/,https://git.llvm.org/git/,g' .git/config && \
- cd tools && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/lld.git && cd lld && git checkout d60a035 && \
- cd ../ && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/polly.git && cd polly && git checkout 1bc06e5 && \
- cd ../ && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/clang.git clang && cd clang && git checkout a03da8b && sed -i 's,https://github.com/llvm-mirror/,https://git.llvm.org/git/,g' .git/config && \
- cd tools && mkdir extra && cd extra && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/clang-tools-extra.git && cd clang-tools-extra && git checkout 6b34834 && \
- cd /clang8/projects && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/libcxx.git && cd libcxx && git checkout 1853712 && \
- cd ../ && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/libcxxabi.git && cd libcxxabi && git checkout d7338a4 && \
- cd ../ && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/libunwind.git && cd libunwind && git checkout 57f6739 && \
- cd ../ && git clone --single-branch --branch release_80 https://github.com/llvm-mirror/compiler-rt.git && cd compiler-rt && git checkout 5bc7979 && \
- mkdir /clang8/build && cd /clang8/build && \
- cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX='/usr/local' -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Release .. && \
+ rm -rf cmake-3.16.2.tar.gz cmake-3.16.2
+
+# build clang10
+RUN git clone --single-branch --branch llvmorg-10.0.0 https://github.com/llvm/llvm-project clang10 && \
+ mkdir /clang10/build && cd /clang10/build && \
+ cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX='/usr/local' -DLLVM_ENABLE_PROJECTS='lld;polly;clang;clang-tools-extra;libcxx;libcxxabi;libunwind;compiler-rt' -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release ../llvm && \
make -j $(nproc) && \
make install && \
cd / && \
- rm -rf /clang8
+ rm -rf /clang10
COPY ./.cicd/helpers/clang.make /tmp/clang.cmake
-# build llvm8
-RUN git clone --depth 1 --single-branch --branch release_80 https://github.com/llvm-mirror/llvm.git llvm && \
- cd llvm && \
+# build llvm10
+RUN git clone --depth 1 --single-branch --branch llvmorg-10.0.0 https://github.com/llvm/llvm-project llvm && \
+ cd llvm/llvm && \
mkdir build && \
cd build && \
- cmake -G 'Unix Makefiles' -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_TOOLCHAIN_FILE='/tmp/clang.cmake' -DCMAKE_EXE_LINKER_FLAGS=-pthread -DCMAKE_SHARED_LINKER_FLAGS=-pthread -DLLVM_ENABLE_PIC=NO .. && \
+ cmake -G 'Unix Makefiles' -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_TOOLCHAIN_FILE='/tmp/clang.cmake' -DCMAKE_EXE_LINKER_FLAGS=-pthread -DCMAKE_SHARED_LINKER_FLAGS=-pthread -DLLVM_ENABLE_PIC=NO -DLLVM_ENABLE_TERMINFO=OFF .. && \
make -j$(nproc) && \
make install && \
cd / && \
rm -rf /llvm
# build boost
-RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2 && \
- tar -xjf boost_1_71_0.tar.bz2 && \
- cd boost_1_71_0 && \
+RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 && \
+ tar -xjf boost_1_72_0.tar.bz2 && \
+ cd boost_1_72_0 && \
./bootstrap.sh --with-toolset=clang --prefix=/usr/local && \
./b2 toolset=clang cxxflags='-stdlib=libc++ -D__STRICT_ANSI__ -nostdinc++ -I/usr/local/include/c++/v1 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fpie' linkflags='-stdlib=libc++ -pie' link=static threading=multi --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(nproc) install && \
cd / && \
- rm -rf boost_1_71_0.tar.bz2 /boost_1_71_0
-# build mongodb
-RUN curl -LO http://downloads.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-4.1.1.tgz && \
- tar -xzf mongodb-linux-x86_64-ubuntu1804-4.1.1.tgz && \
- rm -f mongodb-linux-x86_64-ubuntu1804-4.1.1.tgz
-# build mongodb c driver
-RUN curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/1.13.0/mongo-c-driver-1.13.0.tar.gz && \
- tar -xzf mongo-c-driver-1.13.0.tar.gz && \
- cd mongo-c-driver-1.13.0 && \
- mkdir -p build && \
- cd build && \
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON -DCMAKE_TOOLCHAIN_FILE='/tmp/clang.cmake' .. && \
- make -j$(nproc) && \
- make install && \
- cd / && \
- rm -rf mongo-c-driver-1.13.0.tar.gz /mongo-c-driver-1.13.0
-# build mongodb cxx driver
-RUN curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o mongo-cxx-driver-r3.4.0.tar.gz && \
- tar -xzf mongo-cxx-driver-r3.4.0.tar.gz && \
- cd mongo-cxx-driver-r3.4.0 && \
- sed -i 's/\"maxAwaitTimeMS\", count/\"maxAwaitTimeMS\", static_cast(count)/' src/mongocxx/options/change_stream.cpp && \
- sed -i 's/add_subdirectory(test)//' src/mongocxx/CMakeLists.txt src/bsoncxx/CMakeLists.txt && \
- cd build && \
- cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_TOOLCHAIN_FILE='/tmp/clang.cmake' .. && \
- make -j$(nproc) && \
- make install && \
- cd / && \
- rm -rf mongo-cxx-driver-r3.4.0.tar.gz /mongo-cxx-driver-r3.4.0
-# add mongodb to path
-ENV PATH=${PATH}:/mongodb-linux-x86_64-ubuntu1804-4.1.1/bin
\ No newline at end of file
+ rm -rf boost_1_72_0.tar.bz2 /boost_1_72_0
+# install libpq, postgresql-13
+ENV TZ=America/Chicago
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
+ echo "deb http://apt.postgresql.org/pub/repos/apt bionic-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
+ curl -sL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
+ apt-get update && apt-get -y install libpq-dev postgresql-13 && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
+#build libpqxx
+RUN curl -L https://github.com/jtv/libpqxx/archive/7.2.1.tar.gz | tar zxvf - && \
+ cd libpqxx-7.2.1 && \
+ cmake -DCMAKE_TOOLCHAIN_FILE=/tmp/clang.cmake -DSKIP_BUILD_TEST=ON -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql -DCMAKE_BUILD_TYPE=Release -S . -B build && \
+ cmake --build build && cmake --install build && \
+ cd .. && rm -rf libpqxx-7.2.1
+
+# install nvm
+RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
+# load nvm in non-interactive shells
+RUN cp ~/.bashrc ~/.bashrc.bak && \
+ cat ~/.bashrc.bak | tail -3 > ~/.bashrc && \
+ cat ~/.bashrc.bak | head -n '-3' >> ~/.bashrc && \
+ rm ~/.bashrc.bak
+# install node 10
+RUN bash -c '. ~/.bashrc; nvm install --lts=dubnium' && \
+ ln -s "/root/.nvm/versions/node/$(ls -p /root/.nvm/versions/node | sort -Vr | head -1)bin/node" /usr/local/bin/node
+RUN curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
+RUN apt-get update && apt-get install -y nodejs && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
\ No newline at end of file
diff --git a/.cicd/platforms/pinned/ubuntu-20.04-pinned.dockerfile b/.cicd/platforms/pinned/ubuntu-20.04-pinned.dockerfile
new file mode 100644
index 00000000000..9762e0e6fe4
--- /dev/null
+++ b/.cicd/platforms/pinned/ubuntu-20.04-pinned.dockerfile
@@ -0,0 +1,72 @@
+FROM ubuntu:20.04
+ENV VERSION 1
+# install dependencies.
+RUN apt-get update && \
+ apt-get upgrade -y && \
+ DEBIAN_FRONTEND=noninteractive apt-get install -y git make \
+ bzip2 automake libbz2-dev libssl-dev doxygen graphviz libgmp3-dev \
+ autotools-dev python2.7 python2.7-dev python3 \
+ python3-dev python-configparser \
+ autoconf libtool g++ gcc curl zlib1g-dev sudo ruby libusb-1.0-0-dev \
+ libcurl4-gnutls-dev pkg-config patch vim-common jq gnupg && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
+
+# build cmake
+RUN curl -LO https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3.16.2.tar.gz && \
+ tar -xzf cmake-3.16.2.tar.gz && \
+ cd cmake-3.16.2 && \
+ ./bootstrap --prefix=/usr/local && \
+ make -j$(nproc) && \
+ make install && \
+ rm -rf cmake-3.16.2.tar.gz cmake-3.16.2
+# build clang10
+RUN git clone --single-branch --branch llvmorg-10.0.0 https://github.com/llvm/llvm-project clang10 && \
+ mkdir /clang10/build && cd /clang10/build && \
+ cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX='/usr/local' -DLLVM_ENABLE_PROJECTS='lld;polly;clang;clang-tools-extra;libcxx;libcxxabi;libunwind;compiler-rt' -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release ../llvm && \
+ make -j $(nproc) && \
+ make install && \
+ cd / && \
+ rm -rf /clang10
+COPY ./.cicd/helpers/clang.make /tmp/clang.cmake
+# build llvm10
+RUN git clone --depth 1 --single-branch --branch llvmorg-10.0.0 https://github.com/llvm/llvm-project llvm && \
+ cd llvm/llvm && \
+ mkdir build && \
+ cd build && \
+ cmake -G 'Unix Makefiles' -DLLVM_TARGETS_TO_BUILD=host -DLLVM_BUILD_TOOLS=false -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_TOOLCHAIN_FILE='/tmp/clang.cmake' -DCMAKE_EXE_LINKER_FLAGS=-pthread -DCMAKE_SHARED_LINKER_FLAGS=-pthread -DLLVM_ENABLE_PIC=NO -DLLVM_ENABLE_TERMINFO=OFF .. && \
+ make -j$(nproc) && \
+ make install && \
+ cd / && \
+ rm -rf /llvm
+# install libpq postgresql
+ENV TZ=America/Chicago
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
+ echo "deb http://apt.postgresql.org/pub/repos/apt focal-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
+ curl -sL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
+ apt-get update && apt-get -y install libpq-dev postgresql-13 && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
+#build libpqxx
+RUN curl -L https://github.com/jtv/libpqxx/archive/7.2.1.tar.gz | tar zxvf - && \
+ cd libpqxx-7.2.1 && \
+ cmake -DCMAKE_TOOLCHAIN_FILE=/tmp/clang.cmake -DSKIP_BUILD_TEST=ON -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql -DCMAKE_BUILD_TYPE=Release -S . -B build && \
+ cmake --build build && cmake --install build && \
+ cd .. && rm -rf libpqxx-7.2.1
+# build boost
+RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 && \
+ tar -xjf boost_1_72_0.tar.bz2 && \
+ cd boost_1_72_0 && \
+ ./bootstrap.sh --with-toolset=clang --prefix=/usr/local && \
+ ./b2 toolset=clang cxxflags='-stdlib=libc++ -D__STRICT_ANSI__ -nostdinc++ -I/usr/local/include/c++/v1 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fpie' linkflags='-stdlib=libc++ -pie' link=static threading=multi --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(nproc) install && \
+ cd / && \
+ rm -rf boost_1_72_0.tar.bz2 /boost_1_72_0
+# install node 12
+RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
+ . /etc/lsb-release && \
+ echo "deb https://deb.nodesource.com/node_12.x $DISTRIB_CODENAME main" | tee /etc/apt/sources.list.d/nodesource.list && \
+ echo "deb-src https://deb.nodesource.com/node_12.x $DISTRIB_CODENAME main" | tee -a /etc/apt/sources.list.d/nodesource.list && \
+ apt-get update && \
+ apt-get install -y nodejs && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
diff --git a/.cicd/platforms/unpinned/amazon_linux-2-unpinned.dockerfile b/.cicd/platforms/unpinned/amazon_linux-2-unpinned.dockerfile
index 38af1dbb519..00a9004932e 100644
--- a/.cicd/platforms/unpinned/amazon_linux-2-unpinned.dockerfile
+++ b/.cicd/platforms/unpinned/amazon_linux-2-unpinned.dockerfile
@@ -5,16 +5,15 @@ RUN yum update -y && \
yum install -y which git sudo procps-ng util-linux autoconf automake \
libtool make bzip2 bzip2-devel openssl-devel gmp-devel libstdc++ libcurl-devel \
libusbx-devel python3 python3-devel python-devel libedit-devel doxygen \
- graphviz clang patch llvm-devel llvm-static vim-common jq
-# build cmake.
-RUN curl -LO https://cmake.org/files/v3.13/cmake-3.13.2.tar.gz && \
- tar -xzf cmake-3.13.2.tar.gz && \
- cd cmake-3.13.2 && \
+ graphviz clang patch llvm-devel llvm-static vim-common jq && \
+ yum clean all && rm -rf /var/cache/yum
+RUN curl -LO https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3.16.2.tar.gz && \
+ tar -xzf cmake-3.16.2.tar.gz && \
+ cd cmake-3.16.2 && \
./bootstrap --prefix=/usr/local && \
make -j$(nproc) && \
make install && \
- cd / && \
- rm -rf cmake-3.13.2.tar.gz /cmake-3.13.2
+ rm -rf cmake-3.16.2.tar.gz cmake-3.16.2
# build boost
RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2 && \
tar -xjf boost_1_71_0.tar.bz2 && \
@@ -23,32 +22,25 @@ RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/bo
./b2 --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(nproc) install && \
cd / && \
rm -rf boost_1_71_0.tar.bz2 /boost_1_71_0
-# build mongodb
-RUN curl -LO https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-3.6.3.tgz && \
- tar -xzf mongodb-linux-x86_64-amazon-3.6.3.tgz && \
- rm -f mongodb-linux-x86_64-amazon-3.6.3.tgz
-# build mongodb c driver
-RUN curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/1.13.0/mongo-c-driver-1.13.0.tar.gz && \
- tar -xzf mongo-c-driver-1.13.0.tar.gz && \
- cd mongo-c-driver-1.13.0 && \
- mkdir -p build && \
- cd build && \
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON -DENABLE_ICU=OFF -DENABLE_SNAPPY=OFF .. && \
- make -j$(nproc) && \
- make install && \
- cd / && \
- rm -rf mongo-c-driver-1.13.0.tar.gz /mongo-c-driver-1.13.0
-# build mongodb cxx driver
-RUN curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o mongo-cxx-driver-r3.4.0.tar.gz && \
- tar -xzf mongo-cxx-driver-r3.4.0.tar.gz && \
- cd mongo-cxx-driver-r3.4.0 && \
- sed -i 's/\"maxAwaitTimeMS\", count/\"maxAwaitTimeMS\", static_cast(count)/' src/mongocxx/options/change_stream.cpp && \
- sed -i 's/add_subdirectory(test)//' src/mongocxx/CMakeLists.txt src/bsoncxx/CMakeLists.txt && \
- cd build && \
- cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local .. && \
- make -j$(nproc) && \
- make install && \
- cd / && \
- rm -rf mongo-cxx-driver-r3.4.0.tar.gz /mongo-cxx-driver-r3.4.0
-# add mongodb to path
-ENV PATH=${PATH}:/mongodb-linux-x86_64-amazon-3.6.3/bin
\ No newline at end of file
+#install libpq
+RUN amazon-linux-extras enable postgresql11 && \
+ yum install -y libpq-devel postgresql-server && \
+ yum clean all && rm -rf /var/cache/yum
+#build libpqxx
+RUN curl -L https://github.com/jtv/libpqxx/archive/7.2.1.tar.gz | tar zxvf - && \
+ cd libpqxx-7.2.1 && \
+ cmake -DSKIP_BUILD_TEST=ON -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/libpq -DCMAKE_BUILD_TYPE=Release -S . -B build && \
+ cmake --build build && cmake --install build && \
+ cd .. && rm -rf libpqxx-7.2.1
+ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
+# install nvm
+RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
+# load nvm in non-interactive shells
+RUN echo 'export NVM_DIR="$HOME/.nvm"' > ~/.bashrc && \
+ echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> ~/.bashrc
+# install node 10
+RUN bash -c '. ~/.bashrc; nvm install --lts=dubnium' && \
+ ln -s "/root/.nvm/versions/node/$(ls -p /root/.nvm/versions/node | sort -Vr | head -1)bin/node" /usr/local/bin/node && \
+ ln -s "/root/.nvm/versions/node/$(ls -p /root/.nvm/versions/node | sort -Vr | head -1)bin/npm" /usr/local/bin/npm
+# setup Postgress
+RUN su - postgres -c "/usr/bin/initdb"
\ No newline at end of file
diff --git a/.cicd/platforms/unpinned/centos-7.7-unpinned.dockerfile b/.cicd/platforms/unpinned/centos-7.7-unpinned.dockerfile
index 91c243170b5..42f557efdf2 100644
--- a/.cicd/platforms/unpinned/centos-7.7-unpinned.dockerfile
+++ b/.cicd/platforms/unpinned/centos-7.7-unpinned.dockerfile
@@ -6,20 +6,20 @@ RUN yum update -y && \
yum --enablerepo=extras install -y centos-release-scl && \
yum --enablerepo=extras install -y devtoolset-8 && \
yum --enablerepo=extras install -y which git autoconf automake libtool make bzip2 doxygen \
- graphviz bzip2-devel openssl-devel gmp-devel ocaml libicu-devel \
- python python-devel rh-python36 gettext-devel file libusbx-devel \
- libcurl-devel patch vim-common jq llvm-toolset-7.0-llvm-devel llvm-toolset-7.0-llvm-static
-# build cmake.
-RUN curl -LO https://cmake.org/files/v3.13/cmake-3.13.2.tar.gz && \
+ graphviz bzip2-devel openssl-devel gmp-devel ocaml \
+ python python-devel rh-python36 file libusbx-devel \
+ libcurl-devel patch vim-common jq llvm-toolset-7.0-llvm-devel llvm-toolset-7.0-llvm-static \
+ glibc-locale-source glibc-langpack-en && \
+ yum clean all && rm -rf /var/cache/yum
+# build cmake
+RUN curl -LO https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3.16.2.tar.gz && \
+ tar -xzf cmake-3.16.2.tar.gz && \
+ cd cmake-3.16.2 && \
source /opt/rh/devtoolset-8/enable && \
- source /opt/rh/rh-python36/enable && \
- tar -xzf cmake-3.13.2.tar.gz && \
- cd cmake-3.13.2 && \
./bootstrap --prefix=/usr/local && \
make -j$(nproc) && \
make install && \
- cd / && \
- rm -rf cmake-3.13.2.tar.gz /cmake-3.13.2
+ rm -rf cmake-3.16.2.tar.gz cmake-3.16.2
# build boost
RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2 && \
source /opt/rh/devtoolset-8/enable && \
@@ -30,36 +30,31 @@ RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/bo
./b2 --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(nproc) install && \
cd / && \
rm -rf boost_1_71_0.tar.bz2 /boost_1_71_0
-# build mongodb
-RUN curl -LO https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-3.6.3.tgz && \
- tar -xzf mongodb-linux-x86_64-amazon-3.6.3.tgz && \
- rm -f mongodb-linux-x86_64-amazon-3.6.3.tgz
-# build mongodb c driver
-RUN curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/1.13.0/mongo-c-driver-1.13.0.tar.gz && \
+#install libpq postgresql-server
+RUN yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm && \
+ yum install -y postgresql13-devel postgresql13-server && \
+ yum clean all && rm -rf /var/cache/yum
+ENV PostgreSQL_ROOT=/usr/pgsql-13
+ENV PKG_CONFIG_PATH=/usr/pgsql-13/lib/pkgconfig:/usr/local/lib64/pkgconfig
+#build libpqxx
+RUN curl -L https://github.com/jtv/libpqxx/archive/7.2.1.tar.gz | tar zxvf - && \
+ cd libpqxx-7.2.1 && \
source /opt/rh/devtoolset-8/enable && \
- source /opt/rh/rh-python36/enable && \
- tar -xzf mongo-c-driver-1.13.0.tar.gz && \
- cd mongo-c-driver-1.13.0 && \
- mkdir -p build && \
- cd build && \
- cmake --DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON -DENABLE_ICU=OFF -DENABLE_SNAPPY=OFF .. && \
- make -j$(nproc) && \
- make install && \
- cd / && \
- rm -rf mongo-c-driver-1.13.0.tar.gz /mongo-c-driver-1.13.0
-# build mongodb cxx driver
-RUN curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o mongo-cxx-driver-r3.4.0.tar.gz && \
- source /opt/rh/devtoolset-8/enable && \
- source /opt/rh/rh-python36/enable && \
- tar -xzf mongo-cxx-driver-r3.4.0.tar.gz && \
- cd mongo-cxx-driver-r3.4.0 && \
- sed -i 's/\"maxAwaitTimeMS\", ount/\"maxAwaitTimeMS\", static_cast(count)/' src/mongocxx/options/change_stream.cpp && \
- sed -i 's/add_subdirectory(test)//' src/mongocxx/CMakeLists.txt src/bsoncxx/CMakeLists.txt && \
- cd build && \
- cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local .. && \
- make -j$(nproc) && \
- make install && \
- cd / && \
- rm -rf mongo-cxx-driver-r3.4.0.tar.gz /mongo-cxx-driver-r3.4.0
-# add mongodb to path
-ENV PATH=${PATH}:/mongodb-linux-x86_64-amazon-3.6.3/bin
\ No newline at end of file
+ cmake -DSKIP_BUILD_TEST=ON -DCMAKE_BUILD_TYPE=Release -S . -B build && \
+ cmake --build build && cmake --install build && \
+ cd .. && rm -rf libpqxx-7.2.1
+# install nvm
+RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
+# load nvm in non-interactive shells
+RUN cp ~/.bashrc ~/.bashrc.bak && \
+ cat ~/.bashrc.bak | tail -3 > ~/.bashrc && \
+ cat ~/.bashrc.bak | head -n '-3' >> ~/.bashrc && \
+ rm ~/.bashrc.bak
+# install node 10
+RUN bash -c '. ~/.bashrc; nvm install --lts=dubnium' && \
+ ln -s "/root/.nvm/versions/node/$(ls -p /root/.nvm/versions/node | sort -Vr | head -1)bin/node" /usr/local/bin/node
+RUN yum install -y nodejs && \
+ yum clean all && rm -rf /var/cache/yum
+# setup Postgress
+RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8 && \
+ su - postgres -c "/usr/pgsql-13/bin/initdb"
\ No newline at end of file
diff --git a/.cicd/platforms/unpinned/centos-8-unpinned.dockerfile b/.cicd/platforms/unpinned/centos-8-unpinned.dockerfile
new file mode 100644
index 00000000000..e52a324cd2e
--- /dev/null
+++ b/.cicd/platforms/unpinned/centos-8-unpinned.dockerfile
@@ -0,0 +1,59 @@
+FROM centos:8
+ENV VERSION 1
+#install dependencies
+RUN yum update -y && \
+ yum install -y epel-release && \
+ yum --enablerepo=extras install -y which git autoconf automake libtool make bzip2 && \
+ yum --enablerepo=extras install -y graphviz bzip2-devel openssl-devel gmp-devel && \
+ yum --enablerepo=extras install -y file libusbx-devel && \
+ yum --enablerepo=extras install -y libcurl-devel patch vim-common jq && \
+ yum install -y python3 python3-devel clang llvm-devel llvm-static procps-ng util-linux sudo libstdc++ \
+ glibc-locale-source glibc-langpack-en && \
+ yum clean all && rm -rf /var/cache/yum
+RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
+ dnf group install -y "Development Tools" && \
+ dnf --enablerepo=powertools install -y doxygen ocaml
+# cmake3.18.0
+RUN curl -LO https://github.com/Kitware/CMake/releases/download/v3.18.0/cmake-3.18.0.tar.gz && \
+ tar -xzf cmake-3.18.0.tar.gz && \
+ cd cmake-3.18.0 && \
+ ./bootstrap --prefix=/usr/local && \
+ make -j$(nproc) && make install && \
+ rm -rf cmake-3.18.0.tar.gz cmake-3.18.2
+# build boost
+RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 && \
+ tar -xjf boost_1_72_0.tar.bz2 && \
+ cd boost_1_72_0 && \
+ ./bootstrap.sh --prefix=/usr/local && \
+ ./b2 --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(nproc) install && \
+ cd / && \
+ rm -rf boost_1_72_0.tar.bz2 /boost_1_72_0
+# install libpq & postgres
+RUN dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm && \
+ dnf -qy module disable postgresql && \
+ dnf install -y postgresql13-devel postgresql13-server \
+ && dnf clean all && rm -rf /var/cache/yum
+ENV PostgreSQL_ROOT=/usr/pgsql-13
+ENV PKG_CONFIG_PATH=/usr/pgsql-13/lib/pkgconfig:/usr/local/lib64/pkgconfig
+#build libpqxx
+RUN curl -L https://github.com/jtv/libpqxx/archive/7.2.1.tar.gz | tar zxvf - && \
+ cd libpqxx-7.2.1 && \
+ cmake -DSKIP_BUILD_TEST=ON -DCMAKE_BUILD_TYPE=Release -S . -B build && \
+ cmake --build build && cmake --install build && \
+ cd .. && rm -rf libpqxx-7.2.1
+# install nvm
+RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
+# load nvm in non-interactive shells
+RUN cp ~/.bashrc ~/.bashrc.bak && \
+ cat ~/.bashrc.bak | tail -3 > ~/.bashrc && \
+ cat ~/.bashrc.bak | head -n '-3' >> ~/.bashrc && \
+ rm ~/.bashrc.bak
+# install node 10
+RUN bash -c '. ~/.bashrc; nvm install --lts=dubnium' && \
+ ln -s "/root/.nvm/versions/node/$(ls -p /root/.nvm/versions/node | sort -Vr | head -1)bin/node" /usr/local/bin/node
+RUN yum install -y nodejs && \
+ yum clean all && rm -rf /var/cache/yum
+RUN ln -s /usr/lib64/libtinfo.so.6 /usr/local/lib/libtinfo.so
+# setup Postgress
+RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8 && \
+ su - postgres -c "/usr/pgsql-13/bin/initdb"
\ No newline at end of file
diff --git a/.cicd/platforms/unpinned/macos-10.14-unpinned.sh b/.cicd/platforms/unpinned/macos-10.14-unpinned.sh
index 79992322746..08fcdea7f54 100755
--- a/.cicd/platforms/unpinned/macos-10.14-unpinned.sh
+++ b/.cicd/platforms/unpinned/macos-10.14-unpinned.sh
@@ -2,34 +2,12 @@
set -eo pipefail
VERSION=1
brew update
-brew install git icu4c python libtool libusb graphviz automake wget gmp llvm@7 pkgconfig doxygen openssl@1.1 cmake jq || :
-curl -LO https://raw.githubusercontent.com/Homebrew/homebrew-core/0b9ee3127763e8ebce62599bae85f37ab1687622/Formula/boost.rb
-brew install -f boost.rb
-# install mongoDB
-cd ~
-curl -OL https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-3.6.3.tgz
-tar -xzf mongodb-osx-ssl-x86_64-3.6.3.tgz
-rm -f mongodb-osx-ssl-x86_64-3.6.3.tgz
-ln -s ~/mongodb-osx-x86_64-3.6.3 ~/mongodb
-# install mongo-c-driver from source
-cd /tmp
-curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/1.13.0/mongo-c-driver-1.13.0.tar.gz
-tar -xzf mongo-c-driver-1.13.0.tar.gz
-cd mongo-c-driver-1.13.0
-mkdir -p cmake-build
-cd cmake-build
-cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX='/usr/local' -DENABLE_BSON=ON -DENABLE_SSL=DARWIN -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON -DENABLE_ICU=OFF -DENABLE_SASL=OFF -DENABLE_SNAPPY=OFF ..
-make -j $(getconf _NPROCESSORS_ONLN)
-sudo make install
-cd ../..
-rm mongo-c-driver-1.13.0.tar.gz
-# install mongo-cxx-driver from source
-cd /tmp
-curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o mongo-cxx-driver-r3.4.0.tar.gz
-tar -xzf mongo-cxx-driver-r3.4.0.tar.gz
-cd mongo-cxx-driver-r3.4.0/build
-cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX='/usr/local' ..
-make -j $(getconf _NPROCESSORS_ONLN) VERBOSE=1
-sudo make install
-cd ../..
-rm -f mongo-cxx-driver-r3.4.0.tar.gz
\ No newline at end of file
+brew install git cmake python libtool libusb graphviz automake wget gmp pkgconfig doxygen openssl@1.1 jq boost libpq postgres || :
+# libpqxx 7.3+ installations on mojave try to import libs not present in the sdk. pin to libpqxx 7.2.1 instead.
+curl -LO https://raw.githubusercontent.com/Homebrew/homebrew-core/d14398187084e1d3fd1763ec13cea1044946a51f/Formula/libpqxx.rb
+brew install -f ./libpqxx.rb
+# install nvm for ship_test
+cd ~ && brew install nvm && mkdir -p ~/.nvm && echo "export NVM_DIR=$HOME/.nvm" >> ~/.bash_profile && echo 'source $(brew --prefix nvm)/nvm.sh' >> ~/.bash_profile && cat ~/.bash_profile && source ~/.bash_profile && echo $NVM_DIR && nvm install --lts=dubnium
+# initialize postgres configuration files
+sudo rm -rf /usr/local/var/postgres
+initdb --locale=C -E UTF-8 /usr/local/var/postgres
diff --git a/.cicd/platforms/unpinned/macos-10.15-unpinned.sh b/.cicd/platforms/unpinned/macos-10.15-unpinned.sh
new file mode 100755
index 00000000000..b1b79078349
--- /dev/null
+++ b/.cicd/platforms/unpinned/macos-10.15-unpinned.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+set -eo pipefail
+VERSION=1
+export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)"
+brew update
+brew install git cmake python libtool libusb graphviz automake wget gmp pkgconfig doxygen openssl jq boost libpq libpqxx postgres || :
+# install nvm for ship_test
+cd ~ && brew install nvm && mkdir -p ~/.nvm && echo "export NVM_DIR=$HOME/.nvm" >> ~/.bash_profile && echo 'source $(brew --prefix nvm)/nvm.sh' >> ~/.bash_profile && cat ~/.bash_profile && source ~/.bash_profile && echo $NVM_DIR && nvm install --lts=dubnium
+# initialize postgres configuration files
+sudo rm -rf /usr/local/var/postgres
+initdb --locale=C -E UTF-8 /usr/local/var/postgres
diff --git a/.cicd/platforms/unpinned/ubuntu-18.04-unpinned.dockerfile b/.cicd/platforms/unpinned/ubuntu-18.04-unpinned.dockerfile
index 36902c23f19..813549aef17 100644
--- a/.cicd/platforms/unpinned/ubuntu-18.04-unpinned.dockerfile
+++ b/.cicd/platforms/unpinned/ubuntu-18.04-unpinned.dockerfile
@@ -5,18 +5,19 @@ RUN apt-get update && \
apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y git make \
bzip2 automake libbz2-dev libssl-dev doxygen graphviz libgmp3-dev \
- autotools-dev libicu-dev python2.7 python2.7-dev python3 python3-dev \
+ autotools-dev python2.7 python2.7-dev python3 python3-dev \
autoconf libtool curl zlib1g-dev sudo ruby libusb-1.0-0-dev \
- libcurl4-gnutls-dev pkg-config patch llvm-7-dev clang-7 vim-common jq
-# build cmake.
-RUN curl -LO https://cmake.org/files/v3.13/cmake-3.13.2.tar.gz && \
- tar -xzf cmake-3.13.2.tar.gz && \
- cd cmake-3.13.2 && \
+ libcurl4-gnutls-dev pkg-config patch llvm-7-dev clang-7 vim-common jq && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
+# build cmake
+RUN curl -LO https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3.16.2.tar.gz && \
+ tar -xzf cmake-3.16.2.tar.gz && \
+ cd cmake-3.16.2 && \
./bootstrap --prefix=/usr/local && \
make -j$(nproc) && \
make install && \
- cd / && \
- rm -rf cmake-3.13.2.tar.gz /cmake-3.13.2
+ rm -rf cmake-3.16.2.tar.gz cmake-3.16.2
# build boost
RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2 && \
tar -xjf boost_1_71_0.tar.bz2 && \
@@ -25,32 +26,31 @@ RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/bo
./b2 --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -j$(nproc) install && \
cd / && \
rm -rf boost_1_71_0.tar.bz2 /boost_1_71_0
-# build mongodb
-RUN curl -LO http://downloads.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-4.1.1.tgz && \
- tar -xzf mongodb-linux-x86_64-ubuntu1804-4.1.1.tgz && \
- rm -f mongodb-linux-x86_64-ubuntu1804-4.1.1.tgz
-# build mongodb c driver
-RUN curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/1.13.0/mongo-c-driver-1.13.0.tar.gz && \
- tar -xzf mongo-c-driver-1.13.0.tar.gz && \
- cd mongo-c-driver-1.13.0 && \
- mkdir -p build && \
- cd build && \
- cmake --DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. && \
- make -j$(nproc) && \
- make install && \
- cd / && \
- rm -rf mongo-c-driver-1.13.0.tar.gz /mongo-c-driver-1.13.0
-# build mongodb cxx driver
-RUN curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o mongo-cxx-driver-r3.4.0.tar.gz && \
- tar -xzf mongo-cxx-driver-r3.4.0.tar.gz && \
- cd mongo-cxx-driver-r3.4.0 && \
- sed -i 's/\"maxAwaitTimeMS\", count/\"maxAwaitTimeMS\", static_cast(count)/' src/mongocxx/options/change_stream.cpp && \
- sed -i 's/add_subdirectory(test)//' src/mongocxx/CMakeLists.txt src/bsoncxx/CMakeLists.txt && \
- cd build && \
- cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local .. && \
- make -j$(nproc) && \
- make install && \
- cd / && \
- rm -rf mongo-cxx-driver-r3.4.0.tar.gz /mongo-cxx-driver-r3.4.0
-# add mongodb to path
-ENV PATH=${PATH}:/mongodb-linux-x86_64-ubuntu1804-4.1.1/bin
\ No newline at end of file
+# install libpq, postgresql-13
+ENV TZ=America/Chicago
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
+ echo "deb http://apt.postgresql.org/pub/repos/apt bionic-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
+ curl -sL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
+ apt-get update && apt-get -y install libpq-dev postgresql-13 && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
+#build libpqxx
+RUN curl -L https://github.com/jtv/libpqxx/archive/7.2.1.tar.gz | tar zxvf - && \
+ cd libpqxx-7.2.1 && \
+ cmake -DSKIP_BUILD_TEST=ON -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql -DCMAKE_BUILD_TYPE=Release -S . -B build && \
+ cmake --build build && cmake --install build && \
+ cd .. && rm -rf libpqxx-7.2.1
+# install nvm
+RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
+# load nvm in non-interactive shells
+RUN cp ~/.bashrc ~/.bashrc.bak && \
+ cat ~/.bashrc.bak | tail -3 > ~/.bashrc && \
+ cat ~/.bashrc.bak | head -n '-3' >> ~/.bashrc && \
+ rm ~/.bashrc.bak
+# install node 10
+RUN bash -c '. ~/.bashrc; nvm install --lts=dubnium' && \
+ ln -s "/root/.nvm/versions/node/$(ls -p /root/.nvm/versions/node | sort -Vr | head -1)bin/node" /usr/local/bin/node
+RUN curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
+RUN sudo apt-get install -y nodejs && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
diff --git a/.cicd/platforms/unpinned/ubuntu-20.04-unpinned.dockerfile b/.cicd/platforms/unpinned/ubuntu-20.04-unpinned.dockerfile
new file mode 100644
index 00000000000..384afc18868
--- /dev/null
+++ b/.cicd/platforms/unpinned/ubuntu-20.04-unpinned.dockerfile
@@ -0,0 +1,52 @@
+FROM ubuntu:20.04
+ENV VERSION 1
+# install dependencies.
+RUN apt-get update && \
+ apt-get upgrade -y && \
+ DEBIAN_FRONTEND=noninteractive apt-get install -y git make \
+ bzip2 automake libbz2-dev libssl-dev doxygen graphviz libgmp3-dev \
+ autotools-dev python2.7 python2.7-dev python3 python3-dev \
+ autoconf libtool curl zlib1g-dev sudo ruby libusb-1.0-0-dev \
+ libcurl4-gnutls-dev pkg-config patch llvm-7-dev clang-7 vim-common jq g++ gnupg && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
+
+# build cmake
+RUN curl -LO https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3.16.2.tar.gz && \
+ tar -xzf cmake-3.16.2.tar.gz && \
+ cd cmake-3.16.2 && \
+ ./bootstrap --prefix=/usr/local && \
+ make -j$(nproc) && \
+ make install && \
+ rm -rf cmake-3.16.2.tar.gz cmake-3.16.2
+# build boost
+RUN curl -LO https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2 && \
+ tar -xjf boost_1_71_0.tar.bz2 && \
+ cd boost_1_71_0 && \
+ ./bootstrap.sh --prefix=/usr/local && \
+ ./b2 --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -j$(nproc) install && \
+ cd / && \
+ rm -rf boost_1_71_0.tar.bz2 /boost_1_71_0
+# install libpq postgresql
+ENV TZ=America/Chicago
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
+ echo "deb http://apt.postgresql.org/pub/repos/apt focal-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
+ curl -sL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
+ apt-get update && apt-get -y install libpq-dev postgresql-13 && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
+#build libpqxx
+RUN curl -L https://github.com/jtv/libpqxx/archive/7.2.1.tar.gz | tar zxvf - && \
+ cd libpqxx-7.2.1 && \
+ cmake -DSKIP_BUILD_TEST=ON -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql -DCMAKE_BUILD_TYPE=Release -S . -B build && \
+ cmake --build build && cmake --install build && \
+ cd .. && rm -rf libpqxx-7.2.1
+# install node 12
+RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
+ . /etc/lsb-release && \
+ echo "deb https://deb.nodesource.com/node_12.x $DISTRIB_CODENAME main" | tee /etc/apt/sources.list.d/nodesource.list && \
+ echo "deb-src https://deb.nodesource.com/node_12.x $DISTRIB_CODENAME main" | tee -a /etc/apt/sources.list.d/nodesource.list && \
+ apt-get update && \
+ apt-get install -y nodejs && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
diff --git a/.cicd/submodule-regression-check.sh b/.cicd/submodule-regression-check.sh
index 35519a8a5c4..43e5af69803 100755
--- a/.cicd/submodule-regression-check.sh
+++ b/.cicd/submodule-regression-check.sh
@@ -19,15 +19,21 @@ while read -r a b; do
done < <(git submodule --quiet foreach --recursive 'echo $path `git log -1 --format=%ct`')
echo "getting submodule info for $BASE_BRANCH"
-git checkout $BASE_BRANCH 1> /dev/null
-git submodule update --init 1> /dev/null
+GIT_CHECKOUT="git checkout '$BASE_BRANCH' 1> /dev/null"
+echo "$ $GIT_CHECKOUT"
+eval $GIT_CHECKOUT
+GIT_SUBMODULE="git submodule update --init 1> /dev/null"
+echo "$ $GIT_SUBMODULE"
+eval $GIT_SUBMODULE
+
while read -r a b; do
BASE_MAP[$a]=$b
done < <(git submodule --quiet foreach --recursive 'echo $path `git log -1 --format=%ct`')
echo "switching back to $CURRENT_BRANCH..."
-echo "git checkout -qf $CURRENT_BRANCH"
-git checkout -qf $CURRENT_BRANCH 1> /dev/null
+GIT_CHECKOUT="git checkout -qf '$CURRENT_BRANCH' 1> /dev/null"
+echo "$ $GIT_CHECKOUT"
+eval $GIT_CHECKOUT
for k in "${!BASE_MAP[@]}"; do
base_ts=${BASE_MAP[$k]}
@@ -37,11 +43,12 @@ for k in "${!BASE_MAP[@]}"; do
echo " timestamp on $BASE_BRANCH: $base_ts"
if (( $pr_ts < $base_ts)); then
echo "$k is older on $CURRENT_BRANCH than $BASE_BRANCH; investigating the difference between $CURRENT_BRANCH and $BASE_BRANCH to look for $k changing..."
- if [[ ! -z $(for c in $(git --no-pager log $CURRENT_BRANCH ^$BASE_BRANCH --pretty=format:"%H"); do git show --pretty="" --name-only $c; done | grep "^$k$") ]]; then
+ GIT_LOG="git --no-pager log '$CURRENT_BRANCH' '^$BASE_BRANCH' --pretty=format:\"%H\""
+ if [[ ! -z $(for c in $(eval $GIT_LOG); do git show --pretty="" --name-only $c; done | grep "^$k$") ]]; then
echo "ERROR: $k has regressed"
exit 1
else
echo "$k was not in the diff; no regression detected"
fi
fi
-done
\ No newline at end of file
+done
diff --git a/.cicd/test.sh b/.cicd/test.sh
index 44b46e7b133..e76881c20c1 100755
--- a/.cicd/test.sh
+++ b/.cicd/test.sh
@@ -4,8 +4,8 @@ set -eo pipefail
. ./.cicd/helpers/general.sh
# tests
if [[ $(uname) == 'Darwin' ]]; then # macOS
- export PATH=$PATH:~/mongodb/bin
set +e # defer error handling to end
+ [[ "$CI" == 'true' ]] && source ~/.bash_profile
TEST_COMMAND="\"./$1\" ${@: 2}"
echo "$ $TEST_COMMAND"
eval $TEST_COMMAND
@@ -26,6 +26,11 @@ if [[ "$BUILDKITE" == 'true' ]]; then
cd build
# upload artifacts
echo '--- :arrow_up: Uploading Artifacts'
+ echo 'Compressing configuration'
+ [[ -d etc ]] && tar czf etc.tar.gz etc
+ echo 'Compressing logs'
+ [[ -d var ]] && tar czf var.tar.gz var
+ [[ -d eosio-ignition-wd ]] && tar czf eosio-ignition-wd.tar.gz eosio-ignition-wd
echo 'Compressing core dumps...'
[[ $((`ls -1 core.* 2>/dev/null | wc -l`)) != 0 ]] && tar czf core.tar.gz core.* || : # collect core dumps
echo 'Exporting xUnit XML'
@@ -34,7 +39,11 @@ if [[ "$BUILDKITE" == 'true' ]]; then
[[ -f config.ini ]] && buildkite-agent artifact upload config.ini
[[ -f core.tar.gz ]] && buildkite-agent artifact upload core.tar.gz
[[ -f genesis.json ]] && buildkite-agent artifact upload genesis.json
- [[ -f mongod.log ]] && buildkite-agent artifact upload mongod.log
+ [[ -f etc.tar.gz ]] && buildkite-agent artifact upload etc.tar.gz
+ [[ -f ctest-output.log ]] && buildkite-agent artifact upload ctest-output.log
+ [[ -f var.tar.gz ]] && buildkite-agent artifact upload var.tar.gz
+ [[ -f eosio-ignition-wd.tar.gz ]] && buildkite-agent artifact upload eosio-ignition-wd.tar.gz
+ [[ -f bios_boot.sh ]] && buildkite-agent artifact upload bios_boot.sh
buildkite-agent artifact upload test-results.xml
echo 'Done uploading artifacts.'
fi
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 20c04810660..7e70d4f1b9f 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -415,7 +415,7 @@ jobs:
git submodule update --init --force --recursive
- name: Build
run: |
- ./.cicd/platforms/unpinned/macos-10.14-unpinned.sh
+ ./.cicd/platforms/unpinned/macos-10.15-unpinned.sh
./.cicd/build.sh
tar -pczf build.tar.gz build
- name: Upload Build Artifact
@@ -441,7 +441,7 @@ jobs:
name: macos-1015-build
- name: Parallel Test
run: |
- ./.cicd/platforms/unpinned/macos-10.14-unpinned.sh
+ ./.cicd/platforms/unpinned/macos-10.15-unpinned.sh
tar -xzf macos-1015-build/build.tar.gz
./.cicd/test.sh scripts/parallel-test.sh
macos-1015-wasm-test:
@@ -462,7 +462,7 @@ jobs:
name: macos-1015-build
- name: WASM Spec Test
run: |
- ./.cicd/platforms/unpinned/macos-10.14-unpinned.sh
+ ./.cicd/platforms/unpinned/macos-10.15-unpinned.sh
tar -xzf macos-1015-build/build.tar.gz
./.cicd/test.sh scripts/wasm-spec-test.sh
macos-1015-serial-test:
@@ -483,6 +483,6 @@ jobs:
name: macos-1015-build
- name: Serial Test
run: |
- ./.cicd/platforms/unpinned/macos-10.14-unpinned.sh
+ ./.cicd/platforms/unpinned/macos-10.15-unpinned.sh
tar -xzf macos-1015-build/build.tar.gz
- ./.cicd/test.sh scripts/serial-test.sh
\ No newline at end of file
+ ./.cicd/test.sh scripts/serial-test.sh
diff --git a/.gitignore b/.gitignore
index 4c6f4f1a0f8..8cd0213e1d7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,6 +23,7 @@ Makefile
compile_commands.json
moc_*
*.moc
+.clangd/
genesis.json
hardfork.hpp
diff --git a/.gitmodules b/.gitmodules
index 806b2bcd783..f3d406ce8f4 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,20 +1,6 @@
-[submodule "libraries/chainbase"]
- path = libraries/chainbase
- url = https://github.com/eosio/chainbase
- ignore = dirty
-[submodule "libraries/appbase"]
- path = libraries/appbase
- url = https://github.com/eosio/appbase
- ignore = dirty
[submodule "libraries/softfloat"]
path = libraries/softfloat
url = https://github.com/eosio/berkeley-softfloat-3
-[submodule "libraries/fc"]
- path = libraries/fc
- url = https://github.com/EOSIO/fc
-[submodule "libraries/wabt"]
- path = libraries/wabt
- url = https://github.com/EOSIO/wabt
[submodule "libraries/yubihsm"]
path = libraries/yubihsm
url = https://github.com/Yubico/yubihsm-shell
@@ -24,3 +10,21 @@
[submodule "eosio-wasm-spec-tests"]
path = eosio-wasm-spec-tests
url = https://github.com/EOSIO/eosio-wasm-spec-tests
+[submodule "libraries/abieos"]
+ path = libraries/abieos
+ url = https://github.com/EOSIO/abieos.git
+[submodule "libraries/rocksdb"]
+ path = libraries/rocksdb
+ url = https://github.com/facebook/rocksdb.git
+[submodule "libraries/amqp-cpp"]
+ path = libraries/amqp-cpp
+ url = https://github.com/CopernicaMarketingSoftware/AMQP-CPP
+[submodule "libraries/fc"]
+ path = libraries/fc
+ url = https://github.com/eosio/fc
+[submodule "libraries/chainbase"]
+ path = libraries/chainbase
+ url = https://github.com/eosio/chainbase
+[submodule "libraries/appbase"]
+ path = libraries/appbase
+ url = https://github.com/eosio/appbase
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f5396a82adf..546213e1f5c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,10 +10,6 @@ endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
-if (UNIX AND APPLE)
- list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/gettext")
-endif()
-
include( GNUInstallDirs )
include( InstallDirectoryPermissions )
include( MASSigning )
@@ -24,8 +20,8 @@ set( CMAKE_CXX_EXTENSIONS ON )
set( CXX_STANDARD_REQUIRED ON)
set(VERSION_MAJOR 2)
-set(VERSION_MINOR 0)
-set(VERSION_PATCH 12)
+set(VERSION_MINOR 1)
+set(VERSION_PATCH 0)
#set(VERSION_SUFFIX rc3)
if(VERSION_SUFFIX)
@@ -37,6 +33,8 @@ endif()
set( CLI_CLIENT_EXECUTABLE_NAME cleos )
set( NODE_EXECUTABLE_NAME nodeos )
set( KEY_STORE_EXECUTABLE_NAME keosd )
+set( RODEOS_EXECUTABLE_NAME rodeos )
+set( TESTER_EXECUTABLE_NAME eosio-tester )
# http://stackoverflow.com/a/18369825
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
@@ -47,15 +45,18 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
message(FATAL_ERROR "Clang version must be at least 5.0!")
endif()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wsign-compare -Wrange-loop-analysis")
+endif()
+
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
+ set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
endif()
if ("${CMAKE_GENERATOR}" STREQUAL "Ninja")
add_compile_options(-fdiagnostics-color=always)
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(ENABLE_MULTIVERSION_PROTOCOL_TEST FALSE CACHE BOOL "Enable nodeos multiversion protocol test")
# add defaults for openssl
@@ -66,16 +67,16 @@ endif()
# WASM runtimes to enable. Each runtime in this list will have:
# * definition EOSIO__RUNTIME_ENABLED defined in public libchain interface
# * ctest entries with --runtime
-list(APPEND EOSIO_WASM_RUNTIMES wabt) #always enable wabt; it works everywhere and parts of eosio still assume it's always available
+# TODO reenable later
if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
list(APPEND EOSIO_WASM_RUNTIMES eos-vm-oc)
# EOS VM OC requires LLVM, but move the check up here to a central location so that the EosioTester.cmakes
# can be created with the exact version found
find_package(LLVM REQUIRED CONFIG)
- if(LLVM_VERSION_MAJOR VERSION_LESS 7 OR LLVM_VERSION_MAJOR VERSION_GREATER_EQUAL 12)
- message(FATAL_ERROR "EOSIO requires an LLVM version 7 through 11")
- endif()
+ if(LLVM_VERSION_MAJOR VERSION_LESS 7 OR LLVM_VERSION_MAJOR VERSION_GREATER_EQUAL 12)
+ message(FATAL_ERROR "EOSIO requires an LLVM version 7 through 11")
+ endif()
endif()
endif()
@@ -98,6 +99,7 @@ else()
set(no_whole_archive_flag "--no-whole-archive")
endif()
+set(Boost_USE_MULTITHREADED ON)
set( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )
# Most boost deps get implictly picked up via fc, as just about everything links to fc. In addition we pick up
# the pthread dependency through fc.
@@ -106,11 +108,13 @@ find_package(Boost 1.67 REQUIRED COMPONENTS program_options unit_test_framework)
if( APPLE AND UNIX )
# Apple Specific Options Here
message( STATUS "Configuring EOSIO on macOS" )
- set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} -Wall -Wno-deprecated-declarations" )
+ set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-deprecated-declarations" )
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-deprecated-declarations" )
else()
# Linux Specific Options Here
message( STATUS "Configuring EOSIO on Linux" )
- set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} -Wall" )
+ set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall" )
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" )
if ( FULL_STATIC_BUILD )
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc")
endif ( FULL_STATIC_BUILD )
@@ -122,6 +126,8 @@ else()
endif()
endif()
+option(EOSIO_ENABLE_DEVELOPER_OPTIONS "enable developer options for EOSIO" OFF)
+
# based on http://www.delorie.com/gnu/docs/gdb/gdb_70.html
# uncomment this line to tell GDB about macros (slows compile times)
# set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -gdwarf-2 -g3" )
@@ -129,6 +135,7 @@ endif()
set(ENABLE_COVERAGE_TESTING FALSE CACHE BOOL "Build EOSIO for code coverage analysis")
if(ENABLE_COVERAGE_TESTING)
+ SET(CMAKE_C_FLAGS "--coverage ${CMAKE_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "--coverage ${CMAKE_CXX_FLAGS}")
find_program( LCOV_PATH lcov )
find_program( LLVMCOV_PATH llvm-cov )
@@ -155,18 +162,34 @@ endif()
message( STATUS "Using '${EOSIO_ROOT_KEY}' as public key for 'eosio' account" )
+find_package( Gperftools QUIET )
+if( GPERFTOOLS_FOUND )
+ message( STATUS "Found gperftools; compiling EOSIO with TCMalloc")
+ #if doing this by the book, simply link_libraries( ${GPERFTOOLS_TCMALLOC} ) here. That will
+ #give the performance benefits of tcmalloc but since it won't be linked last
+ #the heap profiler & checker may not be accurate. This here is rather undocumented behavior
+ #to stuff a library toward the end of the link list
+ set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} ${GPERFTOOLS_TCMALLOC}")
+ set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} ${GPERFTOOLS_TCMALLOC}")
+endif()
+
add_subdirectory( libraries )
add_subdirectory( plugins )
add_subdirectory( programs )
add_subdirectory( scripts )
add_subdirectory( unittests )
+add_subdirectory( contracts )
add_subdirectory( tests )
add_subdirectory( tools )
+option(DISABLE_WASM_SPEC_TESTS "disable building of wasm spec unit tests" OFF)
+
if (NOT DISABLE_WASM_SPEC_TESTS)
add_subdirectory( eosio-wasm-spec-tests/generated-tests )
endif()
+set(CMAKE_EXPORT_COMPILE_COMMANDS "ON")
+
install_directory_permissions(DIRECTORY ${CMAKE_INSTALL_FULL_SYSCONFDIR}/eosio)
install(FILES testnet.template DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/eosio/launcher)
@@ -174,8 +197,13 @@ install_directory_permissions(DIRECTORY ${CMAKE_INSTALL_FULL_SYSCONFDIR}/eosio)
install_directory_permissions(DIRECTORY ${CMAKE_INSTALL_FULL_SYSCONFDIR}/eosio/launcher)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/testnet.template ${CMAKE_CURRENT_BINARY_DIR}/etc/eosio/launcher/testnet.template COPYONLY)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/eosio.version.in ${CMAKE_CURRENT_BINARY_DIR}/eosio.version.hpp)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eosio.version.hpp DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR})
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/contracts/contracts/eosio.bios/eosio.bios.abi DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/eosio/contracts)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/contracts/contracts/eosio.bios/eosio.bios.wasm DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/eosio/contracts)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/contracts/contracts/eosio.boot/eosio.boot.abi DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/eosio/contracts)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/contracts/contracts/eosio.boot/eosio.boot.wasm DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/eosio/contracts)
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.in ${CMAKE_CURRENT_BINARY_DIR}/version.hpp)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/version.hpp DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/eosio)
set(EOS_ROOT_DIR ${CMAKE_BINARY_DIR})
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/eosio-config.cmake.in ${CMAKE_BINARY_DIR}/lib/cmake/eosio/eosio-config.cmake @ONLY)
@@ -189,8 +217,6 @@ install(FILES ${CMAKE_BINARY_DIR}/modules/EosioTester.cmake DESTINATION ${CMAKE_
configure_file(${CMAKE_SOURCE_DIR}/LICENSE
${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE COPYONLY)
-configure_file(${CMAKE_SOURCE_DIR}/libraries/wabt/LICENSE
- ${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.wabt COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/softfloat/COPYING.txt
${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.softfloat COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/wasm-jit/LICENSE
@@ -205,9 +231,16 @@ configure_file(${CMAKE_SOURCE_DIR}/libraries/yubihsm/LICENSE
${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.yubihsm COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/eos-vm/LICENSE
${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.eos-vm COPYONLY)
+configure_file(${CMAKE_SOURCE_DIR}/libraries/rocksdb/LICENSE.Apache
+ ${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.rocksdb COPYONLY)
+configure_file(${CMAKE_SOURCE_DIR}/libraries/rocksdb/LICENSE.leveldb
+ ${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.leveldb COPYONLY)
+configure_file(${CMAKE_SOURCE_DIR}/libraries/amqp-cpp/LICENSE
+ ${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.amqpcpp COPYONLY)
+file(DOWNLOAD https://raw.githubusercontent.com/jtv/libpqxx/master/COPYING
+ ${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.libpqxx)
install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/eosio/ COMPONENT base)
-install(FILES libraries/wabt/LICENSE DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/eosio/ RENAME LICENSE.wabt COMPONENT base)
install(FILES libraries/softfloat/COPYING.txt DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/eosio/ RENAME LICENSE.softfloat COMPONENT base)
install(FILES libraries/wasm-jit/LICENSE DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/eosio/ RENAME LICENSE.wavm COMPONENT base)
install(FILES libraries/fc/secp256k1/upstream/COPYING DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/eosio/ RENAME LICENSE.secp256k1 COMPONENT base)
@@ -215,6 +248,10 @@ install(FILES libraries/fc/include/fc/crypto/webauthn_json/license.txt DESTINATI
install(FILES libraries/fc/src/network/LICENSE.go DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/eosio/ COMPONENT base)
install(FILES libraries/yubihsm/LICENSE DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/eosio/ RENAME LICENSE.yubihsm COMPONENT base)
install(FILES libraries/eos-vm/LICENSE DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/eosio/ RENAME LICENSE.eos-vm COMPONENT base)
+install(FILES libraries/rocksdb/LICENSE.Apache DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/eosio/ RENAME LICENSE.rocksdb COMPONENT base)
+install(FILES libraries/rocksdb/LICENSE.leveldb DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/eosio/ RENAME LICENSE.leveldb COMPONENT base)
+install(FILES libraries/amqp-cpp/LICENSE DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/eosio/ RENAME LICENSE.amqpcpp COMPONENT base)
+install(FILES ${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.libpqxx DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/eosio/ COMPONENT base)
add_custom_target(base-install
COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}"
diff --git a/CMakeModules/EosioTester.cmake.in b/CMakeModules/EosioTester.cmake.in
index 988fd241095..87e3fc60b03 100644
--- a/CMakeModules/EosioTester.cmake.in
+++ b/CMakeModules/EosioTester.cmake.in
@@ -30,6 +30,11 @@ set( CMAKE_CXX_STANDARD 17 )
set( CMAKE_CXX_EXTENSIONS ON )
set( CXX_STANDARD_REQUIRED ON )
+#adds -pthread. Ubuntu eosio.contracts build breaks without this flag specified
+set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
+set(THREADS_PREFER_PTHREAD_FLAG TRUE)
+find_package(Threads)
+
if ( APPLE )
set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} -Wall -Wno-deprecated-declarations" )
else ( APPLE )
@@ -39,7 +44,7 @@ endif ( APPLE )
### Remove after Boost 1.70 CMake fixes are in place
set( Boost_NO_BOOST_CMAKE ON CACHE STRING "ON or OFF" )
set( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )
-find_package(Boost 1.67 REQUIRED COMPONENTS
+find_package(Boost @Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@ EXACT REQUIRED COMPONENTS
date_time
filesystem
system
@@ -47,6 +52,7 @@ find_package(Boost 1.67 REQUIRED COMPONENTS
iostreams
unit_test_framework)
+find_library(librocksdb rocksdb @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib)
find_library(libtester eosio_testing @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib NO_DEFAULT_PATH)
find_library(libchain eosio_chain @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib NO_DEFAULT_PATH)
if ( "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" )
@@ -59,9 +65,7 @@ endif()
find_library(libwasm WASM @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib NO_DEFAULT_PATH)
find_library(libwast WAST @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib NO_DEFAULT_PATH)
-find_library(libwabt wabt @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib NO_DEFAULT_PATH)
find_library(libir IR @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib NO_DEFAULT_PATH)
-find_library(libplatform Platform @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib NO_DEFAULT_PATH)
find_library(liblogging Logging @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib NO_DEFAULT_PATH)
find_library(libruntime Runtime @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib NO_DEFAULT_PATH)
find_library(libsoftfloat softfloat @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib NO_DEFAULT_PATH)
@@ -71,12 +75,11 @@ get_filename_component(ssldir @OPENSSL_SSL_LIBRARY@ DIRECTORY)
find_library(libosssl ssl "${ssldir}" NO_DEFAULT_PATH)
find_library(libchainbase chainbase @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib NO_DEFAULT_PATH)
find_library(libbuiltins builtins @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib NO_DEFAULT_PATH)
-find_library(GMP_LIBRARIES NAMES libgmp.a gmp.lib gmp libgmp-10 mpir
- HINTS ENV GMP_LIB_DIR
- ENV GMP_DIR
- PATH_SUFFIXES lib
- DOC "Path to the GMP library"
-)
+
+#Ubuntu build requires rt library to be specified explicitly
+if(UNIX AND NOT APPLE)
+ find_library(LIBRT rt)
+endif()
set(EOSIO_WASM_RUNTIMES @EOSIO_WASM_RUNTIMES@)
if("eos-vm-oc" IN_LIST EOSIO_WASM_RUNTIMES)
@@ -91,9 +94,7 @@ macro(add_eosio_test_executable test_name)
${libfc}
${libwast}
${libwasm}
- ${libwabt}
${libruntime}
- ${libplatform}
${libir}
${libsoftfloat}
${liboscrypto}
@@ -102,7 +103,7 @@ macro(add_eosio_test_executable test_name)
${libchainbase}
${libbuiltins}
${libsecp256k1}
- ${GMP_LIBRARIES}
+ @GMP_LIBRARIES@
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
@@ -116,7 +117,14 @@ macro(add_eosio_test_executable test_name)
${PLATFORM_SPECIFIC_LIBS}
${WRAP_MAIN}
+ Threads::Threads
+ ${librocksdb}
)
+
+ #adds -ltr. Ubuntu eosio.contracts build breaks without this
+ if(UNIX AND NOT APPLE)
+ target_link_libraries(${test_name} ${LIBRT})
+ endif()
target_include_directories( ${test_name} PUBLIC
${Boost_INCLUDE_DIRS}
diff --git a/CMakeModules/EosioTesterBuild.cmake.in b/CMakeModules/EosioTesterBuild.cmake.in
index 62704dcf78d..5646bcca276 100644
--- a/CMakeModules/EosioTesterBuild.cmake.in
+++ b/CMakeModules/EosioTesterBuild.cmake.in
@@ -28,6 +28,10 @@ set( CMAKE_CXX_STANDARD 17 )
set( CMAKE_CXX_EXTENSIONS ON )
set( CXX_STANDARD_REQUIRED ON )
+set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
+set(THREADS_PREFER_PTHREAD_FLAG TRUE)
+find_package(Threads)
+
if ( APPLE )
set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} -Wall -Wno-deprecated-declarations" )
else ( APPLE )
@@ -37,7 +41,7 @@ endif ( APPLE )
### Remove after Boost 1.70 CMake fixes are in place
set( Boost_NO_BOOST_CMAKE ON CACHE STRING "ON or OFF" )
set( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )
-find_package(Boost 1.67 REQUIRED COMPONENTS
+find_package(Boost @Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@ EXACT REQUIRED COMPONENTS
date_time
filesystem
system
@@ -45,6 +49,7 @@ find_package(Boost 1.67 REQUIRED COMPONENTS
iostreams
unit_test_framework)
+find_library(librocksdb rocksdb @CMAKE_BINARY_DIR@/libraries/rocksdb)
find_library(libtester eosio_testing @CMAKE_BINARY_DIR@/libraries/testing NO_DEFAULT_PATH)
find_library(libchain eosio_chain @CMAKE_BINARY_DIR@/libraries/chain NO_DEFAULT_PATH)
if ( "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" )
@@ -59,8 +64,6 @@ endif()
find_library(libwasm WASM @CMAKE_BINARY_DIR@/libraries/wasm-jit/Source/WASM NO_DEFAULT_PATH)
find_library(libwast WAST @CMAKE_BINARY_DIR@/libraries/wasm-jit/Source/WAST NO_DEFAULT_PATH)
find_library(libir IR @CMAKE_BINARY_DIR@/libraries/wasm-jit/Source/IR NO_DEFAULT_PATH)
-find_library(libwabt wabt @CMAKE_BINARY_DIR@/libraries/wabt NO_DEFAULT_PATH)
-find_library(libplatform Platform @CMAKE_BINARY_DIR@/libraries/wasm-jit/Source/Platform NO_DEFAULT_PATH)
find_library(liblogging Logging @CMAKE_BINARY_DIR@/libraries/wasm-jit/Source/Logging NO_DEFAULT_PATH)
find_library(libruntime Runtime @CMAKE_BINARY_DIR@/libraries/wasm-jit/Source/Runtime NO_DEFAULT_PATH)
find_library(libsoftfloat softfloat @CMAKE_BINARY_DIR@/libraries/softfloat NO_DEFAULT_PATH)
@@ -70,12 +73,11 @@ get_filename_component(ssldir @OPENSSL_SSL_LIBRARY@ DIRECTORY)
find_library(libosssl ssl "${ssldir}" NO_DEFAULT_PATH)
find_library(libchainbase chainbase @CMAKE_BINARY_DIR@/libraries/chainbase NO_DEFAULT_PATH)
find_library(libbuiltins builtins @CMAKE_BINARY_DIR@/libraries/builtins NO_DEFAULT_PATH)
-find_library(GMP_LIBRARIES NAMES libgmp.a gmp.lib gmp libgmp-10 mpir
- HINTS ENV GMP_LIB_DIR
- ENV GMP_DIR
- PATH_SUFFIXES lib
- DOC "Path to the GMP library"
-)
+
+#Ubuntu build requires rt library to be specified explicitly
+if(UNIX AND NOT APPLE)
+ find_library(LIBRT rt)
+endif()
set(EOSIO_WASM_RUNTIMES @EOSIO_WASM_RUNTIMES@)
if("eos-vm-oc" IN_LIST EOSIO_WASM_RUNTIMES)
@@ -90,9 +92,7 @@ macro(add_eosio_test_executable test_name)
${libfc}
${libwast}
${libwasm}
- ${libwabt}
${libruntime}
- ${libplatform}
${libir}
${libsoftfloat}
${liboscrypto}
@@ -101,7 +101,7 @@ macro(add_eosio_test_executable test_name)
${libchainbase}
${libbuiltins}
${libsecp256k1}
- ${GMP_LIBRARIES}
+ @GMP_LIBRARIES@
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
@@ -115,7 +115,14 @@ macro(add_eosio_test_executable test_name)
${PLATFORM_SPECIFIC_LIBS}
${WRAP_MAIN}
+ Threads::Threads
+ ${librocksdb}
)
+
+ #adds -ltr. Ubuntu eosio.contracts build breaks without this
+ if(UNIX AND NOT APPLE)
+ target_link_libraries(${test_name} ${LIBRT})
+ endif()
target_include_directories( ${test_name} PUBLIC
${Boost_INCLUDE_DIRS}
diff --git a/CMakeModules/MASSigning.cmake b/CMakeModules/MASSigning.cmake
index 41c13588f28..2e63fefbd6d 100644
--- a/CMakeModules/MASSigning.cmake
+++ b/CMakeModules/MASSigning.cmake
@@ -1,18 +1,36 @@
-macro(mas_sign target)
+if(APPLE AND MAS_CERT_FINGERPRINT AND MAS_BASE_APPID AND MAS_PROVISIONING_PROFILE)
+ set(MAS_ENABLED ON)
+ if(MAS_KEYCHAIN_GROUP)
+ set(MAS_LEGACY ON)
+ endif()
+endif()
+
+macro(mas_sign target) #optional argument that forces keygroup when MAS_KEYCHAIN_GROUP not set
#example values:
# MAS_CERT_FINGERPRINT=C5139C2C4D7FA071EFBFD86CE44B652631C9376A
# MAS_BASE_APPID=5A4683969Z.com.example. <)
+ endif()
add_custom_command(TARGET ${target} POST_BUILD
- COMMAND ${CMAKE_SOURCE_DIR}/tools/mas_sign.sh ${MAS_CERT_FINGERPRINT} ${MAS_BASE_APPID}$ ${MAS_PROVISIONING_PROFILE} ${MAS_KEYCHAIN_GROUP} $
+ COMMAND ${CMAKE_SOURCE_DIR}/tools/mas_sign.sh ${MAS_CERT_FINGERPRINT} ${MAS_BASE_APPID}$ ${MAS_PROVISIONING_PROFILE} ${COMPUTED_KEYCHAIN} $
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
VERBATIM
)
diff --git a/LICENSE b/LICENSE
index 463694e9590..df058142c33 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2017-2020 block.one and its contributors. All rights reserved.
+Copyright (c) 2017-2021 block.one and its contributors. All rights reserved.
The MIT License
diff --git a/README.md b/README.md
index 3a1399cdc4e..af9863637b3 100644
--- a/README.md
+++ b/README.md
@@ -34,9 +34,13 @@ EOSIO currently supports the following operating systems:
1. Amazon Linux 2
2. CentOS 7
+2. CentOS 7.x
+2. CentOS 8
3. Ubuntu 16.04
4. Ubuntu 18.04
+4. Ubuntu 20.04
5. MacOS 10.14 (Mojave)
+6. MacOS 10.15 (Catalina)
---
@@ -72,15 +76,20 @@ brew remove eosio
### Ubuntu Linux:
+#### Ubuntu 20.04 Package Install
+```sh
+wget https://github.com/eosio/eos/releases/download/v2.1.0/eosio_2.1.0-1-ubuntu-20.04_amd64.deb
+sudo apt install ./eosio_2.1.0-1-ubuntu-20.04_amd64.deb
+```
#### Ubuntu 18.04 Package Install
```sh
-wget https://github.com/eosio/eos/releases/download/v2.0.12/eosio_2.0.12-1-ubuntu-18.04_amd64.deb
-sudo apt install ./eosio_2.0.12-1-ubuntu-18.04_amd64.deb
+wget https://github.com/eosio/eos/releases/download/v2.1.0/eosio_2.1.0-1-ubuntu-18.04_amd64.deb
+sudo apt install ./eosio_2.1.0-1-ubuntu-18.04_amd64.deb
```
#### Ubuntu 16.04 Package Install
```sh
-wget https://github.com/eosio/eos/releases/download/v2.0.12/eosio_2.0.12-1-ubuntu-16.04_amd64.deb
-sudo apt install ./eosio_2.0.12-1-ubuntu-16.04_amd64.deb
+wget https://github.com/eosio/eos/releases/download/v2.1.0/eosio_2.1.0-1-ubuntu-16.04_amd64.deb
+sudo apt install ./eosio_2.1.0-1-ubuntu-16.04_amd64.deb
```
#### Ubuntu Package Uninstall
```sh
@@ -89,11 +98,17 @@ sudo apt remove eosio
### RPM-based (CentOS, Amazon Linux, etc.):
-#### RPM Package Install
+#### RPM Package Install CentOS 7
```sh
-wget https://github.com/eosio/eos/releases/download/v2.0.12/eosio-2.0.12-1.el7.x86_64.rpm
-sudo yum install ./eosio-2.0.12-1.el7.x86_64.rpm
+wget https://github.com/eosio/eos/releases/download/v2.1.0/eosio-2.1.0-1.el7.x86_64.rpm
+sudo yum install ./eosio-2.1.0-1.el7.x86_64.rpm
```
+#### RPM Package Install CentOS 8
+```sh
+wget https://github.com/eosio/eos/releases/download/v2.1.0/eosio-2.1.0-1.el8.x86_64.rpm
+sudo yum install ./eosio-2.1.0-1.el8.x86_64.rpm
+```
+
#### RPM Package Uninstall
```sh
sudo yum remove eosio
@@ -124,9 +139,8 @@ To uninstall the EOSIO built/installed binaries and dependencies, run:
1. [White Paper](https://github.com/EOSIO/Documentation/blob/master/TechnicalWhitePaper.md)
1. [Roadmap](https://github.com/EOSIO/Documentation/blob/master/Roadmap.md)
-
## Getting Started
-Instructions detailing the process of getting the software, building it, running a simple test network that produces blocks, account creation and uploading a sample contract to the blockchain can be found in the [Getting Started](https://developers.eos.io/welcome/latest/getting-started-guide) walkthrough.
+Instructions detailing the process of getting the software, building it, running a simple test network that produces blocks, account creation and uploading a sample contract to the blockchain can be found in the [Getting Started](https://developers.eos.io/welcome/v2.1/getting-started-guide) walkthrough.
## Contributing
diff --git a/RocksDB.License.Apache b/RocksDB.License.Apache
new file mode 100644
index 00000000000..7a4a3ea2424
--- /dev/null
+++ b/RocksDB.License.Apache
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
\ No newline at end of file
diff --git a/contracts/CMakeLists.txt b/contracts/CMakeLists.txt
new file mode 100644
index 00000000000..49a54136a86
--- /dev/null
+++ b/contracts/CMakeLists.txt
@@ -0,0 +1,27 @@
+### Build contracts with cdt if EOSIO_COMPILE_TEST_CONTRACTS is on
+include(ExternalProject)
+
+if( EOSIO_COMPILE_TEST_CONTRACTS )
+ set(EOSIO_WASM_OLD_BEHAVIOR "Off")
+ find_package(eosio.cdt REQUIRED)
+
+ set(CMAKE_ARGS_VAL -DCMAKE_TOOLCHAIN_FILE=${EOSIO_CDT_ROOT}/lib/cmake/eosio.cdt/EosioWasmToolchain.cmake -DEOSIO_COMPILE_TEST_CONTRACTS=${EOSIO_COMPILE_TEST_CONTRACTS} )
+ if( USE_EOSIO_CDT_1_7_X)
+ list(APPEND CMAKE_ARGS_VAL -DUSE_EOSIO_CDT_1_7_X=${USE_EOSIO_CDT_1_7_X})
+ endif()
+ message( STATUS "Building contracts in directory `eos/contracts/`" )
+ ExternalProject_Add(
+ bios_boot_contracts_project
+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/contracts
+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/contracts
+ CMAKE_ARGS ${CMAKE_ARGS_VAL}
+ UPDATE_COMMAND ""
+ PATCH_COMMAND ""
+ TEST_COMMAND ""
+ INSTALL_COMMAND ""
+ BUILD_ALWAYS 1
+ )
+else()
+ message( STATUS "Not building contracts in directory `eos/contracts/`" )
+ add_subdirectory(contracts)
+endif()
diff --git a/contracts/contracts/CMakeLists.txt b/contracts/contracts/CMakeLists.txt
new file mode 100644
index 00000000000..4a5712b10b5
--- /dev/null
+++ b/contracts/contracts/CMakeLists.txt
@@ -0,0 +1,7 @@
+if( EOSIO_COMPILE_TEST_CONTRACTS )
+ set(EOSIO_WASM_OLD_BEHAVIOR "Off")
+ find_package( eosio.cdt REQUIRED )
+endif()
+
+add_subdirectory(eosio.bios)
+add_subdirectory(eosio.boot)
diff --git a/contracts/contracts/eosio.bios/CMakeLists.txt b/contracts/contracts/eosio.bios/CMakeLists.txt
new file mode 100644
index 00000000000..94cc2a8463a
--- /dev/null
+++ b/contracts/contracts/eosio.bios/CMakeLists.txt
@@ -0,0 +1,18 @@
+if (EOSIO_COMPILE_TEST_CONTRACTS)
+ add_contract(eosio.bios eosio.bios ${CMAKE_CURRENT_SOURCE_DIR}/src/eosio.bios.cpp)
+
+ target_include_directories(eosio.bios
+ PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/include)
+
+ set_target_properties(eosio.bios
+ PROPERTIES
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
+
+ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/ricardian/eosio.bios.contracts.md.in ${CMAKE_CURRENT_BINARY_DIR}/ricardian/eosio.bios.contracts.md @ONLY )
+
+ target_compile_options( eosio.bios PUBLIC -R${CMAKE_CURRENT_SOURCE_DIR}/ricardian -R${CMAKE_CURRENT_BINARY_DIR}/ricardian )
+else()
+ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/bin/eosio.bios.abi ${CMAKE_CURRENT_BINARY_DIR}/ COPYONLY )
+ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/bin/eosio.bios.wasm ${CMAKE_CURRENT_BINARY_DIR}/ COPYONLY )
+endif()
diff --git a/contracts/contracts/eosio.bios/bin/eosio.bios.abi b/contracts/contracts/eosio.bios/bin/eosio.bios.abi
new file mode 100644
index 00000000000..8b73b2e273c
--- /dev/null
+++ b/contracts/contracts/eosio.bios/bin/eosio.bios.abi
@@ -0,0 +1,602 @@
+{
+ "____comment": "This file was generated with eosio-abigen. DO NOT EDIT ",
+ "version": "eosio::abi/1.2",
+ "types": [
+ {
+ "new_type_name": "block_signing_authority",
+ "type": "variant_block_signing_authority_v0"
+ }
+ ],
+ "structs": [
+ {
+ "name": "abi_hash",
+ "base": "",
+ "fields": [
+ {
+ "name": "owner",
+ "type": "name"
+ },
+ {
+ "name": "hash",
+ "type": "checksum256"
+ }
+ ]
+ },
+ {
+ "name": "activate",
+ "base": "",
+ "fields": [
+ {
+ "name": "feature_digest",
+ "type": "checksum256"
+ }
+ ]
+ },
+ {
+ "name": "authority",
+ "base": "",
+ "fields": [
+ {
+ "name": "threshold",
+ "type": "uint32"
+ },
+ {
+ "name": "keys",
+ "type": "key_weight[]"
+ },
+ {
+ "name": "accounts",
+ "type": "permission_level_weight[]"
+ },
+ {
+ "name": "waits",
+ "type": "wait_weight[]"
+ }
+ ]
+ },
+ {
+ "name": "block_signing_authority_v0",
+ "base": "",
+ "fields": [
+ {
+ "name": "threshold",
+ "type": "uint32"
+ },
+ {
+ "name": "keys",
+ "type": "key_weight[]"
+ }
+ ]
+ },
+ {
+ "name": "blockchain_parameters",
+ "base": "",
+ "fields": [
+ {
+ "name": "max_block_net_usage",
+ "type": "uint64"
+ },
+ {
+ "name": "target_block_net_usage_pct",
+ "type": "uint32"
+ },
+ {
+ "name": "max_transaction_net_usage",
+ "type": "uint32"
+ },
+ {
+ "name": "base_per_transaction_net_usage",
+ "type": "uint32"
+ },
+ {
+ "name": "net_usage_leeway",
+ "type": "uint32"
+ },
+ {
+ "name": "context_free_discount_net_usage_num",
+ "type": "uint32"
+ },
+ {
+ "name": "context_free_discount_net_usage_den",
+ "type": "uint32"
+ },
+ {
+ "name": "max_block_cpu_usage",
+ "type": "uint32"
+ },
+ {
+ "name": "target_block_cpu_usage_pct",
+ "type": "uint32"
+ },
+ {
+ "name": "max_transaction_cpu_usage",
+ "type": "uint32"
+ },
+ {
+ "name": "min_transaction_cpu_usage",
+ "type": "uint32"
+ },
+ {
+ "name": "max_transaction_lifetime",
+ "type": "uint32"
+ },
+ {
+ "name": "deferred_trx_expiration_window",
+ "type": "uint32"
+ },
+ {
+ "name": "max_transaction_delay",
+ "type": "uint32"
+ },
+ {
+ "name": "max_inline_action_size",
+ "type": "uint32"
+ },
+ {
+ "name": "max_inline_action_depth",
+ "type": "uint16"
+ },
+ {
+ "name": "max_authority_depth",
+ "type": "uint16"
+ }
+ ]
+ },
+ {
+ "name": "canceldelay",
+ "base": "",
+ "fields": [
+ {
+ "name": "canceling_auth",
+ "type": "permission_level"
+ },
+ {
+ "name": "trx_id",
+ "type": "checksum256"
+ }
+ ]
+ },
+ {
+ "name": "deleteauth",
+ "base": "",
+ "fields": [
+ {
+ "name": "account",
+ "type": "name"
+ },
+ {
+ "name": "permission",
+ "type": "name"
+ }
+ ]
+ },
+ {
+ "name": "key_weight",
+ "base": "",
+ "fields": [
+ {
+ "name": "key",
+ "type": "public_key"
+ },
+ {
+ "name": "weight",
+ "type": "uint16"
+ }
+ ]
+ },
+ {
+ "name": "kv_parameters",
+ "base": "",
+ "fields": [
+ {
+ "name": "max_key_size",
+ "type": "uint32"
+ },
+ {
+ "name": "max_value_size",
+ "type": "uint32"
+ },
+ {
+ "name": "max_iterators",
+ "type": "uint32"
+ }
+ ]
+ },
+ {
+ "name": "linkauth",
+ "base": "",
+ "fields": [
+ {
+ "name": "account",
+ "type": "name"
+ },
+ {
+ "name": "code",
+ "type": "name"
+ },
+ {
+ "name": "type",
+ "type": "name"
+ },
+ {
+ "name": "requirement",
+ "type": "name"
+ }
+ ]
+ },
+ {
+ "name": "newaccount",
+ "base": "",
+ "fields": [
+ {
+ "name": "creator",
+ "type": "name"
+ },
+ {
+ "name": "name",
+ "type": "name"
+ },
+ {
+ "name": "owner",
+ "type": "authority"
+ },
+ {
+ "name": "active",
+ "type": "authority"
+ }
+ ]
+ },
+ {
+ "name": "onerror",
+ "base": "",
+ "fields": [
+ {
+ "name": "sender_id",
+ "type": "uint128"
+ },
+ {
+ "name": "sent_trx",
+ "type": "bytes"
+ }
+ ]
+ },
+ {
+ "name": "permission_level",
+ "base": "",
+ "fields": [
+ {
+ "name": "actor",
+ "type": "name"
+ },
+ {
+ "name": "permission",
+ "type": "name"
+ }
+ ]
+ },
+ {
+ "name": "permission_level_weight",
+ "base": "",
+ "fields": [
+ {
+ "name": "permission",
+ "type": "permission_level"
+ },
+ {
+ "name": "weight",
+ "type": "uint16"
+ }
+ ]
+ },
+ {
+ "name": "producer_authority",
+ "base": "",
+ "fields": [
+ {
+ "name": "producer_name",
+ "type": "name"
+ },
+ {
+ "name": "authority",
+ "type": "block_signing_authority"
+ }
+ ]
+ },
+ {
+ "name": "reqactivated",
+ "base": "",
+ "fields": [
+ {
+ "name": "feature_digest",
+ "type": "checksum256"
+ }
+ ]
+ },
+ {
+ "name": "reqauth",
+ "base": "",
+ "fields": [
+ {
+ "name": "from",
+ "type": "name"
+ }
+ ]
+ },
+ {
+ "name": "setabi",
+ "base": "",
+ "fields": [
+ {
+ "name": "account",
+ "type": "name"
+ },
+ {
+ "name": "abi",
+ "type": "bytes"
+ }
+ ]
+ },
+ {
+ "name": "setalimits",
+ "base": "",
+ "fields": [
+ {
+ "name": "account",
+ "type": "name"
+ },
+ {
+ "name": "ram_bytes",
+ "type": "int64"
+ },
+ {
+ "name": "net_weight",
+ "type": "int64"
+ },
+ {
+ "name": "cpu_weight",
+ "type": "int64"
+ }
+ ]
+ },
+ {
+ "name": "setcode",
+ "base": "",
+ "fields": [
+ {
+ "name": "account",
+ "type": "name"
+ },
+ {
+ "name": "vmtype",
+ "type": "uint8"
+ },
+ {
+ "name": "vmversion",
+ "type": "uint8"
+ },
+ {
+ "name": "code",
+ "type": "bytes"
+ }
+ ]
+ },
+ {
+ "name": "setkvparams",
+ "base": "",
+ "fields": [
+ {
+ "name": "params",
+ "type": "kv_parameters"
+ }
+ ]
+ },
+ {
+ "name": "setparams",
+ "base": "",
+ "fields": [
+ {
+ "name": "params",
+ "type": "blockchain_parameters"
+ }
+ ]
+ },
+ {
+ "name": "setpparams",
+ "base": "",
+ "fields": [
+ {
+ "name": "bytes",
+ "type": "bytes"
+ }
+ ]
+ },
+ {
+ "name": "setpriv",
+ "base": "",
+ "fields": [
+ {
+ "name": "account",
+ "type": "name"
+ },
+ {
+ "name": "is_priv",
+ "type": "uint8"
+ }
+ ]
+ },
+ {
+ "name": "setprods",
+ "base": "",
+ "fields": [
+ {
+ "name": "schedule",
+ "type": "producer_authority[]"
+ }
+ ]
+ },
+ {
+ "name": "unlinkauth",
+ "base": "",
+ "fields": [
+ {
+ "name": "account",
+ "type": "name"
+ },
+ {
+ "name": "code",
+ "type": "name"
+ },
+ {
+ "name": "type",
+ "type": "name"
+ }
+ ]
+ },
+ {
+ "name": "updateauth",
+ "base": "",
+ "fields": [
+ {
+ "name": "account",
+ "type": "name"
+ },
+ {
+ "name": "permission",
+ "type": "name"
+ },
+ {
+ "name": "parent",
+ "type": "name"
+ },
+ {
+ "name": "auth",
+ "type": "authority"
+ }
+ ]
+ },
+ {
+ "name": "wait_weight",
+ "base": "",
+ "fields": [
+ {
+ "name": "wait_sec",
+ "type": "uint32"
+ },
+ {
+ "name": "weight",
+ "type": "uint16"
+ }
+ ]
+ }
+ ],
+ "actions": [
+ {
+ "name": "activate",
+ "type": "activate",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "canceldelay",
+ "type": "canceldelay",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "deleteauth",
+ "type": "deleteauth",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "linkauth",
+ "type": "linkauth",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "newaccount",
+ "type": "newaccount",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "onerror",
+ "type": "onerror",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "reqactivated",
+ "type": "reqactivated",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "reqauth",
+ "type": "reqauth",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "setabi",
+ "type": "setabi",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "setalimits",
+ "type": "setalimits",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "setcode",
+ "type": "setcode",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "setkvparams",
+ "type": "setkvparams",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "setparams",
+ "type": "setparams",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "setpparams",
+ "type": "setpparams",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "setpriv",
+ "type": "setpriv",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "setprods",
+ "type": "setprods",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "unlinkauth",
+ "type": "unlinkauth",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "updateauth",
+ "type": "updateauth",
+ "ricardian_contract": ""
+ }
+ ],
+ "tables": [
+ {
+ "name": "abihash",
+ "type": "abi_hash",
+ "index_type": "i64",
+ "key_names": [],
+ "key_types": []
+ }
+ ],
+ "kv_tables": {},
+ "ricardian_clauses": [],
+ "variants": [
+ {
+ "name": "variant_block_signing_authority_v0",
+ "types": ["block_signing_authority_v0"]
+ }
+ ],
+ "action_results": []
+}
\ No newline at end of file
diff --git a/contracts/contracts/eosio.bios/bin/eosio.bios.wasm b/contracts/contracts/eosio.bios/bin/eosio.bios.wasm
new file mode 100755
index 00000000000..758bef069b8
Binary files /dev/null and b/contracts/contracts/eosio.bios/bin/eosio.bios.wasm differ
diff --git a/contracts/contracts/eosio.bios/include/eosio.bios/eosio.bios.hpp b/contracts/contracts/eosio.bios/include/eosio.bios/eosio.bios.hpp
new file mode 100644
index 00000000000..63b37d3e50a
--- /dev/null
+++ b/contracts/contracts/eosio.bios/include/eosio.bios/eosio.bios.hpp
@@ -0,0 +1,300 @@
+#pragma once
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace eosiobios {
+
+ using eosio::action_wrapper;
+ using eosio::check;
+ using eosio::checksum256;
+ using eosio::ignore;
+ using eosio::name;
+ using eosio::permission_level;
+ using eosio::public_key;
+
+ struct permission_level_weight {
+ permission_level permission;
+ uint16_t weight;
+
+ // explicit serialization macro is not necessary, used here only to improve compilation time
+ EOSLIB_SERIALIZE( permission_level_weight, (permission)(weight) )
+ };
+
+ struct key_weight {
+ eosio::public_key key;
+ uint16_t weight;
+
+ // explicit serialization macro is not necessary, used here only to improve compilation time
+ EOSLIB_SERIALIZE( key_weight, (key)(weight) )
+ };
+
+ struct wait_weight {
+ uint32_t wait_sec;
+ uint16_t weight;
+
+ // explicit serialization macro is not necessary, used here only to improve compilation time
+ EOSLIB_SERIALIZE( wait_weight, (wait_sec)(weight) )
+ };
+
+ struct authority {
+ uint32_t threshold = 0;
+ std::vector keys;
+ std::vector accounts;
+ std::vector waits;
+
+ // explicit serialization macro is not necessary, used here only to improve compilation time
+ EOSLIB_SERIALIZE( authority, (threshold)(keys)(accounts)(waits) )
+ };
+
+ struct block_header {
+ uint32_t timestamp;
+ name producer;
+ uint16_t confirmed = 0;
+ checksum256 previous;
+ checksum256 transaction_mroot;
+ checksum256 action_mroot;
+ uint32_t schedule_version = 0;
+ std::optional new_producers;
+
+ // explicit serialization macro is not necessary, used here only to improve compilation time
+ EOSLIB_SERIALIZE(block_header, (timestamp)(producer)(confirmed)(previous)(transaction_mroot)(action_mroot)
+ (schedule_version)(new_producers))
+ };
+
+ /**
+ * The `eosio.bios` is the first sample of system contract provided by `block.one` through the EOSIO platform. It is a minimalist system contract because it only supplies the actions that are absolutely critical to bootstrap a chain and nothing more. This allows for a chain agnostic approach to bootstrapping a chain.
+ *
+ * Just like in the `eosio.system` sample contract implementation, there are a few actions which are not implemented at the contract level (`newaccount`, `updateauth`, `deleteauth`, `linkauth`, `unlinkauth`, `canceldelay`, `onerror`, `setabi`, `setcode`), they are just declared in the contract so they will show in the contract's ABI and users will be able to push those actions to the chain via the account holding the `eosio.system` contract, but the implementation is at the EOSIO core level. They are referred to as EOSIO native actions.
+ */
+ class [[eosio::contract("eosio.bios")]] bios : public eosio::contract {
+ public:
+ using contract::contract;
+ /**
+ * New account action, called after a new account is created. This code enforces resource-limits rules
+ * for new accounts as well as new account naming conventions.
+ *
+ * 1. accounts cannot contain '.' symbols which forces all acccounts to be 12
+ * characters long without '.' until a future account auction process is implemented
+ * which prevents name squatting.
+ *
+ * 2. new accounts must stake a minimal number of tokens (as set in system parameters)
+ * therefore, this method will execute an inline buyram from receiver for newacnt in
+ * an amount equal to the current new account creation fee.
+ */
+ [[eosio::action]]
+ void newaccount( name creator,
+ name name,
+ ignore owner,
+ ignore active){}
+ /**
+ * Update authorization action updates pemission for an account.
+ *
+ * @param account - the account for which the permission is updated,
+ * @param pemission - the permission name which is updated,
+ * @param parem - the parent of the permission which is updated,
+ * @param aut - the json describing the permission authorization.
+ */
+ [[eosio::action]]
+ void updateauth( ignore account,
+ ignore permission,
+ ignore parent,
+ ignore auth ) {}
+
+ /**
+ * Delete authorization action deletes the authorization for an account's permission.
+ *
+ * @param account - the account for which the permission authorization is deleted,
+ * @param permission - the permission name been deleted.
+ */
+ [[eosio::action]]
+ void deleteauth( ignore account,
+ ignore permission ) {}
+
+ /**
+ * Link authorization action assigns a specific action from a contract to a permission you have created. Five system
+ * actions can not be linked `updateauth`, `deleteauth`, `linkauth`, `unlinkauth`, and `canceldelay`.
+ * This is useful because when doing authorization checks, the EOSIO based blockchain starts with the
+ * action needed to be authorized (and the contract belonging to), and looks up which permission
+ * is needed to pass authorization validation. If a link is set, that permission is used for authoraization
+ * validation otherwise then active is the default, with the exception of `eosio.any`.
+ * `eosio.any` is an implicit permission which exists on every account; you can link actions to `eosio.any`
+ * and that will make it so linked actions are accessible to any permissions defined for the account.
+ *
+ * @param account - the permission's owner to be linked and the payer of the RAM needed to store this link,
+ * @param code - the owner of the action to be linked,
+ * @param type - the action to be linked,
+ * @param requirement - the permission to be linked.
+ */
+ [[eosio::action]]
+ void linkauth( ignore account,
+ ignore code,
+ ignore type,
+ ignore requirement ) {}
+
+ /**
+ * Unlink authorization action it's doing the reverse of linkauth action, by unlinking the given action.
+ *
+ * @param account - the owner of the permission to be unlinked and the receiver of the freed RAM,
+ * @param code - the owner of the action to be unlinked,
+ * @param type - the action to be unlinked.
+ */
+ [[eosio::action]]
+ void unlinkauth( ignore account,
+ ignore code,
+ ignore type ) {}
+
+ /**
+ * Cancel delay action cancels a deferred transaction.
+ *
+ * @param canceling_auth - the permission that authorizes this action,
+ * @param trx_id - the deferred transaction id to be cancelled.
+ */
+ [[eosio::action]]
+ void canceldelay( ignore canceling_auth, ignore trx_id ) {}
+
+ /**
+ * Set code action sets the contract code for an account.
+ *
+ * @param account - the account for which to set the contract code.
+ * @param vmtype - reserved, set it to zero.
+ * @param vmversion - reserved, set it to zero.
+ * @param code - the code content to be set, in the form of a blob binary..
+ */
+ [[eosio::action]]
+ void setcode( name account, uint8_t vmtype, uint8_t vmversion, const std::vector& code ) {}
+
+ /**
+ * Set abi action sets the abi for contract identified by `account` name. Creates an entry in the abi_hash_table
+ * index, with `account` name as key, if it is not already present and sets its value with the abi hash.
+ * Otherwise it is updating the current abi hash value for the existing `account` key.
+ *
+ * @param account - the name of the account to set the abi for
+ * @param abi - the abi hash represented as a vector of characters
+ */
+ [[eosio::action]]
+ void setabi( name account, const std::vector& abi );
+
+ /**
+ * On error action, notification of this action is delivered to the sender of a deferred transaction
+ * when an objective error occurs while executing the deferred transaction.
+ * This action is not meant to be called directly.
+ *
+ * @param sender_id - the id for the deferred transaction chosen by the sender,
+ * @param sent_trx - the deferred transaction that failed.
+ */
+ [[eosio::action]]
+ void onerror( ignore sender_id, ignore> sent_trx );
+
+ /**
+ * Set privilege action allows to set privilege status for an account (turn it on/off).
+ * @param account - the account to set the privileged status for.
+ * @param is_priv - 0 for false, > 0 for true.
+ */
+ [[eosio::action]]
+ void setpriv( name account, uint8_t is_priv );
+
+ /**
+ * Sets the resource limits of an account
+ *
+ * @param account - name of the account whose resource limit to be set
+ * @param ram_bytes - ram limit in absolute bytes
+ * @param net_weight - fractionally proportionate net limit of available resources based on (weight / total_weight_of_all_accounts)
+ * @param cpu_weight - fractionally proportionate cpu limit of available resources based on (weight / total_weight_of_all_accounts)
+ */
+ [[eosio::action]]
+ void setalimits( name account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight );
+
+ /**
+ * Set producers action, sets a new list of active producers, by proposing a schedule change, once the block that
+ * contains the proposal becomes irreversible, the schedule is promoted to "pending"
+ * automatically. Once the block that promotes the schedule is irreversible, the schedule will
+ * become "active".
+ *
+ * @param schedule - New list of active producers to set
+ */
+ [[eosio::action]]
+ void setprods( const std::vector& schedule );
+
+ /**
+ * Set params action, sets the blockchain parameters. By tuning these parameters, various degrees of customization can be achieved.
+ *
+ * @param params - New blockchain parameters to set
+ */
+ [[eosio::action]]
+ void setparams( const eosio::blockchain_parameters& params );
+
+ /**
+ * Set params action, sets the blockchain parameters. By tuning these parameters, various degrees of customization can be achieved.
+ *
+ * @param params - New blockchain parameters to set
+ */
+ [[eosio::action]]
+ void setpparams( const std::vector& bytes);
+
+ /**
+ * Set KV params action, sets the KV parameters. By tuning these parameters, various degrees of customization can be achieved.
+ *
+ * @param params - New KV parameters to set
+ */
+ [[eosio::action]]
+ void setkvparams( const eosio::kv_parameters& params );
+
+ /**
+ * Require authorization action, checks if the account name `from` passed in as param has authorization to access
+ * current action, that is, if it is listed in the action’s allowed permissions vector.
+ *
+ * @param from - the account name to authorize
+ */
+ [[eosio::action]]
+ void reqauth( name from );
+
+ /**
+ * Activate action, activates a protocol feature
+ *
+ * @param feature_digest - hash of the protocol feature to activate.
+ */
+ [[eosio::action]]
+ void activate( const eosio::checksum256& feature_digest );
+
+ /**
+ * Require activated action, asserts that a protocol feature has been activated
+ *
+ * @param feature_digest - hash of the protocol feature to check for activation.
+ */
+ [[eosio::action]]
+ void reqactivated( const eosio::checksum256& feature_digest );
+
+ struct [[eosio::table]] abi_hash {
+ name owner;
+ checksum256 hash;
+ uint64_t primary_key()const { return owner.value; }
+
+ EOSLIB_SERIALIZE( abi_hash, (owner)(hash) )
+ };
+
+ typedef eosio::multi_index< "abihash"_n, abi_hash > abi_hash_table;
+
+ using newaccount_action = action_wrapper<"newaccount"_n, &bios::newaccount>;
+ using updateauth_action = action_wrapper<"updateauth"_n, &bios::updateauth>;
+ using deleteauth_action = action_wrapper<"deleteauth"_n, &bios::deleteauth>;
+ using linkauth_action = action_wrapper<"linkauth"_n, &bios::linkauth>;
+ using unlinkauth_action = action_wrapper<"unlinkauth"_n, &bios::unlinkauth>;
+ using canceldelay_action = action_wrapper<"canceldelay"_n, &bios::canceldelay>;
+ using setcode_action = action_wrapper<"setcode"_n, &bios::setcode>;
+ using setabi_action = action_wrapper<"setabi"_n, &bios::setabi>;
+ using setpriv_action = action_wrapper<"setpriv"_n, &bios::setpriv>;
+ using setalimits_action = action_wrapper<"setalimits"_n, &bios::setalimits>;
+ using setprods_action = action_wrapper<"setprods"_n, &bios::setprods>;
+ using setparams_action = action_wrapper<"setparams"_n, &bios::setparams>;
+ using setpparams_action = action_wrapper<"setpparams"_n, &bios::setpparams>;
+ using setkvparams_action = action_wrapper<"setkvparams"_n, &bios::setkvparams>;
+ using reqauth_action = action_wrapper<"reqauth"_n, &bios::reqauth>;
+ using activate_action = action_wrapper<"activate"_n, &bios::activate>;
+ using reqactivated_action = action_wrapper<"reqactivated"_n, &bios::reqactivated>;
+ };
+}
diff --git a/contracts/contracts/eosio.bios/ricardian/eosio.bios.contracts.md.in b/contracts/contracts/eosio.bios/ricardian/eosio.bios.contracts.md.in
new file mode 100644
index 00000000000..20d18f8d4ff
--- /dev/null
+++ b/contracts/contracts/eosio.bios/ricardian/eosio.bios.contracts.md.in
@@ -0,0 +1,201 @@
+activate
+
+---
+spec_version: "0.2.0"
+title: Activate Protocol Feature
+summary: 'Activate protocol feature {{nowrap feature_digest}}'
+icon: @ICON_BASE_URL@/@ADMIN_ICON_URI@
+---
+
+{{$action.account}} activates the protocol feature with a digest of {{feature_digest}}.
+
+canceldelay
+
+---
+spec_version: "0.2.0"
+title: Cancel Delayed Transaction
+summary: '{{nowrap canceling_auth.actor}} cancels a delayed transaction'
+icon: @ICON_BASE_URL@/@ACCOUNT_ICON_URI@
+---
+
+{{canceling_auth.actor}} cancels the delayed transaction with id {{trx_id}}.
+
+deleteauth
+
+---
+spec_version: "0.2.0"
+title: Delete Account Permission
+summary: 'Delete the {{nowrap permission}} permission of {{nowrap account}}'
+icon: @ICON_BASE_URL@/@ACCOUNT_ICON_URI@
+---
+
+Delete the {{permission}} permission of {{account}}.
+
+linkauth
+
+---
+spec_version: "0.2.0"
+title: Link Action to Permission
+summary: '{{nowrap account}} sets the minimum required permission for the {{#if type}}{{nowrap type}} action of the{{/if}} {{nowrap code}} contract to {{nowrap requirement}}'
+icon: @ICON_BASE_URL@/@ACCOUNT_ICON_URI@
+---
+
+{{account}} sets the minimum required permission for the {{#if type}}{{type}} action of the{{/if}} {{code}} contract to {{requirement}}.
+
+{{#if type}}{{else}}Any links explicitly associated to specific actions of {{code}} will take precedence.{{/if}}
+
+newaccount
+
+---
+spec_version: "0.2.0"
+title: Create New Account
+summary: '{{nowrap creator}} creates a new account with the name {{nowrap name}}'
+icon: @ICON_BASE_URL@/@ACCOUNT_ICON_URI@
+---
+
+{{creator}} creates a new account with the name {{name}} and the following permissions:
+
+owner permission with authority:
+{{to_json owner}}
+
+active permission with authority:
+{{to_json active}}
+
+reqactivated
+
+---
+spec_version: "0.2.0"
+title: Assert Protocol Feature Activation
+summary: 'Assert that protocol feature {{nowrap feature_digest}} has been activated'
+icon: @ICON_BASE_URL@/@ADMIN_ICON_URI@
+---
+
+Assert that the protocol feature with a digest of {{feature_digest}} has been activated.
+
+reqauth
+
+---
+spec_version: "0.2.0"
+title: Assert Authorization
+summary: 'Assert that authorization by {{nowrap from}} is provided'
+icon: @ICON_BASE_URL@/@ACCOUNT_ICON_URI@
+---
+
+Assert that authorization by {{from}} is provided.
+
+setabi
+
+---
+spec_version: "0.2.0"
+title: Deploy Contract ABI
+summary: 'Deploy contract ABI on account {{nowrap account}}'
+icon: @ICON_BASE_URL@/@ACCOUNT_ICON_URI@
+---
+
+Deploy the ABI file associated with the contract on account {{account}}.
+
+setalimits
+
+---
+spec_version: "0.2.0"
+title: Adjust Resource Limits of Account
+summary: 'Adjust resource limits of account {{nowrap account}}'
+icon: @ICON_BASE_URL@/@ADMIN_ICON_URI@
+---
+
+{{$action.account}} updates {{account}}’s resource limits to have a RAM quota of {{ram_bytes}} bytes, a NET bandwidth quota of {{net_weight}} and a CPU bandwidth quota of {{cpu_weight}}.
+
+setcode
+
+---
+spec_version: "0.2.0"
+title: Deploy Contract Code
+summary: 'Deploy contract code on account {{nowrap account}}'
+icon: @ICON_BASE_URL@/@ACCOUNT_ICON_URI@
+---
+
+Deploy compiled contract code to the account {{account}}.
+
+setparams
+
+---
+spec_version: "0.2.0"
+title: Set System Parameters
+summary: 'Set system parameters'
+icon: @ICON_BASE_URL@/@ADMIN_ICON_URI@
+---
+
+{{$action.account}} sets system parameters to:
+{{to_json params}}
+
+setkvparams
+
+---
+spec_version: "0.3.0"
+title: Set KV Parameters
+summary: 'Set KV parameters'
+icon: @ICON_BASE_URL@/@ADMIN_ICON_URI@
+---
+
+{{$action.account}} sets KV parameters to:
+{{to_json params}}
+
+setpriv
+
+---
+spec_version: "0.2.0"
+title: Make an Account Privileged or Unprivileged
+summary: '{{#if is_priv}}Make {{nowrap account}} privileged{{else}}Remove privileged status of {{nowrap account}}{{/if}}'
+icon: @ICON_BASE_URL@/@ADMIN_ICON_URI@
+---
+
+{{#if is_priv}}
+{{$action.account}} makes {{account}} privileged.
+{{else}}
+{{$action.account}} removes privileged status of {{account}}.
+{{/if}}
+
+setprods
+
+---
+spec_version: "0.2.0"
+title: Set Block Producers
+summary: 'Set block producer schedule'
+icon: @ICON_BASE_URL@/@ADMIN_ICON_URI@
+---
+
+{{$action.account}} proposes a block producer schedule of:
+{{#each schedule}}
+ 1. {{this.producer_name}}
+{{/each}}
+
+The block signing authorities of each of the producers in the above schedule are listed below:
+{{#each schedule}}
+### {{this.producer_name}}
+{{to_json this.authority}}
+{{/each}}
+
+unlinkauth
+
+---
+spec_version: "0.2.0"
+title: Unlink Action from Permission
+summary: '{{nowrap account}} unsets the minimum required permission for the {{#if type}}{{nowrap type}} action of the{{/if}} {{nowrap code}} contract'
+icon: @ICON_BASE_URL@/@ACCOUNT_ICON_URI@
+---
+
+{{account}} removes the association between the {{#if type}}{{type}} action of the{{/if}} {{code}} contract and its minimum required permission.
+
+{{#if type}}{{else}}This will not remove any links explicitly associated to specific actions of {{code}}.{{/if}}
+
+updateauth
+
+---
+spec_version: "0.2.0"
+title: Modify Account Permission
+summary: 'Add or update the {{nowrap permission}} permission of {{nowrap account}}'
+icon: @ICON_BASE_URL@/@ACCOUNT_ICON_URI@
+---
+
+Modify, and create if necessary, the {{permission}} permission of {{account}} to have a parent permission of {{parent}} and the following authority:
+{{to_json auth}}
diff --git a/contracts/contracts/eosio.bios/src/eosio.bios.cpp b/contracts/contracts/eosio.bios/src/eosio.bios.cpp
new file mode 100644
index 00000000000..a87961d8c89
--- /dev/null
+++ b/contracts/contracts/eosio.bios/src/eosio.bios.cpp
@@ -0,0 +1,73 @@
+#include
+
+namespace eosiobios {
+
+// move this to CDT after this release
+extern "C" {
+ __attribute__((eosio_wasm_import))
+ void set_parameters_packed(const char*, std::size_t);
+}
+
+void bios::setabi( name account, const std::vector& abi ) {
+ abi_hash_table table(get_self(), get_self().value);
+ auto itr = table.find( account.value );
+ if( itr == table.end() ) {
+ table.emplace( account, [&]( auto& row ) {
+ row.owner = account;
+ row.hash = eosio::sha256(const_cast(abi.data()), abi.size());
+ });
+ } else {
+ table.modify( itr, eosio::same_payer, [&]( auto& row ) {
+ row.hash = eosio::sha256(const_cast(abi.data()), abi.size());
+ });
+ }
+}
+
+void bios::onerror( ignore, ignore> ) {
+ check( false, "the onerror action cannot be called directly" );
+}
+
+void bios::setpriv( name account, uint8_t is_priv ) {
+ require_auth( get_self() );
+ set_privileged( account, is_priv );
+}
+
+void bios::setalimits( name account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight ) {
+ require_auth( get_self() );
+ set_resource_limits( account, ram_bytes, net_weight, cpu_weight );
+}
+
+void bios::setprods( const std::vector& schedule ) {
+ require_auth( get_self() );
+ set_proposed_producers( schedule );
+}
+
+void bios::setparams( const eosio::blockchain_parameters& params ) {
+ require_auth( get_self() );
+ set_blockchain_parameters( params );
+}
+
+void bios::setpparams( const std::vector& params ) {
+ require_auth( get_self() );
+ set_parameters_packed( params.data(), params.size() );
+}
+
+void bios::setkvparams( const eosio::kv_parameters& params ) {
+ require_auth( get_self() );
+ set_kv_parameters( params );
+}
+
+void bios::reqauth( name from ) {
+ require_auth( from );
+}
+
+void bios::activate( const eosio::checksum256& feature_digest ) {
+ require_auth( get_self() );
+ preactivate_feature( feature_digest );
+}
+
+void bios::reqactivated( const eosio::checksum256& feature_digest ) {
+ check( is_feature_activated( feature_digest ), "protocol feature is not activated" );
+}
+
+}
diff --git a/contracts/contracts/eosio.boot/CMakeLists.txt b/contracts/contracts/eosio.boot/CMakeLists.txt
new file mode 100644
index 00000000000..2b53d1f898f
--- /dev/null
+++ b/contracts/contracts/eosio.boot/CMakeLists.txt
@@ -0,0 +1,19 @@
+if (EOSIO_COMPILE_TEST_CONTRACTS)
+ add_contract(eosio.boot eosio.boot ${CMAKE_CURRENT_SOURCE_DIR}/src/eosio.boot.cpp)
+
+ target_include_directories(eosio.boot
+ PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/include)
+
+ set_target_properties(eosio.boot
+ PROPERTIES
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
+
+ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/ricardian/eosio.boot.contracts.md.in ${CMAKE_CURRENT_BINARY_DIR}/ricardian/eosio.boot.contracts.md @ONLY )
+
+ target_compile_options( eosio.boot PUBLIC -R${CMAKE_CURRENT_SOURCE_DIR}/ricardian -R${CMAKE_CURRENT_BINARY_DIR}/ricardian )
+else()
+ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/bin/eosio.boot.abi ${CMAKE_CURRENT_BINARY_DIR}/ COPYONLY )
+ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/bin/eosio.boot.wasm ${CMAKE_CURRENT_BINARY_DIR}/ COPYONLY )
+endif()
+
diff --git a/contracts/contracts/eosio.boot/bin/eosio.boot.abi b/contracts/contracts/eosio.boot/bin/eosio.boot.abi
new file mode 100644
index 00000000000..fecbd61e9d6
--- /dev/null
+++ b/contracts/contracts/eosio.boot/bin/eosio.boot.abi
@@ -0,0 +1,329 @@
+{
+ "____comment": "This file was generated with eosio-abigen. DO NOT EDIT ",
+ "version": "eosio::abi/1.2",
+ "types": [],
+ "structs": [
+ {
+ "name": "activate",
+ "base": "",
+ "fields": [
+ {
+ "name": "feature_digest",
+ "type": "checksum256"
+ }
+ ]
+ },
+ {
+ "name": "authority",
+ "base": "",
+ "fields": [
+ {
+ "name": "threshold",
+ "type": "uint32"
+ },
+ {
+ "name": "keys",
+ "type": "key_weight[]"
+ },
+ {
+ "name": "accounts",
+ "type": "permission_level_weight[]"
+ },
+ {
+ "name": "waits",
+ "type": "wait_weight[]"
+ }
+ ]
+ },
+ {
+ "name": "canceldelay",
+ "base": "",
+ "fields": [
+ {
+ "name": "canceling_auth",
+ "type": "permission_level"
+ },
+ {
+ "name": "trx_id",
+ "type": "checksum256"
+ }
+ ]
+ },
+ {
+ "name": "deleteauth",
+ "base": "",
+ "fields": [
+ {
+ "name": "account",
+ "type": "name"
+ },
+ {
+ "name": "permission",
+ "type": "name"
+ }
+ ]
+ },
+ {
+ "name": "key_weight",
+ "base": "",
+ "fields": [
+ {
+ "name": "key",
+ "type": "public_key"
+ },
+ {
+ "name": "weight",
+ "type": "uint16"
+ }
+ ]
+ },
+ {
+ "name": "linkauth",
+ "base": "",
+ "fields": [
+ {
+ "name": "account",
+ "type": "name"
+ },
+ {
+ "name": "code",
+ "type": "name"
+ },
+ {
+ "name": "type",
+ "type": "name"
+ },
+ {
+ "name": "requirement",
+ "type": "name"
+ }
+ ]
+ },
+ {
+ "name": "newaccount",
+ "base": "",
+ "fields": [
+ {
+ "name": "creator",
+ "type": "name"
+ },
+ {
+ "name": "name",
+ "type": "name"
+ },
+ {
+ "name": "owner",
+ "type": "authority"
+ },
+ {
+ "name": "active",
+ "type": "authority"
+ }
+ ]
+ },
+ {
+ "name": "onerror",
+ "base": "",
+ "fields": [
+ {
+ "name": "sender_id",
+ "type": "uint128"
+ },
+ {
+ "name": "sent_trx",
+ "type": "bytes"
+ }
+ ]
+ },
+ {
+ "name": "permission_level",
+ "base": "",
+ "fields": [
+ {
+ "name": "actor",
+ "type": "name"
+ },
+ {
+ "name": "permission",
+ "type": "name"
+ }
+ ]
+ },
+ {
+ "name": "permission_level_weight",
+ "base": "",
+ "fields": [
+ {
+ "name": "permission",
+ "type": "permission_level"
+ },
+ {
+ "name": "weight",
+ "type": "uint16"
+ }
+ ]
+ },
+ {
+ "name": "reqactivated",
+ "base": "",
+ "fields": [
+ {
+ "name": "feature_digest",
+ "type": "checksum256"
+ }
+ ]
+ },
+ {
+ "name": "setabi",
+ "base": "",
+ "fields": [
+ {
+ "name": "account",
+ "type": "name"
+ },
+ {
+ "name": "abi",
+ "type": "bytes"
+ }
+ ]
+ },
+ {
+ "name": "setcode",
+ "base": "",
+ "fields": [
+ {
+ "name": "account",
+ "type": "name"
+ },
+ {
+ "name": "vmtype",
+ "type": "uint8"
+ },
+ {
+ "name": "vmversion",
+ "type": "uint8"
+ },
+ {
+ "name": "code",
+ "type": "bytes"
+ }
+ ]
+ },
+ {
+ "name": "unlinkauth",
+ "base": "",
+ "fields": [
+ {
+ "name": "account",
+ "type": "name"
+ },
+ {
+ "name": "code",
+ "type": "name"
+ },
+ {
+ "name": "type",
+ "type": "name"
+ }
+ ]
+ },
+ {
+ "name": "updateauth",
+ "base": "",
+ "fields": [
+ {
+ "name": "account",
+ "type": "name"
+ },
+ {
+ "name": "permission",
+ "type": "name"
+ },
+ {
+ "name": "parent",
+ "type": "name"
+ },
+ {
+ "name": "auth",
+ "type": "authority"
+ }
+ ]
+ },
+ {
+ "name": "wait_weight",
+ "base": "",
+ "fields": [
+ {
+ "name": "wait_sec",
+ "type": "uint32"
+ },
+ {
+ "name": "weight",
+ "type": "uint16"
+ }
+ ]
+ }
+ ],
+ "actions": [
+ {
+ "name": "activate",
+ "type": "activate",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "canceldelay",
+ "type": "canceldelay",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "deleteauth",
+ "type": "deleteauth",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "linkauth",
+ "type": "linkauth",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "newaccount",
+ "type": "newaccount",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "onerror",
+ "type": "onerror",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "reqactivated",
+ "type": "reqactivated",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "setabi",
+ "type": "setabi",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "setcode",
+ "type": "setcode",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "unlinkauth",
+ "type": "unlinkauth",
+ "ricardian_contract": ""
+ },
+ {
+ "name": "updateauth",
+ "type": "updateauth",
+ "ricardian_contract": ""
+ }
+ ],
+ "tables": [],
+ "kv_tables": {},
+ "ricardian_clauses": [],
+ "variants": [],
+ "action_results": []
+}
\ No newline at end of file
diff --git a/contracts/contracts/eosio.boot/bin/eosio.boot.wasm b/contracts/contracts/eosio.boot/bin/eosio.boot.wasm
new file mode 100755
index 00000000000..5efc287d4c7
Binary files /dev/null and b/contracts/contracts/eosio.boot/bin/eosio.boot.wasm differ
diff --git a/contracts/contracts/eosio.boot/include/eosio.boot/eosio.boot.hpp b/contracts/contracts/eosio.boot/include/eosio.boot/eosio.boot.hpp
new file mode 100644
index 00000000000..422c2e2df60
--- /dev/null
+++ b/contracts/contracts/eosio.boot/include/eosio.boot/eosio.boot.hpp
@@ -0,0 +1,260 @@
+#pragma once
+
+#include
+#include
+
+namespace eosioboot {
+
+ using eosio::action_wrapper;
+ using eosio::check;
+ using eosio::checksum256;
+ using eosio::ignore;
+ using eosio::name;
+ using eosio::permission_level;
+ using eosio::public_key;
+
+ /**
+ * A weighted permission.
+ *
+ * @details Defines a weighted permission, that is a permission which has a weight associated.
+ * A permission is defined by an account name plus a permission name. The weight is going to be
+ * used against a threshold, if the weight is equal or greater than the threshold set then authorization
+ * will pass.
+ */
+ struct permission_level_weight {
+ permission_level permission;
+ uint16_t weight;
+
+ // explicit serialization macro is not necessary, used here only to improve compilation time
+ EOSLIB_SERIALIZE( permission_level_weight, (permission)(weight) )
+ };
+
+ /**
+ * Weighted key.
+ *
+ * @details A weighted key is defined by a public key and an associated weight.
+ */
+ struct key_weight {
+ eosio::public_key key;
+ uint16_t weight;
+
+ // explicit serialization macro is not necessary, used here only to improve compilation time
+ EOSLIB_SERIALIZE( key_weight, (key)(weight) )
+ };
+
+ /**
+ * Wait weight.
+ *
+ * @details A wait weight is defined by a number of seconds to wait for and a weight.
+ */
+ struct wait_weight {
+ uint32_t wait_sec;
+ uint16_t weight;
+
+ // explicit serialization macro is not necessary, used here only to improve compilation time
+ EOSLIB_SERIALIZE( wait_weight, (wait_sec)(weight) )
+ };
+
+ /**
+ * Blockchain authority.
+ *
+ * @details An authority is defined by:
+ * - a vector of key_weights (a key_weight is a public key plus a weight),
+ * - a vector of permission_level_weights, (a permission_level is an account name plus a permission name)
+ * - a vector of wait_weights (a wait_weight is defined by a number of seconds to wait and a weight)
+ * - a threshold value
+ */
+ struct authority {
+ uint32_t threshold = 0;
+ std::vector keys;
+ std::vector accounts;
+ std::vector waits;
+
+ // explicit serialization macro is not necessary, used here only to improve compilation time
+ EOSLIB_SERIALIZE( authority, (threshold)(keys)(accounts)(waits) )
+ };
+
+ /**
+ * @defgroup eosioboot eosio.boot
+ * @ingroup eosiocontracts
+ *
+ * eosio.boot is a extremely minimalistic system contract that only supports the native actions and an
+ * activate action that allows activating desired protocol features prior to deploying a system contract
+ * with more features such as eosio.bios or eosio.system.
+ *
+ * @{
+ */
+ class [[eosio::contract("eosio.boot")]] boot : public eosio::contract {
+ public:
+ using contract::contract;
+ /**
+ * @{
+ * These actions map one-on-one with the ones defined in
+ * [Native Action Handlers](@ref native_action_handlers) section.
+ * They are present here so they can show up in the abi file and thus user can send them
+ * to this contract, but they have no specific implementation at this contract level,
+ * they will execute the implementation at the core level and nothing else.
+ */
+ /**
+ * New account action
+ *
+ * @details Creates a new account.
+ *
+ * @param creator - the creator of the account
+ * @param name - the name of the new account
+ * @param owner - the authority for the owner permission of the new account
+ * @param active - the authority for the active permission of the new account
+ */
+ [[eosio::action]]
+ void newaccount( name creator,
+ name name,
+ ignore owner,
+ ignore active) {}
+ /**
+ * Update authorization action.
+ *
+ * @details Updates pemission for an account.
+ *
+ * @param account - the account for which the permission is updated,
+ * @param pemission - the permission name which is updated,
+ * @param parem - the parent of the permission which is updated,
+ * @param aut - the json describing the permission authorization.
+ */
+ [[eosio::action]]
+ void updateauth( ignore account,
+ ignore permission,
+ ignore parent,
+ ignore auth ) {}
+
+ /**
+ * Delete authorization action.
+ *
+ * @details Deletes the authorization for an account's permision.
+ *
+ * @param account - the account for which the permission authorization is deleted,
+ * @param permission - the permission name been deleted.
+ */
+ [[eosio::action]]
+ void deleteauth( ignore account,
+ ignore permission ) {}
+
+ /**
+ * Link authorization action.
+ *
+ * @details Assigns a specific action from a contract to a permission you have created. Five system
+ * actions can not be linked `updateauth`, `deleteauth`, `linkauth`, `unlinkauth`, and `canceldelay`.
+ * This is useful because when doing authorization checks, the EOSIO based blockchain starts with the
+ * action needed to be authorized (and the contract belonging to), and looks up which permission
+ * is needed to pass authorization validation. If a link is set, that permission is used for authoraization
+ * validation otherwise then active is the default, with the exception of `eosio.any`.
+ * `eosio.any` is an implicit permission which exists on every account; you can link actions to `eosio.any`
+ * and that will make it so linked actions are accessible to any permissions defined for the account.
+ *
+ * @param account - the permission's owner to be linked and the payer of the RAM needed to store this link,
+ * @param code - the owner of the action to be linked,
+ * @param type - the action to be linked,
+ * @param requirement - the permission to be linked.
+ */
+ [[eosio::action]]
+ void linkauth( ignore account,
+ ignore code,
+ ignore type,
+ ignore requirement ) {}
+
+ /**
+ * Unlink authorization action.
+ *
+ * @details It's doing the reverse of linkauth action, by unlinking the given action.
+ *
+ * @param account - the owner of the permission to be unlinked and the receiver of the freed RAM,
+ * @param code - the owner of the action to be unlinked,
+ * @param type - the action to be unlinked.
+ */
+ [[eosio::action]]
+ void unlinkauth( ignore account,
+ ignore code,
+ ignore type ) {}
+
+ /**
+ * Cancel delay action.
+ *
+ * @details Cancels a deferred transaction.
+ *
+ * @param canceling_auth - the permission that authorizes this action,
+ * @param trx_id - the deferred transaction id to be cancelled.
+ */
+ [[eosio::action]]
+ void canceldelay( ignore canceling_auth, ignore trx_id ) {}
+
+ /**
+ * Set code action.
+ *
+ * @details Sets the contract code for an account.
+ *
+ * @param account - the account for which to set the contract code.
+ * @param vmtype - reserved, set it to zero.
+ * @param vmversion - reserved, set it to zero.
+ * @param code - the code content to be set, in the form of a blob binary..
+ */
+ [[eosio::action]]
+ void setcode( name account, uint8_t vmtype, uint8_t vmversion, const std::vector& code ) {}
+
+ /**
+ * Set abi for contract.
+ *
+ * @details Set the abi for contract identified by `account` name.
+ *
+ * @param account - the name of the account to set the abi for
+ * @param abi - the abi hash represented as a vector of characters
+ */
+ [[eosio::action]]
+ void setabi( name account, const std::vector& abi ) {}
+
+ /** @}*/
+
+ /**
+ * On error action.
+ *
+ * @details Notification of this action is delivered to the sender of a deferred transaction
+ * when an objective error occurs while executing the deferred transaction.
+ * This action is not meant to be called directly.
+ *
+ * @param sender_id - the id for the deferred transaction chosen by the sender,
+ * @param sent_trx - the deferred transaction that failed.
+ */
+ [[eosio::action]]
+ void onerror( ignore sender_id, ignore> sent_trx );
+
+ /**
+ * Activates a protocol feature.
+ *
+ * @details Activates a protocol feature
+ *
+ * @param feature_digest - hash of the protocol feature to activate.
+ */
+ [[eosio::action]]
+ void activate( const eosio::checksum256& feature_digest );
+
+ /**
+ * Asserts that a protocol feature has been activated.
+ *
+ * @details Asserts that a protocol feature has been activated
+ *
+ * @param feature_digest - hash of the protocol feature to check for activation.
+ */
+ [[eosio::action]]
+ void reqactivated( const eosio::checksum256& feature_digest );
+
+ using newaccount_action = action_wrapper<"newaccount"_n, &boot::newaccount>;
+ using updateauth_action = action_wrapper<"updateauth"_n, &boot::updateauth>;
+ using deleteauth_action = action_wrapper<"deleteauth"_n, &boot::deleteauth>;
+ using linkauth_action = action_wrapper<"linkauth"_n, &boot::linkauth>;
+ using unlinkauth_action = action_wrapper<"unlinkauth"_n, &boot::unlinkauth>;
+ using canceldelay_action = action_wrapper<"canceldelay"_n, &boot::canceldelay>;
+ using setcode_action = action_wrapper<"setcode"_n, &boot::setcode>;
+ using setabi_action = action_wrapper<"setabi"_n, &boot::setabi>;
+ using activate_action = action_wrapper<"activate"_n, &boot::activate>;
+ using reqactivated_action = action_wrapper<"reqactivated"_n, &boot::reqactivated>;
+ };
+ /** @}*/ // end of @defgroup eosioboot eosio.boot
+} /// namespace eosioboot
diff --git a/contracts/contracts/eosio.boot/ricardian/eosio.boot.contracts.md.in b/contracts/contracts/eosio.boot/ricardian/eosio.boot.contracts.md.in
new file mode 100644
index 00000000000..8a66a61dd01
--- /dev/null
+++ b/contracts/contracts/eosio.boot/ricardian/eosio.boot.contracts.md.in
@@ -0,0 +1,120 @@
+activate
+
+---
+spec_version: "0.2.0"
+title: Activate Protocol Feature
+summary: 'Activate protocol feature {{nowrap feature_digest}}'
+icon: @ICON_BASE_URL@/@ADMIN_ICON_URI@
+---
+
+{{$action.account}} activates the protocol feature with a digest of {{feature_digest}}.
+
+canceldelay
+
+---
+spec_version: "0.2.0"
+title: Cancel Delayed Transaction
+summary: '{{nowrap canceling_auth.actor}} cancels a delayed transaction'
+icon: @ICON_BASE_URL@/@ACCOUNT_ICON_URI@
+---
+
+{{canceling_auth.actor}} cancels the delayed transaction with id {{trx_id}}.
+
+deleteauth
+
+---
+spec_version: "0.2.0"
+title: Delete Account Permission
+summary: 'Delete the {{nowrap permission}} permission of {{nowrap account}}'
+icon: @ICON_BASE_URL@/@ACCOUNT_ICON_URI@
+---
+
+Delete the {{permission}} permission of {{account}}.
+
+linkauth
+
+---
+spec_version: "0.2.0"
+title: Link Action to Permission
+summary: '{{nowrap account}} sets the minimum required permission for the {{#if type}}{{nowrap type}} action of the{{/if}} {{nowrap code}} contract to {{nowrap requirement}}'
+icon: @ICON_BASE_URL@/@ACCOUNT_ICON_URI@
+---
+
+{{account}} sets the minimum required permission for the {{#if type}}{{type}} action of the{{/if}} {{code}} contract to {{requirement}}.
+
+{{#if type}}{{else}}Any links explicitly associated to specific actions of {{code}} will take precedence.{{/if}}
+
+newaccount
+
+---
+spec_version: "0.2.0"
+title: Create New Account
+summary: '{{nowrap creator}} creates a new account with the name {{nowrap name}}'
+icon: @ICON_BASE_URL@/@ACCOUNT_ICON_URI@
+---
+
+{{creator}} creates a new account with the name {{name}} and the following permissions:
+
+owner permission with authority:
+{{to_json owner}}
+
+active permission with authority:
+{{to_json active}}
+
+reqactivated
+
+---
+spec_version: "0.2.0"
+title: Assert Protocol Feature Activation
+summary: 'Assert that protocol feature {{nowrap feature_digest}} has been activated'
+icon: @ICON_BASE_URL@/@ADMIN_ICON_URI@
+---
+
+Assert that the protocol feature with a digest of {{feature_digest}} has been activated.
+
+setabi
+
+---
+spec_version: "0.2.0"
+title: Deploy Contract ABI
+summary: 'Deploy contract ABI on account {{nowrap account}}'
+icon: @ICON_BASE_URL@/@ACCOUNT_ICON_URI@
+---
+
+Deploy the ABI file associated with the contract on account {{account}}.
+
+setcode
+
+---
+spec_version: "0.2.0"
+title: Deploy Contract Code
+summary: 'Deploy contract code on account {{nowrap account}}'
+icon: @ICON_BASE_URL@/@ACCOUNT_ICON_URI@
+---
+
+Deploy compiled contract code to the account {{account}}.
+
+unlinkauth
+
+---
+spec_version: "0.2.0"
+title: Unlink Action from Permission
+summary: '{{nowrap account}} unsets the minimum required permission for the {{#if type}}{{nowrap type}} action of the{{/if}} {{nowrap code}} contract'
+icon: @ICON_BASE_URL@/@ACCOUNT_ICON_URI@
+---
+
+{{account}} removes the association between the {{#if type}}{{type}} action of the{{/if}} {{code}} contract and its minimum required permission.
+
+{{#if type}}{{else}}This will not remove any links explicitly associated to specific actions of {{code}}.{{/if}}
+
+updateauth
+
+---
+spec_version: "0.2.0"
+title: Modify Account Permission
+summary: 'Add or update the {{nowrap permission}} permission of {{nowrap account}}'
+icon: @ICON_BASE_URL@/@ACCOUNT_ICON_URI@
+---
+
+Modify, and create if necessary, the {{permission}} permission of {{account}} to have a parent permission of {{parent}} and the following authority:
+{{to_json auth}}
diff --git a/contracts/contracts/eosio.boot/src/eosio.boot.cpp b/contracts/contracts/eosio.boot/src/eosio.boot.cpp
new file mode 100644
index 00000000000..03ec928da63
--- /dev/null
+++ b/contracts/contracts/eosio.boot/src/eosio.boot.cpp
@@ -0,0 +1,19 @@
+#include
+#include
+
+namespace eosioboot {
+
+void boot::onerror( ignore, ignore> ) {
+ check( false, "the onerror action cannot be called directly" );
+}
+
+void boot::activate( const eosio::checksum256& feature_digest ) {
+ require_auth( get_self() );
+ eosio::preactivate_feature( feature_digest );
+}
+
+void boot::reqactivated( const eosio::checksum256& feature_digest ) {
+ check( eosio::is_feature_activated( feature_digest ), "protocol feature is not activated" );
+}
+
+}
diff --git a/contracts/enable-kv/README.md b/contracts/enable-kv/README.md
new file mode 100644
index 00000000000..68634ab5307
--- /dev/null
+++ b/contracts/enable-kv/README.md
@@ -0,0 +1,22 @@
+## Summary
+This README illustrates the steps for usage of enable-kv.sh script with kv_map as an example. Set your environment variables as follows before beginning the rest of the steps.
+1. export EOS_2_1_0=[eos 2.1.0 directory]
+1. export EOSIO_CDT_1_8_0=[eosio.cdt 1.8.0 directory]
+1. export PATH=$EOS_2_1_0/build/bin:$PATH
+
+## Steps
+Bring up nodeos in a different terminal
+1. export PATH=$EOS_2_1_0/build/bin:$PATH
+1. nodeos -e -p eosio --plugin eosio::producer_plugin --plugin eosio::producer_api_plugin --plugin eosio::chain_api_plugin --plugin eosio::http_plugin --plugin eosio::history_plugin --plugin eosio::history_api_plugin --filter-on=* --access-control-allow-origin=* --contracts-console --http-validate-host=false --verbose-http-errors --max-transaction-time=1000 --backing-store chainbase --data-dir=datadir
+
+In the first terminal
+1. $EOS_2_1_0/contracts/enable-kv/enable-kv.sh -c $EOS_2_1_0/build/contracts/contracts/
+1. cd $EOSIO_CDT_1_8_0/examples/kv_map
+1. mkdir build
+1. cd build
+1. cmake .. -DCMAKE_PREFIX_PATH=$EOS_2_1_0/build
+1. make
+1. cleos create account eosio jane EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
+1. cleos set contract jane $EOSIO_CDT_1_8_0/examples/kv_map/build/kv_map -p jane@active
+1. cleos push action jane upsert '[1, "jane.acct" "jane", "doe", "1 main st", "new york", "NY", "USA", "123"]' -p jane@active
+1. cleos push action jane get '[1]' -p jane@active
\ No newline at end of file
diff --git a/contracts/enable-kv/enable-kv.sh b/contracts/enable-kv/enable-kv.sh
new file mode 100755
index 00000000000..5980d734f45
--- /dev/null
+++ b/contracts/enable-kv/enable-kv.sh
@@ -0,0 +1,73 @@
+#!/bin/bash
+
+usage()
+{
+ echo "usage: enable-kv.sh -c [-u ]"
+}
+
+while [ "$1" != "" ]; do
+ case $1 in
+ -c | --contracts-dir ) shift
+ contracts_dir=$1
+ ;;
+ -u | --url ) shift
+ url=$1
+ ;;
+ * ) usage
+ exit 1
+ esac
+ shift
+done
+
+if [ "$contracts_dir" = "" ]; then
+ usage
+ exit 1
+fi
+
+if [ "$url" = "" ]; then
+ url=http://127.0.0.1:8888
+fi
+
+curl -X POST $url/v1/producer/schedule_protocol_feature_activations -d '{"protocol_features_to_activate": ["0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd"]}'
+sleep 1s
+cleos set contract eosio $contracts_dir/eosio.boot -p eosio@active
+sleep 1s
+sleep 1s
+sleep 1s
+cleos push action eosio activate '["299dcb6af692324b899b39f16d5a530a33062804e41f09dc97e9f156b4476707"]' -p eosio@active
+sleep 1s
+sleep 1s
+
+# KV_DATABASE
+cleos push action eosio activate '["825ee6288fb1373eab1b5187ec2f04f6eacb39cb3a97f356a07c91622dd61d16"]' -p eosio@active
+# ACTION_RETURN_VALUE
+cleos push action eosio activate '["c3a6138c5061cf291310887c0b5c71fcaffeab90d5deb50d3b9e687cead45071"]' -p eosio@active
+# RAM_RESTRICTIONS
+cleos push action eosio activate '["4e7bf348da00a945489b2a681749eb56f5de00b900014e137ddae39f48f69d67"]' -p eosio@active
+# GET_SENDER
+cleos push action eosio activate '["f0af56d2c5a48d60a4a5b5c903edfb7db3a736a94ed589d0b797df33ff9d3e1d"]' -p eosio@active
+# FORWARD_SETCODE
+cleos push action eosio activate '["2652f5f96006294109b3dd0bbde63693f55324af452b799ee137a81a905eed25"]' -p eosio@active
+# ONLY_BILL_FIRST_AUTHORIZER
+cleos push action eosio activate '["8ba52fe7a3956c5cd3a656a3174b931d3bb2abb45578befc59f283ecd816a405"]' -p eosio@active
+# RESTRICT_ACTION_TO_SELF
+cleos push action eosio activate '["ad9e3d8f650687709fd68f4b90b41f7d825a365b02c23a636cef88ac2ac00c43"]' -p eosio@active
+# DISALLOW_EMPTY_PRODUCER_SCHEDULE
+cleos push action eosio activate '["68dcaa34c0517d19666e6b33add67351d8c5f69e999ca1e37931bc410a297428"]' -p eosio@active
+# FIX_LINKAUTH_RESTRICTION
+cleos push action eosio activate '["e0fb64b1085cc5538970158d05a009c24e276fb94e1a0bf6a528b48fbc4ff526"]' -p eosio@active
+# REPLACE_DEFERRED
+cleos push action eosio activate '["ef43112c6543b88db2283a2e077278c315ae2c84719a8b25f25cc88565fbea99"]' -p eosio@active
+# NO_DUPLICATE_DEFERRED_ID
+cleos push action eosio activate '["4a90c00d55454dc5b059055ca213579c6ea856967712a56017487886a4d4cc0f"]' -p eosio@active
+# ONLY_LINK_TO_EXISTING_PERMISSION
+cleos push action eosio activate '["1a99a59d87e06e09ec5b028a9cbb7749b4a5ad8819004365d02dc4379a8b7241"]' -p eosio@active
+# CONFIGURABLE_WASM_LIMITS
+cleos push action eosio activate '["bf61537fd21c61a60e542a5d66c3f6a78da0589336868307f94a82bccea84e88"]' -p eosio@active
+# BLOCKCHAIN_PARAMETERS
+cleos push action eosio activate '["5443fcf88330c586bc0e5f3dee10e7f63c76c00249c87fe4fbf7f38c082006b4"]' -p eosio@active
+
+sleep 1s
+cleos set contract eosio $contracts_dir/eosio.bios -p eosio@active
+sleep 1s
+cleos push action eosio setkvparams '[{"max_key_size":64, "max_value_size":1024, "max_iterators":128}]' -p eosio@active
diff --git a/docs.json b/docs.json
index 698c666cecb..fa00989b863 100644
--- a/docs.json
+++ b/docs.json
@@ -43,15 +43,6 @@
"disable_summary_gen": true
}
},
- {
- "name": "swagger",
- "options": {
- "swagger_path": "plugins/test_control_api_plugin/test_control.swagger.yaml",
- "swagger_dest_path": "nodeos/plugins/test_control_api_plugin/api-reference",
- "disable_filters": true,
- "disable_summary_gen": true
- }
- },
{
"name": "swagger",
"options": {
@@ -60,6 +51,18 @@
"disable_filters": true,
"disable_summary_gen": true
}
+ },
+ {
+ "name": "doxygen_to_xml",
+ "options": {
+ "INPUT": "libraries/chain/include/eosio/chain/webassembly/interface.hpp plugins/blockvault_client_plugin/include/eosio/blockvault_client_plugin/blockvault.hpp"
+ },
+ "disable_default_filters" :true,
+ "filters" : []
+ },
+ {
+ "name": "doxybook",
+ "options": {}
}
]
}
diff --git a/docs/00_install/00_install-prebuilt-binaries.md b/docs/00_install/00_install-prebuilt-binaries.md
index d9e51f95174..856e43a485a 100644
--- a/docs/00_install/00_install-prebuilt-binaries.md
+++ b/docs/00_install/00_install-prebuilt-binaries.md
@@ -22,16 +22,20 @@ brew remove eosio
```
### Ubuntu Linux:
-
+#### Ubuntu 20.04 Package Install
+```sh
+wget https://github.com/eosio/eos/releases/download/v2.1.0/eosio_2.1.0-1-ubuntu-20.04_amd64.deb
+sudo apt install ./eosio_2.1.0-1-ubuntu-20.04_amd64.deb
+```
#### Ubuntu 18.04 Package Install
```sh
-wget https://github.com/eosio/eos/releases/download/v2.0.12/eosio_2.0.12-1-ubuntu-18.04_amd64.deb
-sudo apt install ./eosio_2.0.12-1-ubuntu-18.04_amd64.deb
+wget https://github.com/eosio/eos/releases/download/v2.1.0/eosio_2.1.0-1-ubuntu-18.04_amd64.deb
+sudo apt install ./eosio_2.1.0-1-ubuntu-18.04_amd64.deb
```
#### Ubuntu 16.04 Package Install
```sh
-wget https://github.com/eosio/eos/releases/download/v2.0.12/eosio_2.0.12-1-ubuntu-16.04_amd64.deb
-sudo apt install ./eosio_2.0.12-1-ubuntu-16.04_amd64.deb
+wget https://github.com/eosio/eos/releases/download/v2.1.0/eosio_2.1.0-1-ubuntu-16.04_amd64.deb
+sudo apt install ./eosio_2.1.0-1-ubuntu-16.04_amd64.deb
```
#### Ubuntu Package Uninstall
```sh
@@ -40,10 +44,15 @@ sudo apt remove eosio
### RPM-based (CentOS, Amazon Linux, etc.):
-#### RPM Package Install
+#### RPM Package Install CentOS 7
+```sh
+wget https://github.com/eosio/eos/releases/download/v2.1.0/eosio-2.1.0-1.el7.x86_64.rpm
+sudo yum install ./eosio-2.1.0-1.el7.x86_64.rpm
+```
+#### RPM Package Install CentOS 8
```sh
-wget https://github.com/eosio/eos/releases/download/v2.0.12/eosio-2.0.12-1.el7.x86_64.rpm
-sudo yum install ./eosio-2.0.12-1.el7.x86_64.rpm
+wget https://github.com/eosio/eos/releases/download/v2.1.0/eosio-2.1.0-1.el8.x86_64.rpm
+sudo yum install ./eosio-2.1.0-1.el8.x86_64.rpm
```
#### RPM Package Uninstall
```sh
diff --git a/docs/00_install/01_build-from-source/02_manual-build/03_platforms/amazon_linux-2.md b/docs/00_install/01_build-from-source/02_manual-build/03_platforms/amazon_linux-2.md
index dbc27799114..21d69ed9505 100644
--- a/docs/00_install/01_build-from-source/02_manual-build/03_platforms/amazon_linux-2.md
+++ b/docs/00_install/01_build-from-source/02_manual-build/03_platforms/amazon_linux-2.md
@@ -57,29 +57,6 @@ cd $EOSIO_INSTALL_LOCATION && curl -LO https://boostorg.jfrog.io/artifactory/mai
./bootstrap.sh --prefix=$EOSIO_INSTALL_LOCATION && \
./b2 --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(nproc) install && \
rm -rf $EOSIO_INSTALL_LOCATION/boost_1_71_0.tar.bz2 $EOSIO_INSTALL_LOCATION/boost_1_71_0
-# build mongodb
-cd $EOSIO_INSTALL_LOCATION && curl -LO https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-3.6.3.tgz && \
- tar -xzf mongodb-linux-x86_64-amazon-3.6.3.tgz && rm -f mongodb-linux-x86_64-amazon-3.6.3.tgz && \
- mv $EOSIO_INSTALL_LOCATION/mongodb-linux-x86_64-amazon-3.6.3/bin/* $EOSIO_INSTALL_LOCATION/bin/ && \
- rm -rf $EOSIO_INSTALL_LOCATION/mongodb-linux-x86_64-amazon-3.6.3
-# build mongodb c driver
-cd $EOSIO_INSTALL_LOCATION && curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/1.13.0/mongo-c-driver-1.13.0.tar.gz && \
- tar -xzf mongo-c-driver-1.13.0.tar.gz && cd mongo-c-driver-1.13.0 && \
- mkdir -p build && cd build && \
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$EOSIO_INSTALL_LOCATION -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON -DENABLE_ICU=OFF -DENABLE_SNAPPY=OFF .. && \
- make -j$(nproc) && \
- make install && \
- rm -rf $EOSIO_INSTALL_LOCATION/mongo-c-driver-1.13.0.tar.gz $EOSIO_INSTALL_LOCATION/mongo-c-driver-1.13.0
-# build mongodb cxx driver
-cd $EOSIO_INSTALL_LOCATION && curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o mongo-cxx-driver-r3.4.0.tar.gz && \
- tar -xzf mongo-cxx-driver-r3.4.0.tar.gz && cd mongo-cxx-driver-r3.4.0 && \
- sed -i 's/\"maxAwaitTimeMS\", count/\"maxAwaitTimeMS\", static_cast(count)/' src/mongocxx/options/change_stream.cpp && \
- sed -i 's/add_subdirectory(test)//' src/mongocxx/CMakeLists.txt src/bsoncxx/CMakeLists.txt && \
- mkdir -p build && cd build && \
- cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$EOSIO_INSTALL_LOCATION .. && \
- make -j$(nproc) && \
- make install && \
- rm -rf $EOSIO_INSTALL_LOCATION/mongo-cxx-driver-r3.4.0.tar.gz $EOSIO_INSTALL_LOCATION/mongo-cxx-driver-r3.4.0
```
## Build EOSIO
@@ -91,7 +68,7 @@ These commands build the EOSIO software on the specified OS. Make sure to [Insta
```sh
export EOSIO_BUILD_LOCATION=$EOSIO_LOCATION/build
mkdir -p $EOSIO_BUILD_LOCATION
-cd $EOSIO_BUILD_LOCATION && $EOSIO_INSTALL_LOCATION/bin/cmake -DCMAKE_BUILD_TYPE='Release' -DCMAKE_CXX_COMPILER='clang++' -DCMAKE_C_COMPILER='clang' -DCMAKE_INSTALL_PREFIX=$EOSIO_INSTALL_LOCATION -DBUILD_MONGO_DB_PLUGIN=true $EOSIO_LOCATION
+cd $EOSIO_BUILD_LOCATION && $EOSIO_INSTALL_LOCATION/bin/cmake -DCMAKE_BUILD_TYPE='Release' -DCMAKE_CXX_COMPILER='clang++' -DCMAKE_C_COMPILER='clang' -DCMAKE_INSTALL_PREFIX=$EOSIO_INSTALL_LOCATION $EOSIO_LOCATION
cd $EOSIO_BUILD_LOCATION && make -j$(nproc)
```
@@ -104,7 +81,6 @@ cd $EOSIO_BUILD_LOCATION && make install
## Test EOSIO
These commands validate the EOSIO software installation on the specified OS. This task is optional but recommended. Make sure to [Install EOSIO](#install-eosio) first.
```sh
-$EOSIO_INSTALL_LOCATION/bin/mongod --fork --logpath $(pwd)/mongod.log --dbpath $(pwd)/mongodata
cd $EOSIO_BUILD_LOCATION && make test
```
diff --git a/docs/00_install/01_build-from-source/02_manual-build/03_platforms/centos-7.7.md b/docs/00_install/01_build-from-source/02_manual-build/03_platforms/centos-7.7.md
index 8f4222d3a6c..8a7fdbd5aec 100644
--- a/docs/00_install/01_build-from-source/02_manual-build/03_platforms/centos-7.7.md
+++ b/docs/00_install/01_build-from-source/02_manual-build/03_platforms/centos-7.7.md
@@ -42,7 +42,7 @@ yum update -y && \
yum --enablerepo=extras install -y centos-release-scl && \
yum --enablerepo=extras install -y devtoolset-8 && \
yum --enablerepo=extras install -y which git autoconf automake libtool make bzip2 doxygen \
- graphviz bzip2-devel openssl-devel gmp-devel ocaml libicu-devel \
+ graphviz bzip2-devel openssl-devel gmp-devel ocaml \
python python-devel rh-python36 file libusbx-devel \
libcurl-devel patch vim-common jq llvm-toolset-7.0-llvm-devel llvm-toolset-7.0-llvm-static
# build cmake
@@ -65,31 +65,6 @@ cd $EOSIO_INSTALL_LOCATION && curl -LO https://boostorg.jfrog.io/artifactory/mai
./bootstrap.sh --prefix=$EOSIO_INSTALL_LOCATION && \
./b2 --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(nproc) install && \
rm -rf $EOSIO_INSTALL_LOCATION/boost_1_71_0.tar.bz2 $EOSIO_INSTALL_LOCATION/boost_1_71_0
-# build mongodb
-cd $EOSIO_INSTALL_LOCATION && curl -LO https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-3.6.3.tgz && \
- tar -xzf mongodb-linux-x86_64-amazon-3.6.3.tgz && rm -f mongodb-linux-x86_64-amazon-3.6.3.tgz && \
- mv $EOSIO_INSTALL_LOCATION/mongodb-linux-x86_64-amazon-3.6.3/bin/* $EOSIO_INSTALL_LOCATION/bin/ && \
- rm -rf $EOSIO_INSTALL_LOCATION/mongodb-linux-x86_64-amazon-3.6.3
-# build mongodb c driver
-cd $EOSIO_INSTALL_LOCATION && curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/1.13.0/mongo-c-driver-1.13.0.tar.gz && \
- source /opt/rh/devtoolset-8/enable && \
- tar -xzf mongo-c-driver-1.13.0.tar.gz && cd mongo-c-driver-1.13.0 && \
- mkdir -p build && cd build && \
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$EOSIO_INSTALL_LOCATION -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON -DENABLE_ICU=OFF -DENABLE_SNAPPY=OFF .. && \
- make -j$(nproc) && \
- make install && \
- rm -rf $EOSIO_INSTALL_LOCATION/mongo-c-driver-1.13.0.tar.gz $EOSIO_INSTALL_LOCATION/mongo-c-driver-1.13.0
-# build mongodb cxx driver
-cd $EOSIO_INSTALL_LOCATION && curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o mongo-cxx-driver-r3.4.0.tar.gz && \
- source /opt/rh/devtoolset-8/enable && \
- tar -xzf mongo-cxx-driver-r3.4.0.tar.gz && cd mongo-cxx-driver-r3.4.0 && \
- sed -i 's/\"maxAwaitTimeMS\", count/\"maxAwaitTimeMS\", static_cast(count)/' src/mongocxx/options/change_stream.cpp && \
- sed -i 's/add_subdirectory(test)//' src/mongocxx/CMakeLists.txt src/bsoncxx/CMakeLists.txt && \
- mkdir -p build && cd build && \
- cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$EOSIO_INSTALL_LOCATION .. && \
- make -j$(nproc) && \
- make install && \
- rm -rf $EOSIO_INSTALL_LOCATION/mongo-cxx-driver-r3.4.0.tar.gz $EOSIO_INSTALL_LOCATION/mongo-cxx-driver-r3.4.0
```
## Build EOSIO
@@ -101,7 +76,7 @@ These commands build the EOSIO software on the specified OS. Make sure to [Insta
```sh
export EOSIO_BUILD_LOCATION=$EOSIO_LOCATION/build
mkdir -p $EOSIO_BUILD_LOCATION
-cd $EOSIO_BUILD_LOCATION && source /opt/rh/devtoolset-8/enable && cmake -DCMAKE_BUILD_TYPE='Release' -DLLVM_DIR='/opt/rh/llvm-toolset-7.0/root/usr/lib64/cmake/llvm' -DCMAKE_INSTALL_PREFIX=$EOSIO_INSTALL_LOCATION -DBUILD_MONGO_DB_PLUGIN=true $EOSIO_LOCATION
+cd $EOSIO_BUILD_LOCATION && source /opt/rh/devtoolset-8/enable && cmake -DCMAKE_BUILD_TYPE='Release' -DLLVM_DIR='/opt/rh/llvm-toolset-7.0/root/usr/lib64/cmake/llvm' -DCMAKE_INSTALL_PREFIX=$EOSIO_INSTALL_LOCATION $EOSIO_LOCATION
cd $EOSIO_BUILD_LOCATION && make -j$(nproc)
```
@@ -114,7 +89,6 @@ cd $EOSIO_BUILD_LOCATION && make install
## Test EOSIO
These commands validate the EOSIO software installation on the specified OS. This task is optional but recommended. Make sure to [Install EOSIO](#install-eosio) first.
```sh
-$EOSIO_INSTALL_LOCATION/bin/mongod --fork --logpath $(pwd)/mongod.log --dbpath $(pwd)/mongodata
cd $EOSIO_BUILD_LOCATION && source /opt/rh/rh-python36/enable && make test
```
diff --git a/docs/00_install/01_build-from-source/02_manual-build/03_platforms/macos-10.14.md b/docs/00_install/01_build-from-source/02_manual-build/03_platforms/macos-10.14.md
index 55bfe48afc5..15e58cc1064 100644
--- a/docs/00_install/01_build-from-source/02_manual-build/03_platforms/macos-10.14.md
+++ b/docs/00_install/01_build-from-source/02_manual-build/03_platforms/macos-10.14.md
@@ -39,27 +39,6 @@ These commands install the EOSIO software dependencies. Make sure to [Download
# install dependencies
brew install cmake python libtool libusb graphviz automake wget gmp pkgconfig doxygen openssl@1.1 jq boost || :
export PATH=$EOSIO_INSTALL_LOCATION/bin:$PATH
-# install mongodb
-mkdir -p $EOSIO_INSTALL_LOCATION/bin
-cd $EOSIO_INSTALL_LOCATION && curl -OL https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-3.6.3.tgz
- tar -xzf mongodb-osx-ssl-x86_64-3.6.3.tgz && rm -f mongodb-osx-ssl-x86_64-3.6.3.tgz && \
- mv $EOSIO_INSTALL_LOCATION/mongodb-osx-x86_64-3.6.3/bin/* $EOSIO_INSTALL_LOCATION/bin/ && \
- rm -rf $EOSIO_INSTALL_LOCATION/mongodb-osx-x86_64-3.6.3 && rm -rf $EOSIO_INSTALL_LOCATION/mongodb-osx-ssl-x86_64-3.6.3.tgz
-# install mongo-c-driver from source
-cd $EOSIO_INSTALL_LOCATION && curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/1.13.0/mongo-c-driver-1.13.0.tar.gz && \
- tar -xzf mongo-c-driver-1.13.0.tar.gz && cd mongo-c-driver-1.13.0 && \
- mkdir -p cmake-build && cd cmake-build && \
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$EOSIO_INSTALL_LOCATION -DENABLE_BSON=ON -DENABLE_SSL=DARWIN -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON -DENABLE_ICU=OFF -DENABLE_SASL=OFF -DENABLE_SNAPPY=OFF .. && \
- make -j $(getconf _NPROCESSORS_ONLN) && \
- make install && \
- rm -rf $EOSIO_INSTALL_LOCATION/mongo-c-driver-1.13.0.tar.gz $EOSIO_INSTALL_LOCATION/mongo-c-driver-1.13.0
-# install mongo-cxx-driver from source
-cd $EOSIO_INSTALL_LOCATION && curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o mongo-cxx-driver-r3.4.0.tar.gz && \
- tar -xzf mongo-cxx-driver-r3.4.0.tar.gz && cd mongo-cxx-driver-r3.4.0/build && \
- cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$EOSIO_INSTALL_LOCATION .. && \
- make -j $(getconf _NPROCESSORS_ONLN) VERBOSE=1 && \
- make install && \
- rm -rf $EOSIO_INSTALL_LOCATION/mongo-cxx-driver-r3.4.0.tar.gz $EOSIO_INSTALL_LOCATION/mongo-cxx-driver-r3.4.0
```
## Build EOSIO
@@ -71,7 +50,7 @@ These commands build the EOSIO software on the specified OS. Make sure to [Insta
```sh
export EOSIO_BUILD_LOCATION=$EOSIO_LOCATION/build
mkdir -p $EOSIO_BUILD_LOCATION
-cd $EOSIO_BUILD_LOCATION && cmake -DCMAKE_BUILD_TYPE='Release' -DCMAKE_INSTALL_PREFIX=$EOSIO_INSTALL_LOCATION -DBUILD_MONGO_DB_PLUGIN=true $EOSIO_LOCATION
+cd $EOSIO_BUILD_LOCATION && cmake -DCMAKE_BUILD_TYPE='Release' -DCMAKE_INSTALL_PREFIX=$EOSIO_INSTALL_LOCATION $EOSIO_LOCATION
cd $EOSIO_BUILD_LOCATION && make -j$(getconf _NPROCESSORS_ONLN)
```
@@ -84,7 +63,6 @@ cd $EOSIO_BUILD_LOCATION && make install
## Test EOSIO
These commands validate the EOSIO software installation on the specified OS. This task is optional but recommended. Make sure to [Install EOSIO](#install-eosio) first.
```sh
-$EOSIO_INSTALL_LOCATION/bin/mongod --fork --logpath $(pwd)/mongod.log --dbpath $(pwd)/mongodata
cd $EOSIO_BUILD_LOCATION && make test
```
diff --git a/docs/00_install/01_build-from-source/02_manual-build/03_platforms/ubuntu-18.04.md b/docs/00_install/01_build-from-source/02_manual-build/03_platforms/ubuntu-18.04.md
index 31659865aa7..49717b5f101 100644
--- a/docs/00_install/01_build-from-source/02_manual-build/03_platforms/ubuntu-18.04.md
+++ b/docs/00_install/01_build-from-source/02_manual-build/03_platforms/ubuntu-18.04.md
@@ -38,7 +38,7 @@ These commands install the EOSIO software dependencies. Make sure to [Download
```sh
# install dependencies
apt-get install -y make bzip2 automake libbz2-dev libssl-dev doxygen graphviz libgmp3-dev \
- autotools-dev libicu-dev python2.7 python2.7-dev python3 python3-dev \
+ autotools-dev python2.7 python2.7-dev python3 python3-dev \
autoconf libtool curl zlib1g-dev sudo ruby libusb-1.0-0-dev \
libcurl4-gnutls-dev pkg-config patch llvm-7-dev clang-7 vim-common jq
# build cmake
@@ -57,29 +57,6 @@ cd $EOSIO_INSTALL_LOCATION && curl -LO https://boostorg.jfrog.io/artifactory/mai
./bootstrap.sh --prefix=$EOSIO_INSTALL_LOCATION && \
./b2 --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -q -j$(nproc) install && \
rm -rf $EOSIO_INSTALL_LOCATION/boost_1_71_0.tar.bz2 $EOSIO_INSTALL_LOCATION/boost_1_71_0
-# build mongodb
-cd $EOSIO_INSTALL_LOCATION && curl -LO https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-4.1.1.tgz && \
- tar -xzf mongodb-linux-x86_64-ubuntu1804-4.1.1.tgz && rm -f mongodb-linux-x86_64-ubuntu1804-4.1.1.tgz && \
- mv $EOSIO_INSTALL_LOCATION/mongodb-linux-x86_64-ubuntu1804-4.1.1/bin/* $EOSIO_INSTALL_LOCATION/bin/ && \
- rm -rf $EOSIO_INSTALL_LOCATION/mongodb-linux-x86_64-ubuntu1804-4.1.1
-# build mongodb c driver
-cd $EOSIO_INSTALL_LOCATION && curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/1.13.0/mongo-c-driver-1.13.0.tar.gz && \
- tar -xzf mongo-c-driver-1.13.0.tar.gz && cd mongo-c-driver-1.13.0 && \
- mkdir -p build && cd build && \
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$EOSIO_INSTALL_LOCATION -DENABLE_BSON=ON -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON -DENABLE_ICU=OFF -DENABLE_SNAPPY=OFF .. && \
- make -j$(nproc) && \
- make install && \
- rm -rf $EOSIO_INSTALL_LOCATION/mongo-c-driver-1.13.0.tar.gz $EOSIO_INSTALL_LOCATION/mongo-c-driver-1.13.0
-# build mongodb cxx driver
-cd $EOSIO_INSTALL_LOCATION && curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o mongo-cxx-driver-r3.4.0.tar.gz && \
- tar -xzf mongo-cxx-driver-r3.4.0.tar.gz && cd mongo-cxx-driver-r3.4.0 && \
- sed -i 's/\"maxAwaitTimeMS\", count/\"maxAwaitTimeMS\", static_cast(count)/' src/mongocxx/options/change_stream.cpp && \
- sed -i 's/add_subdirectory(test)//' src/mongocxx/CMakeLists.txt src/bsoncxx/CMakeLists.txt && \
- mkdir -p build && cd build && \
- cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$EOSIO_INSTALL_LOCATION .. && \
- make -j$(nproc) && \
- make install && \
- rm -rf $EOSIO_INSTALL_LOCATION/mongo-cxx-driver-r3.4.0.tar.gz $EOSIO_INSTALL_LOCATION/mongo-cxx-driver-r3.4.0
```
## Build EOSIO
@@ -91,7 +68,7 @@ These commands build the EOSIO software on the specified OS. Make sure to [Insta
```sh
export EOSIO_BUILD_LOCATION=$EOSIO_LOCATION/build
mkdir -p $EOSIO_BUILD_LOCATION
-cd $EOSIO_BUILD_LOCATION && cmake -DCMAKE_BUILD_TYPE='Release' -DCMAKE_CXX_COMPILER='clang++-7' -DCMAKE_C_COMPILER='clang-7' -DLLVM_DIR='/usr/lib/llvm-7/lib/cmake/llvm' -DCMAKE_INSTALL_PREFIX=$EOSIO_INSTALL_LOCATION -DBUILD_MONGO_DB_PLUGIN=true $EOSIO_LOCATION
+cd $EOSIO_BUILD_LOCATION && cmake -DCMAKE_BUILD_TYPE='Release' -DCMAKE_CXX_COMPILER='clang++-7' -DCMAKE_C_COMPILER='clang-7' -DLLVM_DIR='/usr/lib/llvm-7/lib/cmake/llvm' -DCMAKE_INSTALL_PREFIX=$EOSIO_INSTALL_LOCATION $EOSIO_LOCATION
cd $EOSIO_BUILD_LOCATION && make -j$(nproc)
```
@@ -104,7 +81,6 @@ cd $EOSIO_BUILD_LOCATION && make install
## Test EOSIO
These commands validate the EOSIO software installation on the specified OS. Make sure to [Install EOSIO](#install-eosio) first. (**Note**: This task is optional but recommended.)
```sh
-$EOSIO_INSTALL_LOCATION/bin/mongod --fork --logpath $(pwd)/mongod.log --dbpath $(pwd)/mongodata
cd $EOSIO_BUILD_LOCATION && make test
```
diff --git a/docs/00_install/index.md b/docs/00_install/index.md
index 3153b2547c6..517a6d7a3b8 100644
--- a/docs/00_install/index.md
+++ b/docs/00_install/index.md
@@ -12,13 +12,18 @@ There are various ways to install and use the EOSIO software:
## Supported Operating Systems
-EOSIO currently supports the following operating systems:
+The EOSIO software supports the following environments for development and/or deployment:
-1. Amazon Linux 2
-2. CentOS 7
-3. Ubuntu 16.04
-4. Ubuntu 18.04
-5. MacOS 10.14 (Mojave)
+**Linux Distributions**
+* Amazon Linux 2
+* CentOS Linux 8.x
+* CentOS Linux 7.x
+* Ubuntu 20.04
+* Ubuntu 18.04
+* Ubuntu 16.04
+
+**macOS**
+* macOS 10.14 (Mojave) or later
[[info | Note]]
| It may be possible to install EOSIO on other Unix-based operating systems. This is not officially supported, though.
diff --git a/docs/01_nodeos/02_usage/03_development-environment/00_local-single-node-testnet.md b/docs/01_nodeos/02_usage/03_development-environment/00_local-single-node-testnet.md
index 53ca22048c4..e5e1bceae9c 100644
--- a/docs/01_nodeos/02_usage/03_development-environment/00_local-single-node-testnet.md
+++ b/docs/01_nodeos/02_usage/03_development-environment/00_local-single-node-testnet.md
@@ -8,7 +8,7 @@ This section describes how to set up a single-node blockchain configuration runn

-`cleos` is used to manage the wallets, manage the accounts, and invoke actions on the blockchain. `keosd` performs wallet management, including digital signing. If not started explicitly, `keosd` is started by `cleos` by default.
+`cleos` is used to interact with wallets, and send actions to the blockchain. `keosd` performs wallet management, including digital signing. If not started explicitly, `keosd` is started by `cleos` by default.
## Before you begin
@@ -115,8 +115,9 @@ nodeos
* Mac OS: `~/Library/Application\ Support/eosio/nodeos/data`
* Linux: `~/.local/share/eosio/nodeos/data`
-
+
A data folder can be specified using the `--data-dir` command line argument to `nodeos`.
[[info | What's next?]]
-| We will explore how to setup and run a [single-host, multi-node testnet](01_local-multi-node-testnet.md).
+| You can explore how to setup and run a [single-host, single-node testnet with consensus](10_local-single-node-testnet-consensus.md) or
+| You can explore how to setup and run a [single-host, multi-node testnet](20_local-multi-node-testnet.md).
diff --git a/docs/01_nodeos/02_usage/03_development-environment/10_local-single-node-testnet-consensus.md b/docs/01_nodeos/02_usage/03_development-environment/10_local-single-node-testnet-consensus.md
new file mode 100644
index 00000000000..8e5d4d92533
--- /dev/null
+++ b/docs/01_nodeos/02_usage/03_development-environment/10_local-single-node-testnet-consensus.md
@@ -0,0 +1,202 @@
+---
+content_title: Local Single-Node Testnet With Consensus Protocol
+link_text: Local Single-Node Testnet With Consensus Protocol
+---
+
+## Goal
+
+This section describes how to set up a single-node blockchain configuration running on a single host with [consensus protocol](https://developers.eos.io/welcome/v2.1/protocol/consensus_protocol) enabled. This is referred to as a _**single host, single-node testnet with consensus**_. We will set up one node on your local computer and have it produce blocks. The following diagram depicts the desired single host testnet.
+
+
+
+`cleos` is used to interact with wallets, and send actions to the blockchain. `keosd` performs wallet management, including digital signing. If not started explicitly, `keosd` is started by `cleos` by default.
+
+## Before you begin
+
+* [Install the EOSIO software](../../../00_install/index.md) before starting this section.
+* It is assumed that `nodeos`, `cleos`, and `keosd` are accessible through the path
+* Know how to pass [Nodeos options](../../02_usage/00_nodeos-options.md) to enable or disable functionality.
+
+## Steps
+
+Open one "terminal" window and perform the following steps:
+
+1. [Add the development key to the wallet](#1-add-the-development-key-to-the-wallet)
+2. [Start the Producer Node](#2-start-the-producer-node)
+3. [Preactivate Protocol Features](#3-preactivate-protocol-features)
+4. [Get the System Smart Contracts](#4-get-the-system-smart-contracts)
+5. [Install eosio.boot System Contract](#5-install-eosioboot-system-contract)
+6. [Activate the Remaining Protocol Features](#6-activate-the-remaining-protocol-features)
+7. [Install eosio.bios System Contract](#7-install-eosiobios-system-contract)
+
+### 1. Add the development key to the wallet
+
+Execute the following at the command prompt:
+
+```sh
+cleos wallet import --private-key 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3
+```
+
+### 2. Start the Producer Node
+
+Start your own single-node blockchain with this single command:
+
+```sh
+nodeos -e -p eosio --plugin eosio::producer_plugin --plugin eosio::producer_api_plugin --plugin eosio::chain_api_plugin --access-control-allow-origin='*' --contracts-console --http-validate-host=false --verbose-http-errors
+```
+
+[[warning | Security Notice]]
+| Do not use the parameters `--access-control-allow-origin='*'`, `--http-validate-host=false`, `--verbose-http-errors` and `--contracts-console`, in production because they either weaken the security or affect performance of your node.
+
+After running `nodeos`, you should get log messages similar to the ones below. It means the blocks are successfully produced.
+
+```sh
+info 2021-01-07T15:59:07.902 thread-0 producer_plugin.cpp:2053 produce_block ] Produced block 98fa5cdd7ce06ae8... #162 @ 2021-01-07T15:59:08.000 signed by eosio [trxs: 0, lib: 161, confirmed: 0]
+info 2021-01-07T15:59:08.401 thread-0 producer_plugin.cpp:2053 produce_block ] Produced block 972190051a840992... #163 @ 2021-01-07T15:59:08.500 signed by eosio [trxs: 0, lib: 162, confirmed: 0]
+info 2021-01-07T15:59:08.901 thread-0 producer_plugin.cpp:2053 produce_block ] Produced block d8727439a26f36f6... #164 @ 2021-01-07T15:59:09.000 signed by eosio [trxs: 0, lib: 163, confirmed: 0]
+info 2021-01-07T15:59:09.401 thread-0 producer_plugin.cpp:2053 produce_block ] Produced block 6f2302aeb944c5ca... #165 @ 2021-01-07T15:59:09.500 signed by eosio [trxs: 0, lib: 164, confirmed: 0]
+...
+info 2021-01-07T15:59:10.902 thread-0 producer_plugin.cpp:2053 produce_block ] Produced block 8cd2384a28818e19... #168 @ 2021-01-07T15:59:11.000 signed by eosio [trxs: 0, lib: 167, confirmed: 0]
+...
+info 2021-01-07T15:59:11.900 thread-0 producer_plugin.cpp:2053 produce_block ] Produced block c8c82b50249e9f6d... #170 @ 2021-01-07T15:59:12.000 signed by eosio [trxs: 0, lib: 169, confirmed: 0]
+...
+```
+
+At this point, `nodeos` is running with a single producer, `eosio`.
+
+### 3. Preactivate Protocol Features
+
+All of the protocol upgrade features introduced in v1.8 and on subsequent versions require a special protocol feature, also known as `PREACTIVATE_FEATURE`, to be activated.
+
+To activate the special protocol `PREACTIVATE_FEATURE` run the following command from a terminal:
+
+```sh
+curl --request POST \
+ --url http://127.0.0.1:8888/v1/producer/schedule_protocol_feature_activations \
+ -d '{"protocol_features_to_activate": ["0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd"]}'
+```
+
+### 4. Get the System Smart Contracts
+
+All of the protocol upgrade features introduced in v1.8 and on subsequent versions also require an updated version of the system smart contract which can make use of those protocol features.
+
+Two updated reference system smart contracts, `eosio.boot` and `eosio.bios`, are available in both source and binary form within the [`eos`](https://github.com/EOSIO/eos.git) repository. You can build them from source or deploy the binaries directly.
+
+#### 4.1 Use the Prebuilt System Smart Contracts
+
+To use the prebuilt system smart contract execute the following commands from a terminal:
+
+```sh
+cd ~
+git clone https://github.com/EOSIO/eos.git
+cd ./eos/contracts/contracts/
+pwd
+```
+
+Note the path printed at the command prompt, we will refer to it later as `EOSIO_SYSTEM_CONTRACTS_DIRECTORY`.
+
+Alternatively you can build the system smart contracts from source with the following commands:
+
+```sh
+cd ~
+git clone https://github.com/EOSIO/eos.git
+cd ./eos/contracts/contracts/
+mkdir build
+cd build
+cmake ..
+make
+pwd
+```
+
+### 5. Install eosio.boot System Contract
+
+To install the `eosio.boot` system contract execute the following command from a terminal. Make sure you replace the `EOSIO_SYSTEM_CONTRACTS_DIRECTORY` with the directory path where the `eosio.boot.wasm` and `eosio.boot.abi` files are located.
+
+```sh
+cleos set contract eosio EOSIO_SYSTEM_CONTRACTS_DIRECTORY/eosio.boot/bin/ eosio.boot.wasm eosio.boot.abi
+```
+
+You should see something similar to the following output:
+
+```sh
+Reading WAST/WASM from /users/documents/eos/contracts/contracts/eosio.boot/build/eosio.boot.wasm...
+Using already assembled WASM...
+Publishing contract...
+executed transaction: 2150ed87e4564cd3fe98ccdea841dc9ff67351f9315b6384084e8572a35887cc 39968 bytes 4395 us
+# eosio <= eosio::setcode {"account":"eosio","vmtype":0,"vmversion":0,"code":"0061736d0100000001be023060027f7e0060067f7e7e7f7f...
+# eosio <= eosio::setabi {"account":"eosio","abi":{"types":[],"structs":[{"name":"buyrambytes","base":"","fields":[{"name":"p...
+```
+
+### 6. Activate the Remaining Protocol Features
+
+After you deploy the `eosio.boot` contract, run the following commands from a terminal to enable the rest of the features which are highly recommended to enable an EOSIO-based blockchain.
+
+[[info | Optional Step]]
+|These features are optional. You can choose to enable or continue without these features; however they are highly recommended for an EOSIO-based blockchain.
+
+```sh
+echo KV_DATABASE
+cleos push action eosio activate '["825ee6288fb1373eab1b5187ec2f04f6eacb39cb3a97f356a07c91622dd61d16"]' -p eosio
+
+echo ACTION_RETURN_VALUE
+cleos push action eosio activate '["c3a6138c5061cf291310887c0b5c71fcaffeab90d5deb50d3b9e687cead45071"]' -p eosio
+
+echo CONFIGURABLE_WASM_LIMITS
+cleos push action eosio activate '["bf61537fd21c61a60e542a5d66c3f6a78da0589336868307f94a82bccea84e88"]' -p eosio
+
+echo BLOCKCHAIN_PARAMETERS
+cleos push action eosio activate '["5443fcf88330c586bc0e5f3dee10e7f63c76c00249c87fe4fbf7f38c082006b4"]' -p eosio
+
+echo GET_SENDER
+cleos push action eosio activate '["f0af56d2c5a48d60a4a5b5c903edfb7db3a736a94ed589d0b797df33ff9d3e1d"]' -p eosio
+
+echo FORWARD_SETCODE
+cleos push action eosio activate '["2652f5f96006294109b3dd0bbde63693f55324af452b799ee137a81a905eed25"]' -p eosio
+
+echo ONLY_BILL_FIRST_AUTHORIZER
+cleos push action eosio activate '["8ba52fe7a3956c5cd3a656a3174b931d3bb2abb45578befc59f283ecd816a405"]' -p eosio
+
+echo RESTRICT_ACTION_TO_SELF
+cleos push action eosio activate '["ad9e3d8f650687709fd68f4b90b41f7d825a365b02c23a636cef88ac2ac00c43"]' -p eosio
+
+echo DISALLOW_EMPTY_PRODUCER_SCHEDULE
+cleos push action eosio activate '["68dcaa34c0517d19666e6b33add67351d8c5f69e999ca1e37931bc410a297428"]' -p eosio
+
+ echo FIX_LINKAUTH_RESTRICTION
+cleos push action eosio activate '["e0fb64b1085cc5538970158d05a009c24e276fb94e1a0bf6a528b48fbc4ff526"]' -p eosio
+
+ echo REPLACE_DEFERRED
+cleos push action eosio activate '["ef43112c6543b88db2283a2e077278c315ae2c84719a8b25f25cc88565fbea99"]' -p eosio
+
+echo NO_DUPLICATE_DEFERRED_ID
+cleos push action eosio activate '["4a90c00d55454dc5b059055ca213579c6ea856967712a56017487886a4d4cc0f"]' -p eosio
+
+echo ONLY_LINK_TO_EXISTING_PERMISSION
+cleos push action eosio activate '["1a99a59d87e06e09ec5b028a9cbb7749b4a5ad8819004365d02dc4379a8b7241"]' -p eosio
+
+echo RAM_RESTRICTIONS
+cleos push action eosio activate '["4e7bf348da00a945489b2a681749eb56f5de00b900014e137ddae39f48f69d67"]' -p eosio
+
+echo WEBAUTHN_KEY
+cleos push action eosio activate '["4fca8bd82bbd181e714e283f83e1b45d95ca5af40fb89ad3977b653c448f78c2"]' -p eosio
+
+echo WTMSIG_BLOCK_SIGNATURES
+cleos push action eosio activate '["299dcb6af692324b899b39f16d5a530a33062804e41f09dc97e9f156b4476707"]' -p eosio
+```
+
+### 7. Install eosio.bios System Contract
+
+To deploy the `eosio.bios` system contract execute the following command from a terminal. Make sure you replace the `EOSIO_SYSTEM_CONTRACTS_DIRECTORY` with the directory path where the `eosio.bios.wasm` and `eosio.bios.abi` files are located.
+
+```sh
+cleos set contract eosio EOSIO_SYSTEM_CONTRACTS_DIRECTORY/eosio.bios/bin/ eosio.bios.wasm eosio.bios.abi
+```
+
+If you want instead of `eosio.bios`, a more elaborate system smart contract like `eosio.system`, you have to build it first and then execute the following command from a terminal (or from the shell). Make sure you replace the `EOSIO_SYSTEM_CONTRACTS_DIRECTORY` with the directory path where you have built the `eosio.system` system contract, the directory path where `eoios.system.abi` and `eosio.system.wasm` are located.
+
+```sh
+cleos set contract eosio EOSIO_SYSTEM_CONTRACTS_DIRECTORY/eosio.system/ eosio.system.wasm eosio.system.abi
+```
+
+[[info | What's next?]]
+| We will explore how to setup and run a [single-host, multi-node testnet](20_local-multi-node-testnet.md).
diff --git a/docs/01_nodeos/02_usage/03_development-environment/01_local-multi-node-testnet.md b/docs/01_nodeos/02_usage/03_development-environment/20_local-multi-node-testnet.md
similarity index 100%
rename from docs/01_nodeos/02_usage/03_development-environment/01_local-multi-node-testnet.md
rename to docs/01_nodeos/02_usage/03_development-environment/20_local-multi-node-testnet.md
diff --git a/docs/01_nodeos/02_usage/03_development-environment/index.md b/docs/01_nodeos/02_usage/03_development-environment/index.md
index f7cfa8f8824..9b099902e01 100644
--- a/docs/01_nodeos/02_usage/03_development-environment/index.md
+++ b/docs/01_nodeos/02_usage/03_development-environment/index.md
@@ -10,11 +10,17 @@ This is the go-to option for smart contract developers, aspiring Block Producers
* [Configure Nodeos as a Local Single-node Testnet](00_local-single-node-testnet.md)
+## Local Single-Node Testnet With Consensus Protocol
+
+This is the go-to option for smart contract developers, aspiring Block Producers or Non-Producing Node operators. It has the most simple configuration with the least number of requirements to setup a local single-node testnet with consensus protocol enabled.
+
+* [Configure Nodeos as a Local Single-node Testnet with Consensus Protocol](10_local-single-node-testnet-consensus.md)
+
## Local Multi-Node Testnet
While this option can technically be used for smart contract development, it may be overkill. This is most beneficial for those who are working on aspects of core development, such as benchmarking, optimization and experimentation. It's also a good option for hands-on learning and concept proofing.
-* [Configure Nodeos as a Local Two-Node Testnet](01_local-multi-node-testnet.md)
+* [Configure Nodeos as a Local Two-Node Testnet](20_local-multi-node-testnet.md)
* [Configure Nodeos as a Local 21-Node Testnet](https://github.com/EOSIO/eos/blob/master/tutorials/bios-boot-tutorial/README.md)
## Official Testnet
diff --git a/docs/01_nodeos/02_usage/60_how-to-guides/10_how-to-configure-state-storage.md b/docs/01_nodeos/02_usage/60_how-to-guides/10_how-to-configure-state-storage.md
new file mode 100644
index 00000000000..656c2e1a8ba
--- /dev/null
+++ b/docs/01_nodeos/02_usage/60_how-to-guides/10_how-to-configure-state-storage.md
@@ -0,0 +1,45 @@
+# Summary
+This how-to describes configuration of the Nodeos `backing store`. `Nodeos` can now use `chainbase` or `rocksdb` as a backing store for smart contract state.
+
+# Prerequisites
+Version 2.1 or above of the EOSIO development environment.
+
+# Parameter Definitions
+Specify which backing store to use with the `chain_plugin` `--backing-store` argument. This argument sets state storage to either `chainbase`, the default, or `rocksdb`.
+
+```console
+Config Options for eosio::chain_plugin:
+
+ --backing-store arg (=chainbase) The storage for state, chainbase or
+ rocksdb
+ --persistent-storage-num-threads arg Number of rocksdb threads for flush and
+ compaction.
+ --persistent-storage-max-num-files arg (=-1)
+ Max number of rocksdb files to keep
+ open. -1 = unlimited.
+ --persistent-storage-write-buffer-size-mb arg (=128)
+ Size of a single rocksdb memtable (in MiB).
+ --persistent-storage-bytes-per-sync Rocksdb write rate of flushes and compactions.
+ --persistent-storage-mbytes-snapshot-batch
+ Rocksdb batch size threshold before writing read in snapshot data to database.
+```
+
+# Procedure
+To use `rocksdb` for state storage:
+
+```shell
+nodeos -e -p eosio --plugin eosio::producer_plugin --plugin eosio::producer_api_plugin --plugin eosio::chain_api_plugin --backing-store=’rocksdb’ --persistent-storage-num-threads=’2’ --persistent-storage-max-num-files=’2’ --persistent-storage-write-buffer-size-mb=’128’ --plugin eosio::http_plugin
+```
+
+To use `chainbase` for state storage:
+
+```shell
+nodeos -e -p eosio --plugin eosio::producer_plugin --plugin eosio::producer_api_plugin --plugin eosio::chain_api_plugin --backing-store=’chainbase’ --plugin eosio::http_plugin
+```
+
+or
+
+```shell
+nodeos -e -p eosio --plugin eosio::producer_plugin --plugin eosio::producer_api_plugin --plugin eosio::chain_api_plugin --plugin eosio::http_plugin
+```
+
diff --git a/docs/01_nodeos/02_usage/index.md b/docs/01_nodeos/02_usage/index.md
index 2ab1a5a7ae1..2d9b47842cb 100644
--- a/docs/01_nodeos/02_usage/index.md
+++ b/docs/01_nodeos/02_usage/index.md
@@ -8,3 +8,4 @@ This section explains how to use `nodeos`, lists its configuration options, desc
* [Configuration](01_nodeos-configuration.md) - CLI vs. `config.ini` options; `nodeos` example.
* [Node Setups](02_node-setups/index.md) - Producing vs. non-producing nodes setup.
* [Development Environment](03_development-environment/index.md) - Setting up a development/test environment.
+* [How to Configure State Storage](60_how-to-guides/10_how-to-configure-state-storage.md) - How to configure the `nodeos` `backing store`.
diff --git a/docs/01_nodeos/03_plugins/blockvault_client_plugin/index.md b/docs/01_nodeos/03_plugins/blockvault_client_plugin/index.md
new file mode 100644
index 00000000000..0dabc023b6e
--- /dev/null
+++ b/docs/01_nodeos/03_plugins/blockvault_client_plugin/index.md
@@ -0,0 +1,114 @@
+
+## Overview
+
+The `blockvault_client_plugin` enables blockchain administrators to implement industry standard disaster recovery to maximize producer operational uptime. The plugin allows a block producer to cluster two or more nodes deployed as a single logical producer. If one of the nodes goes down, the other nodes in the cluster continue to operate, thereby meeting certain guarantees for the producer to continue to function with minimal service disruption.
+
+## Goals
+
+Block Vault is a clustered component within an EOSIO network architecture that enables replicated durable storage with strong consistency guarantees for the input required by a redundant cluster of nodes. In particular, Block Vault achieves the following guarantees for any cluster node running `nodeos` configured as a Block Vault client in producing mode:
+
+* Guarantee against double-production of blocks
+* Guarantee against finality violation
+* Guarantee of liveness (ability to make progress as a blockchain)
+
+To facilitate these guarantees, Block Vault allows `nodeos` to run in a redundant and/or highly available mode. Block Vault itself does not implement any coordination of nodes in a cluster. It merely guarantees that any such coordination, including faulty coordination leading to multiple active block constructing nodes, will be safe as defined by the above guarantees. For more information, read the [Block Vault Operation](#block-vault-operation) section below.
+
+## Usage
+
+```console
+# config.ini
+plugin = eosio::blockvault_client_plugin
+[options]
+```
+```sh
+# command-line
+nodeos ... --plugin eosio::blockvault_client_plugin [options]
+```
+
+## Configuration Options
+
+These can be specified from both the `nodeos` command-line or the `config.ini` file:
+
+```console
+Config Options for eosio::blockvault_client_plugin:
+
+ --block-vault-backend arg the uri for block vault backend.
+ Currently, only PostgreSQL is
+ supported, the format is
+ 'postgresql://username:password@localho
+ st/company'
+```
+
+## Plugin Dependencies
+
+* [`producer_plugin`](../producer_plugin/index.md)
+
+## Configuration Example
+
+To use `blockvault_client_plugin`, the `nodeos` service must be configured as a producer with the `--block-vault-backend` option:
+
+```sh
+nodeos --plugin eosio::producer_plugin --producer-name myproducer --plugin eosio::blockvault_client_plugin --block-vault-backend postgresql://user:password@mycompany.com
+```
+
+For production deployments, it is recommend to use the `PGPASSWORD` environment variable to configure the password, instead of embedding the password in the URI.
+
+```sh
+export PGPASSWORD=password
+nodeos --plugin eosio::producer_plugin --producer-name myproducer --plugin eosio::blockvault_client_plugin --block-vault-backend postgresql://user@mycompany.com
+```
+
+## Software Dependencies
+
+To build `blockvault_client_plugin` you need `libpq` version 10 or above and `libpqxx` version 6 or above. These dependencies are typically installed (alongside other dependencies) when you either [Install EOSIO](../../../00_install/index.md) from prebuilt binaries or build from source. You may also opt to install these dependencies manually prior to installing or building EOSIO.
+
+For MacOS, you can simply use homebrew to install these dependencies:
+
+```sh
+brew install libpq libpqxx
+```
+
+For Linux, the versions of `libpq` and `libpqxx` provided by the system package managers may not be current enough. We recommend to follow the `install libpq` and `install libpqxx` sections of the corresponding dockerfile in `.cicd/platform/pinned` for your platform to install these dependencies.
+
+## Block Vault Storage
+
+Currently, Block Vault uses `PostgreSQL` for its durable storage. Other distributed databases may be supported in the future.
+
+### Running PostgreSQL for Testing
+
+We recommend to use `docker`:
+
+```sh
+docker run -p 5432:5432 -e POSTGRES_PASSWORD=password -d postgres
+```
+
+### Running PostgreSQL for Production
+
+We recommend to deploy `PostgreSQL` with HA (high availability) mode and synchronous replication strategy.
+
+### Database Schema
+
+`blockvault_client_plugin` creates two tables `BlockData` and `SnapshotData` if not already in the database. The tables are created with the following SQL commands when the plugin starts:
+
+```sh
+CREATE TABLE IF NOT EXISTS BlockData (watermark_bn bigint, watermark_ts bigint, lib bigint, block_num bigint, block_id bytea UNIQUE, previous_block_id bytea, block oid, block_size bigint);
+
+CREATE TABLE IF NOT EXISTS SnapshotData (watermark_bn bigint, watermark_ts bigint, snapshot oid);
+```
+
+## Block Vault Operation
+
+As new nodes join a cluster, the Block Vault will be their exclusive source of sync data, enabling it to guarantee a consistent view of the blockchain as a base. When a node participating in the cluster constructs a new block, it will submit it to the Block Vault for approval prior to broadcasting it to external peers via the P2P network.
+
+Block Vault is exclusively responsible for providing guarantees against double-production of blocks and finality violations. It facilitates partial guarantee of liveness through node redundancy by ensuring that data needed to construct new blocks are durable and replicated. However, Block Vault cannot guarantee that the data it contains was not malformed. To that end, Block Vault depends on the proper operation of the clustered nodes.
+
+## Block Vault Client API
+
+Cluster nodes interact with the Block Vault through the following messages:
+
+* [`async_propose_constructed_block()`](../../../classeosio_1_1blockvault_1_1block__vault__interface#function-async_propose_constructed_block)
+* [`async_append_external_block()`](../../../classeosio_1_1blockvault_1_1block__vault__interface#function-async_append_external_block)
+* [`propose_snapshot()`](../../../classeosio_1_1blockvault_1_1block__vault__interface#function-propose_snapshot)
+* [`sync()`](../../../classeosio_1_1blockvault_1_1block__vault__interface#function-sync)
+
+For more information visit the [block_vault_interface](../../../classeosio_1_1blockvault_1_1block__vault__interface) C++ reference.
diff --git a/docs/01_nodeos/03_plugins/chain_plugin/index.md b/docs/01_nodeos/03_plugins/chain_plugin/index.md
index 47304291e8f..66d43b35603 100644
--- a/docs/01_nodeos/03_plugins/chain_plugin/index.md
+++ b/docs/01_nodeos/03_plugins/chain_plugin/index.md
@@ -29,11 +29,16 @@ Command Line Options for eosio::chain_plugin:
--extract-genesis-json arg extract genesis_state from blocks.log
as JSON, write into specified file, and
exit
+ --print-build-info print build environment information to
+ console as JSON and exit
+ --extract-build-info arg extract build environment information
+ as JSON, write into specified file, and
+ exit
--fix-reversible-blocks recovers reversible block database if
that database is in a bad state
- --force-all-checks do not skip any checks that can be
- skipped while replaying irreversible
- blocks
+ --force-all-checks do not skip any validation checks while
+ replaying blocks (useful for replaying
+ blocks from untrusted source)
--disable-replay-opts disable optimizations that specifically
target replay
--replay-blockchain clear chain state database and replay
@@ -46,6 +51,8 @@ Command Line Options for eosio::chain_plugin:
--truncate-at-block arg (=0) stop hard replay / block log recovery
at this block number (if set to
non-zero number)
+ --terminate-at-block arg (=0) terminate after reaching this block
+ number (if set to a non-zero number)
--import-reversible-blocks arg replace reversible block database with
blocks imported from specified file and
then exit
@@ -65,15 +72,63 @@ Config Options for eosio::chain_plugin:
--blocks-dir arg (="blocks") the location of the blocks directory
(absolute path or relative to
application data dir)
+ --blocks-log-stride arg (=4294967295) split the block log file when the head
+ block number is the multiple of the
+ stride
+ When the stride is reached, the current
+ block log and index will be renamed
+ '/blocks--.log/index'
+ and a new current block log and index
+ will be created with the most recent
+ block. All files following
+ this format will be used to construct
+ an extended block log.
+ --max-retained-block-files arg (=10) the maximum number of blocks files to
+ retain so that the blocks in those
+ files can be queried.
+ When the number is reached, the oldest
+ block file would be moved to archive
+ dir or deleted if the archive dir is
+ empty.
+ The retained block log files should not
+ be manipulated by users.
+ --blocks-retained-dir arg (="") the location of the blocks retained
+ directory (absolute path or relative to
+ blocks dir).
+ If the value is empty, it is set to the
+ value of blocks dir.
+ --blocks-archive-dir arg (="archive") the location of the blocks archive
+ directory (absolute path or relative to
+ blocks dir).
+ If the value is empty, blocks files
+ beyond the retained limit will be
+ deleted.
+ All files in the archive directory are
+ completely under user's control, i.e.
+ they won't be accessed by nodeos
+ anymore.
+ --fix-irreversible-blocks arg (=1) When the existing block log is
+ inconsistent with the index, allows
+ fixing the block log and index files
+ automatically - that is, it will take
+ the highest indexed block if it is
+ valid; otherwise it will repair the
+ block log and reconstruct the index.
--protocol-features-dir arg (="protocol_features")
the location of the protocol_features
directory (absolute path or relative to
application config dir)
--checkpoint arg Pairs of [BLOCK_NUM,BLOCK_ID] that
should be enforced as checkpoints.
- --wasm-runtime eos-vm|eos-vm-jit Override default WASM runtime (wabt)
- --eos-vm-oc-enable Enable optimized compilation in WASM
- --abi-serializer-max-time-ms arg (=15000)
+ --wasm-runtime runtime (=eos-vm-jit) Override default WASM runtime (
+ "eos-vm-jit", "eos-vm")
+ "eos-vm-jit" : A WebAssembly runtime
+ that compiles WebAssembly code to
+ native x86 code prior to execution.
+ "eos-vm" : A WebAssembly interpreter.
+
+ --abi-serializer-max-time-ms arg (=15)
Override default maximum ABI
serialization time allowed in ms
--chain-state-db-size-mb arg (=1024) Maximum size (in MiB) of the chain
@@ -82,6 +137,24 @@ Config Options for eosio::chain_plugin:
Safely shut down node when free space
remaining in the chain state database
drops below this size (in MiB).
+ --backing-store arg (=chainbase) The storage for state, chainbase or
+ rocksdb
+ --persistent-storage-num-threads arg (=1)
+ Number of rocksdb threads for flush and
+ compaction
+ --persistent-storage-max-num-files arg (=-1)
+ Max number of rocksdb files to keep
+ open. -1 = unlimited.
+ --persistent-storage-write-buffer-size-mb arg (=128)
+ Size of a single rocksdb memtable (in
+ MiB)
+ --persistent-storage-bytes-per-sync arg (=1048576)
+ Rocksdb write rate of flushes and
+ compactions.
+ --persistent-storage-mbytes-snapshot-batch arg (=50)
+ Rocksdb batch size threshold before
+ writing read in snapshot data to
+ database.
--reversible-blocks-db-size-mb arg (=340)
Maximum size (in MiB) of the reversible
blocks database
@@ -97,6 +170,14 @@ Config Options for eosio::chain_plugin:
--chain-threads arg (=2) Number of worker threads in controller
thread pool
--contracts-console print contract's output to console
+ --deep-mind print deeper information about chain
+ operations
+ --telemetry-url arg Send Zipkin spans to url. e.g.
+ http://127.0.0.1:9411/api/v2/spans
+ --telemetry-service-name arg (=nodeos)
+ Zipkin localEndpoint.serviceName sent
+ with each span
+ --telemetry-timeout-us arg (=200000) Timeout for sending Zipkin span.
--actor-whitelist arg Account added to actor whitelist (may
specify multiple times)
--actor-blacklist arg Account added to actor blacklist (may
@@ -119,22 +200,36 @@ Config Options for eosio::chain_plugin:
times)
--read-mode arg (=speculative) Database read mode ("speculative",
"head", "read-only", "irreversible").
- In "speculative" mode database contains
- changes done up to the head block plus
- changes made by transactions not yet
- included to the blockchain.
- In "head" mode database contains
- changes done up to the current head
- block.
- In "read-only" mode database contains
- changes done up to the current head
- block and transactions cannot be pushed
- to the chain API.
- In "irreversible" mode database
- contains changes done up to the last
- irreversible block and transactions
- cannot be pushed to the chain API.
+ In "speculative" mode: database
+ contains state changes by transactions
+ in the blockchain up to the head block
+ as well as some transactions not yet
+ included in the blockchain.
+ In "head" mode: database contains state
+ changes by only transactions in the
+ blockchain up to the head block;
+ transactions received by the node are
+ relayed if valid.
+ In "read-only" mode: (DEPRECATED: see
+ p2p-accept-transactions &
+ api-accept-transactions) database
+ contains state changes by only
+ transactions in the blockchain up to
+ the head block; transactions received
+ via the P2P network are not relayed and
+ transactions cannot be pushed via the
+ chain API.
+ In "irreversible" mode: database
+ contains state changes by only
+ transactions in the blockchain up to
+ the last irreversible block;
+ transactions received via the P2P
+ network are not relayed and
+ transactions cannot be pushed via the
+ chain API.
+ --api-accept-transactions arg (=1) Allow API transactions to be evaluated
+ and relayed if valid.
--validation-mode arg (=full) Chain validation mode ("full" or
"light").
In "full" mode all incoming blocks will
@@ -150,6 +245,10 @@ Config Options for eosio::chain_plugin:
context of a notification handler (i.e.
when the receiver is not the code of
the action).
+ --maximum-variable-signature-length arg (=16384)
+ Subjectively limit the maximum length
+ of variable components in a variable
+ legnth signature to this size in bytes
--trusted-producer arg Indicate a producer whose blocks
headers signed by it will be fully
validated, but transactions in those
@@ -159,21 +258,18 @@ Config Options for eosio::chain_plugin:
In "mapped" mode database is memory
mapped as a file.
In "heap" mode database is preloaded in
- to swappable memory.
+ to swappable memory and will use huge
+ pages if available.
In "locked" mode database is preloaded,
- locked in to memory, and optionally can
- use huge pages.
-
- --database-hugepage-path arg Optional path for database hugepages
- when in "locked" mode (may specify
- multiple times)
+ locked in to memory, and will use huge
+ pages if available.
- --max-nonprivileged-inline-action-size arg
- Sets the maximum limit for
- non-privileged inline actions.
- The default value is 4 KB
- and if this threshold is exceeded,
- the transaction will subjectively fail.
+ --enable-account-queries arg (=0) enable queries to find accounts by
+ various metadata.
+ --max-nonprivileged-inline-action-size arg (=4096)
+ maximum allowed size (in bytes) of an
+ inline action for a nonprivileged
+ account
```
## Dependencies
diff --git a/docs/01_nodeos/03_plugins/faucet_testnet_plugin/index.md b/docs/01_nodeos/03_plugins/faucet_testnet_plugin/index.md
deleted file mode 100644
index 46c47af5755..00000000000
--- a/docs/01_nodeos/03_plugins/faucet_testnet_plugin/index.md
+++ /dev/null
@@ -1,22 +0,0 @@
-## Description
-
-The `faucet_testnet_plugin` provides an interface that assists in the automation of distributing tokens on an EOSIO testnet.
-
-## Usage
-
-```console
-# config.ini
-plugin = eosio::faucet_testnet_plugin
-```
-```sh
-# command-line
-nodeos ... --plugin eosio::faucet_testnet_plugin
-```
-
-## Options
-
-None
-
-## Dependencies
-
-* [`http_plugin`](../http_plugin/index.md)
diff --git a/docs/01_nodeos/03_plugins/history_api_plugin/index.md b/docs/01_nodeos/03_plugins/history_api_plugin/index.md
index df8e448aca2..c64319432d4 100644
--- a/docs/01_nodeos/03_plugins/history_api_plugin/index.md
+++ b/docs/01_nodeos/03_plugins/history_api_plugin/index.md
@@ -1,5 +1,5 @@
[[warning | Deprecation Notice]]
-| The `history_plugin` that the `history_api_plugin` depends upon is deprecated and will no longer be maintained. Please use the [`state_history_plugin`](../state_history_plugin/index.md) instead.
+| The `history_plugin` that the `history_api_plugin` depends upon is deprecated and will no longer be maintained. Please use the [`state_history_plugin`](../state_history_plugin/index.md) or the [`trace_api_plugin`](../trace_api_plugin/index.md) instead.
## Description
diff --git a/docs/01_nodeos/03_plugins/history_plugin/index.md b/docs/01_nodeos/03_plugins/history_plugin/index.md
index 0a39679c298..008571c270c 100644
--- a/docs/01_nodeos/03_plugins/history_plugin/index.md
+++ b/docs/01_nodeos/03_plugins/history_plugin/index.md
@@ -1,5 +1,5 @@
[[warning | Deprecation Notice]]
-| The `history_plugin` is deprecated and will no longer be maintained. Please use the [`state_history_plugin`](../state_history_plugin/index.md) instead.
+| The `history_plugin` is deprecated and will no longer be maintained. Please use the [`state_history_plugin`](../state_history_plugin/index.md) or the [`trace_api_plugin`](../trace_api_plugin/index.md) instead.
## Description
diff --git a/docs/01_nodeos/03_plugins/http_plugin/index.md b/docs/01_nodeos/03_plugins/http_plugin/index.md
index 17f5fb88530..9f58a603dae 100644
--- a/docs/01_nodeos/03_plugins/http_plugin/index.md
+++ b/docs/01_nodeos/03_plugins/http_plugin/index.md
@@ -22,10 +22,11 @@ These can be specified from both the command-line or the `config.ini` file:
```console
Config Options for eosio::http_plugin:
+
--unix-socket-path arg The filename (relative to data-dir) to
create a unix socket for HTTP RPC; set
- blank to disable (=keosd.sock for keosd)
- --http-server-address arg (=127.0.0.1:8888 for nodeos)
+ blank to disable.
+ --http-server-address arg (=127.0.0.1:8888)
The local IP and port to listen for
incoming http connections; set blank to
disable.
@@ -53,8 +54,14 @@ Config Options for eosio::http_plugin:
--http-max-bytes-in-flight-mb arg (=500)
Maximum size in megabytes http_plugin
should use for processing http
- requests. 503 error response when
+ requests. 429 error response when
+ exceeded.
+ --http-max-in-flight-requests arg (=-1)
+ Maximum number of requests http_plugin
+ should use for processing http
+ requests. 429 error response when
exceeded.
+ --http-max-response-time-ms arg (=30) Maximum time for processing a request.
--verbose-http-errors Append the error log to HTTP responses
--http-validate-host arg (=1) If set to false, then any incoming
"Host" header is considered valid
diff --git a/docs/01_nodeos/03_plugins/index.md b/docs/01_nodeos/03_plugins/index.md
index fd05571afbf..5c9aac2ca42 100644
--- a/docs/01_nodeos/03_plugins/index.md
+++ b/docs/01_nodeos/03_plugins/index.md
@@ -8,10 +8,10 @@ Plugins extend the core functionality implemented in `nodeos`. Some plugins are
For information on specific plugins, just select from the list below:
+* [`blockvault_client_plugin`](blockvault_client_plugin/index.md)
* [`chain_api_plugin`](chain_api_plugin/index.md)
* [`chain_plugin`](chain_plugin/index.md)
* [`db_size_api_plugin`](db_size_api_plugin/index.md)
-* [`faucet_testnet_plugin`](faucet_testnet_plugin/index.md)
* [`history_api_plugin`](history_api_plugin/index.md)
* [`history_plugin`](history_plugin/index.md)
* [`http_client_plugin`](http_client_plugin/index.md)
@@ -21,8 +21,6 @@ For information on specific plugins, just select from the list below:
* [`net_plugin`](net_plugin/index.md)
* [`producer_plugin`](producer_plugin/index.md)
* [`state_history_plugin`](state_history_plugin/index.md)
-* [`test_control_api_plugin`](test_control_api_plugin/index.md)
-* [`test_control_plugin`](test_control_plugin/index.md)
* [`trace_api_plugin`](trace_api_plugin/index.md)
* [`txn_test_gen_plugin`](txn_test_gen_plugin/index.md)
diff --git a/docs/01_nodeos/03_plugins/mongo_db_plugin/index.md b/docs/01_nodeos/03_plugins/mongo_db_plugin/index.md
deleted file mode 100644
index a750fe89b59..00000000000
--- a/docs/01_nodeos/03_plugins/mongo_db_plugin/index.md
+++ /dev/null
@@ -1,153 +0,0 @@
-[[warning | Deprecation Notice]]
-| The `mongo_db_plugin` is deprecated and will no longer be maintained. Please refer to the [`state_history_plugin`](../state_history_plugin/index.md) and the [`history-tools`](../state_history_plugin/index.md#history-tools) for better options to archive blockchain data.
-
-## Description
-
-The optional `eosio::mongo_db_plugin` provides archiving of blockchain data into a MongoDB. It is recommended that the plugin be added to a non-producing node as it is designed to shut down on any failed insert into the MongoDB and it is resource intensive. For best results dedicate a `nodeos` instance to running this one plugin. The rationale behind this shutdown on error is so that any issues with connectivity or the mongo database can be fixed and `nodeos` can be restarted without having to resync or replay.
-
-## Important Notes
-
-* Documents stored in mongo by `mongo_db_plugin` which contain empty field/struct names will be stored with the field/struct name of `empty_field_name` / `empty_struct_name`.
-* Action data is stored on chain as raw bytes. This plugin attempts to use associated ABI on accounts to deserialize the raw bytes into expanded `abi_def` form for storage into mongo. Note that invalid or missing ABI on a contract will result in the action data being stored as raw bytes. For example the EOSIO system contract does not provide ABI for the `onblock` action so it is stored as raw bytes.
-* The `mongo_db_plugin` does slow down replay/resync as the conversion of block data to JSON and insertion into MongoDB is resource intensive. The plugin does use a worker thread for processing the block data, but this does not help much when replaying/resyncing.
-
-## Recommendations
-
-* It is recommended that a large `--abi-serializer-max-time-ms` value be passed into the `nodeos` running the `mongo_db_plugin` as the default ABI serializer time limit is not large enough to serialize large blocks.
-* Read-only mode should be used to avoid speculative execution. See [Nodeos Read Modes](../../02_usage/05_nodeos-implementation.md#nodeos-read-modes). Forked data is still recorded (data that never becomes irreversible) but speculative transaction processing and signaling is avoided, minimizing the transaction_traces/action_traces stored.
-
-## Options
-
-These can be specified from both the command-line or the `config.ini` file:
-
-```console
- -q [ --mongodb-queue-size ] arg (=256)
- The target queue size between nodeos
- and MongoDB plugin thread.
- --mongodb-abi-cache-size The maximum size of the abi cache for
- serializing data.
- --mongodb-wipe Required with --replay-blockchain,
- --hard-replay-blockchain, or
- --delete-all-blocks to wipe mongo
- db.This option required to prevent
- accidental wipe of mongo db.
- Defaults to false.
- --mongodb-block-start arg (=0) If specified then only abi data pushed
- to mongodb until specified block is
- reached.
- -m [ --mongodb-uri ] arg MongoDB URI connection string, see:
- https://docs.mongodb.com/master/referen
- ce/connection-string/. If not specified
- then plugin is disabled. Default
- database 'EOS' is used if not specified
- in URI. Example: mongodb://127.0.0.1:27
- 017/EOS
- --mongodb-update-via-block-num arg (=0)
- Update blocks/block_state with latest
- via block number so that duplicates are
- overwritten.
- --mongodb-store-blocks Enables storing blocks in mongodb.
- Defaults to true.
- --mongodb-store-block-states Enables storing block state in mongodb.
- Defaults to true.
- --mongodb-store-transactions Enables storing transactions in mongodb.
- Defaults to true.
- --mongodb-store-transaction-traces Enables storing transaction traces in mongodb.
- Defaults to true.
- --mongodb-store-action-traces Enables storing action traces in mongodb.
- Defaults to true.
- --mongodb-filter-on Mongodb: Track actions which match
- receiver:action:actor. Actor may be blank
- to include all. Receiver and Action may
- not be blank. Default is * include
- everything.
- --mongodb-filter-out Mongodb: Do not track actions which match
- receiver:action:actor. Action and Actor
- both blank excludes all from reciever. Actor blank excludes all from
- reciever:action. Receiver may not be
- blank.
-```
-
-## Notes
-
-* `--mongodb-store-*` options all default to true.
-* `--mongodb-filter-*` options currently only applies to the `action_traces` collection.
-
-## Example Filters
-
-```console
-mongodb-filter-out = eosio:onblock:
-mongodb-filter-out = gu2tembqgage::
-mongodb-filter-out = blocktwitter::
-```
-
-[[warning | Warning]]
-| When the `mongo_db_plugin` is turned on, the target mongodb instance may take a lot of storage space. With all collections enabled and no filters applied, the mongodb data folder can easily occupy hundreds of GBs of data. It is recommended that you tailor the options and utilize the filters as you need in order to maximize storage efficiency.
-
-## Collections
-
-* `accounts` - created on applied transaction. Always updated even if `mongodb-store-action-traces=false`.
- * Currently limited to just name and ABI if contract abi on account
- * Mostly for internal use as the stored ABI is used to convert action data into JSON for storage as associated actions on contract are processed.
- * Invalid ABI on account will prevent conversion of action data into JSON for storage resulting in just the action data being stored as hex. For example, the original eosio.system contract did not provide ABI for the `onblock` action and therefore all `onblock` action data is stored as hex until the time `onblock` ABI is added to the eosio.system contract.
-
-* `action_traces` - created on applied transaction
- * `receipt` - action_trace action_receipt - see `eosio::chain::action_receipt`
- * `trx_id` - transaction id
- * `act` - action - see `eosio::chain::action`
- * `elapsed` - time in microseconds to execute action
- * `console` - console output of action. Always empty unless `contracts-console = true` option specified.
-
-* `block_states` - created on accepted block
- * `block_num`
- * `block_id`
- * `block_header_state` - see `eosio::chain::block_header_state`
- * `validated`
- * `in_current_chain`
-
-* `blocks` - created on accepted block
- * `block_num`
- * `block_id`
- * `block` - signed block - see `eosio::chain::signed_block`
- * `validated` - added on irreversible block
- * `in_current_chain` - added on irreversible block
- * `irreversible=true` - added on irreversible block
-
-* `transaction_traces` - created on applied transaction
- * see `chain::eosio::transaction_trace`
-
-* `transactions` - created on accepted transaction - does not include inline actions
- * see `eosio::chain::signed_transaction`. In addition to signed_transaction data the following are also stored.
- * `trx_id` - transaction id
- * `irreversible=true` - added on irreversible block
- * `block_id` - added on irreversble block
- * `block_num` - added on irreversible block
- * `signing_keys`
- * `accepted`
- * `implicit`
- * `scheduled`
-
-* `account_controls` - created on applied transaction. Always updated even if `mongodb-store-action-traces=false`.
- * `controlled_account`
- * `controlling_permission`
- * `controlling_account`
-
-The equivalent of `/v1/history/get_controlled_acounts` with mongo: `db.account_controls.find({"controlling_account":"hellozhangyi"}).pretty()`
-
-* `pub_keys` - created on applied transaction. Always updated even if `mongodb-store-action-traces=false`.
- * `account`
- * `permission`
- * `public_key`
-
-## Examples
-
-The mongodb equivalent of `/v1/history/get_key_accounts` RPC API endpoint:
-
-```console
-db.pub_keys.find({"public_key":"EOS7EarnUhcyYqmdnPon8rm7mBCTnBoot6o7fE2WzjvEX2TdggbL3"}).pretty()
-```
-
-## Dependencies
-
-* [`chain_plugin`](../chain_plugin/index.md)
-* [`history_plugin`](../history_plugin/index.md)
diff --git a/docs/01_nodeos/03_plugins/net_api_plugin/index.md b/docs/01_nodeos/03_plugins/net_api_plugin/index.md
index 6efefefb2b7..ac7ca7273fd 100644
--- a/docs/01_nodeos/03_plugins/net_api_plugin/index.md
+++ b/docs/01_nodeos/03_plugins/net_api_plugin/index.md
@@ -1,6 +1,5 @@
## Description
-
-The `net_api_plugin` exposes functionality from the `net_plugin` to the RPC API interface managed by the `http_plugin`.
+The `net_api_plugin` exposes functionality from the `net_plugin` to the RPC API interface managed by the `http_plugin`. Node operators can use the `net_api_plugin` to manage the p2p connections of an active node.
The `net_api_plugin` provides four RPC API endpoints:
diff --git a/docs/01_nodeos/03_plugins/net_plugin/index.md b/docs/01_nodeos/03_plugins/net_plugin/index.md
index 963c8e73478..1d03aeb0bf4 100644
--- a/docs/01_nodeos/03_plugins/net_plugin/index.md
+++ b/docs/01_nodeos/03_plugins/net_plugin/index.md
@@ -31,9 +31,24 @@ Config Options for eosio::net_plugin:
connect to. Use multiple
p2p-peer-address options as needed to
compose a network.
+ Syntax: host:port[:|]
+ The optional 'trx' and 'blk'
+ indicates to node that only
+ transactions 'trx' or blocks 'blk'
+ should be sent. Examples:
+ p2p.eos.io:9876
+ p2p.trx.eos.io:9876:trx
+ p2p.blk.eos.io:9876:blk
+
--p2p-max-nodes-per-host arg (=1) Maximum number of client nodes from any
single IP address
- --agent-name arg (="EOS Test Agent") The name supplied to identify this node
+ --p2p-accept-transactions arg (=1) Allow transactions received over p2p
+ network to be evaluated and relayed if
+ valid.
+ --p2p-reject-incomplete-blocks arg (=1)
+ Reject pruned signed_blocks even in
+ light validation
+ --agent-name arg (=EOS Test Agent) The name supplied to identify this node
amongst the peers.
--allowed-connection arg (=any) Can be 'any' or 'producers' or
'specified' or 'none'. If 'specified',
@@ -52,14 +67,12 @@ Config Options for eosio::net_plugin:
cleaning up dead connections
--max-cleanup-time-msec arg (=10) max connection cleanup time per cleanup
call in millisec
- --network-version-match arg (=0) True to require exact match of peer
- network version.
- --net-threads arg (=1) Number of worker threads in net_plugin
+ --net-threads arg (=2) Number of worker threads in net_plugin
thread pool
--sync-fetch-span arg (=100) number of blocks to retrieve in a chunk
from any individual peer during
synchronization
- --use-socket-read-watermark arg (=0) Enable expirimental socket read
+ --use-socket-read-watermark arg (=0) Enable experimental socket read
watermark optimization
--peer-log-format arg (=["${_name}" ${_ip}:${_port}])
The string used to format peers when
@@ -82,7 +95,10 @@ Config Options for eosio::net_plugin:
peer
_lport local port number connected
- to peer
+ to peer
+ --p2p-keepalive-interval-ms arg (=32000)
+ peer heartbeat keepalive message
+ interval in milliseconds
```
## Dependencies
diff --git a/docs/01_nodeos/03_plugins/producer_plugin/index.md b/docs/01_nodeos/03_plugins/producer_plugin/index.md
index 07f38ac8e76..5295a8b50dc 100644
--- a/docs/01_nodeos/03_plugins/producer_plugin/index.md
+++ b/docs/01_nodeos/03_plugins/producer_plugin/index.md
@@ -37,14 +37,6 @@ Config Options for eosio::producer_plugin:
the DPOS Irreversible Block for a chain
this node will produce blocks on (use
negative value to indicate unlimited)
- --max-block-cpu-usage-threshold-us Threshold of CPU block production to
- consider block full; when within threshold
- of max-block-cpu-usage block can be
- produced immediately. Default value 5000
- --max-block-net-usage-threshold-bytes Threshold of NET block production to
- consider block full; when within threshold
- of max-block-net-usage block can be produced
- immediately. Default value 1024
-p [ --producer-name ] arg ID of producer controlled by this node
(e.g. inita; may specify multiple
times)
@@ -64,7 +56,7 @@ Config Options for eosio::producer_plugin:
form
:
- is KEY, or KEOSD
+ is KEY, KEOSD, or SE
KEY: is a string form of
a valid EOSIO
@@ -77,32 +69,60 @@ Config Options for eosio::producer_plugin:
and the approptiate
wallet(s) are
unlocked
- --keosd-provider-timeout arg (=5) Limits the maximum time (in
- milliseconds) that is allowed for
- sending blocks to a keosd provider for
- signing
+
+ SE: indicates the key
+ resides in Secure
+ Enclave
--greylist-account arg account that can not access to extended
CPU/NET virtual resources
- --produce-time-offset-us arg (=0) offset of non last block producing time
- in microseconds. Negative number
- results in blocks to go out sooner, and
- positive number results in blocks to go
- out later
- --last-block-time-offset-us arg (=0) offset of last block producing time in
- microseconds. Negative number results
- in blocks to go out sooner, and
- positive number results in blocks to go
- out later
+ --greylist-limit arg (=1000) Limit (between 1 and 1000) on the
+ multiple that CPU/NET virtual resources
+ can extend during low usage (only
+ enforced subjectively; use 1000 to not
+ enforce any limit)
+ --produce-time-offset-us arg (=0) Offset of non last block producing time
+ in microseconds. Valid range 0 ..
+ -block_time_interval.
+ --last-block-time-offset-us arg (=-200000)
+ Offset of last block producing time in
+ microseconds. Valid range 0 ..
+ -block_time_interval.
+ --cpu-effort-percent arg (=80) Percentage of cpu block production time
+ used to produce block. Whole number
+ percentages, e.g. 80 for 80%
+ --last-block-cpu-effort-percent arg (=80)
+ Percentage of cpu block production time
+ used to produce last block. Whole
+ number percentages, e.g. 80 for 80%
+ --max-block-cpu-usage-threshold-us arg (=5000)
+ Threshold of CPU block production to
+ consider block full; when within
+ threshold of max-block-cpu-usage block
+ can be produced immediately
+ --max-block-net-usage-threshold-bytes arg (=1024)
+ Threshold of NET block production to
+ consider block full; when within
+ threshold of max-block-net-usage block
+ can be produced immediately
--max-scheduled-transaction-time-per-block-ms arg (=100)
Maximum wall-clock time, in
milliseconds, spent retiring scheduled
transactions in any block before
returning to normal transaction
processing.
- --incoming-defer-ratio arg (=1) ratio between incoming transactions and
+ --subjective-cpu-leeway-us arg (=31000)
+ Time in microseconds allowed for a
+ transaction that starts with
+ insufficient CPU quota to complete and
+ cover its CPU usage.
+ --incoming-defer-ratio arg (=1) ratio between incoming transactions and
deferred transactions when both are
- queued for execution
-
+ queued for execution
+ --incoming-transaction-queue-size-mb arg (=1024)
+ Maximum size (in MiB) of the incoming
+ transaction queue. Exceeding this value
+ will subjectively drop transaction with
+ resource exhaustion.
--producer-threads arg (=2) Number of worker threads in producer
thread pool
--snapshots-dir arg (="snapshots") the location of the snapshots directory
diff --git a/docs/01_nodeos/03_plugins/resource_monitor_plugin/index.md b/docs/01_nodeos/03_plugins/resource_monitor_plugin/index.md
new file mode 100644
index 00000000000..070cb331163
--- /dev/null
+++ b/docs/01_nodeos/03_plugins/resource_monitor_plugin/index.md
@@ -0,0 +1,66 @@
+
+## Overview
+
+The `resource_monitor_plugin` monitors space usage in the computing system where `nodeos` is running. Specifically, every `resource-monitor-interval-seconds` seconds,
+it measures the individual space used by each of the file systems mounted
+by `data-dir`, `state-dir`, `blocks-log-dir`, `snapshots-dir`,
+`state-history-dir`, and `trace-dir`.
+When space usage in any of the monitored file system is within `5%` of the threshold
+specified by `resource-monitor-space-threshold`, a warning containing the file system
+path and percentage of space has used is printed out.
+When space usage exceeds the threshold,
+if `resource-monitor-not-shutdown-on-threshold-exceeded` is not set,
+`nodeos` gracefully shuts down; if `resource-monitor-not-shutdown-on-threshold-exceeded` is set, `nodeos` prints out warnings periodically
+until space usage goes under the threshold.
+
+`resource_monitor_plugin` is always loaded.
+## Usage
+
+```console
+# config.ini
+plugin = eosio::resource_monitor_plugin
+[options]
+```
+```sh
+# command-line
+nodeos ... --plugin eosio::resource_monitor_plugin [options]
+```
+
+## Configuration Options
+
+These can be specified from both the `nodeos` command-line or the `config.ini` file:
+
+```console
+Config Options for eosio::resource_monitor_plugin:
+
+ --resource-monitor-interval-seconds arg (=2)
+ Time in seconds between two consecutive checks
+ of space usage. Should be between 1 and 300.
+ --resource-monitor-space-threshold arg (=90)
+ Threshold in terms of percentage of used space
+ vs total space. If the used space is within
+ `5%` of the threshold, a warning is generated.
+ If the used space is above the threshold and
+ `resource-monitor-not-shutdown-on-threshold-exceeded`
+ is enabled, a shutdown is initiated; otherwise
+ a warning will be continuously printed out.
+ The value should be between 6 and 99.
+ --resource-monitor-not-shutdown-on-threshold-exceeded
+ A switch used to indicate `nodeos` will "not"
+ shutdown when threshold is exceeded. When not
+ set, `nodeos` will shutdown.
+ --resource-monitor-warning-interval arg (=30)
+ Number of monitor intervals between which a
+ warning is displayed. For example, if
+ `resource-monitor-warning-interval` is to 10
+ and `resource-monitor-interval-seconds` is 2,
+ a warning will be displayed every 20 seconds,
+ even though the space usage is checked every
+ 2 seconds. This is used to throttle the
+ number of warnings in the `nodeos` log file.
+ Should be between 1 and 450.
+```
+
+## Plugin Dependencies
+
+* None
diff --git a/docs/01_nodeos/03_plugins/state_history_plugin/index.md b/docs/01_nodeos/03_plugins/state_history_plugin/index.md
index 4ee27384f5a..847b68ef23b 100644
--- a/docs/01_nodeos/03_plugins/state_history_plugin/index.md
+++ b/docs/01_nodeos/03_plugins/state_history_plugin/index.md
@@ -36,6 +36,46 @@ Config Options for eosio::state_history_plugin:
the location of the state-history
directory (absolute path or relative to
application data dir)
+ --state-history-retained-dir arg (="")
+ the location of the state history
+ retained directory (absolute path or
+ relative to state-history dir).
+ If the value is empty, it is set to the
+ value of state-history directory.
+ --state-history-archive-dir arg (="archive")
+ the location of the state history
+ archive directory (absolute path or
+ relative to state-history dir).
+ If the value is empty, blocks files
+ beyond the retained limit will be
+ deleted.
+ All files in the archive directory are
+ completely under user's control, i.e.
+ they won't be accessed by nodeos
+ anymore.
+ --state-history-stride arg (=4294967295)
+ split the state history log files when
+ the block number is the multiple of the
+ stride
+ When the stride is reached, the current
+ history log and index will be renamed
+ '*-history--.log/index'
+ and a new current history log and index
+ will be created with the most recent
+ blocks. All files following
+ this format will be used to construct
+ an extended history log.
+ --max-retained-history-files arg (=10)
+ the maximum number of history file
+ groups to retain so that the blocks in
+ those files can be queried.
+ When the number is reached, the oldest
+ history file would be moved to archive
+ dir or deleted if the archive dir is
+ empty.
+ The retained history log files should
+ not be manipulated by users.
--trace-history enable trace history
--chain-state-history enable chain state history
--state-history-endpoint arg (=127.0.0.1:8080)
@@ -44,6 +84,10 @@ Config Options for eosio::state_history_plugin:
expose this port to your internal
network.
--trace-history-debug-mode enable debug mode for trace history
+ --context-free-data-compression arg (=zlib)
+ compression mode for context free data
+ in transaction traces. Supported
+ options are "zlib" and "none"
```
## Examples
diff --git a/docs/01_nodeos/03_plugins/test_control_api_plugin/api-reference/index.md b/docs/01_nodeos/03_plugins/test_control_api_plugin/api-reference/index.md
deleted file mode 100644
index 6451c708686..00000000000
--- a/docs/01_nodeos/03_plugins/test_control_api_plugin/api-reference/index.md
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/docs/01_nodeos/03_plugins/test_control_api_plugin/index.md b/docs/01_nodeos/03_plugins/test_control_api_plugin/index.md
deleted file mode 100644
index a2ec6d832c2..00000000000
--- a/docs/01_nodeos/03_plugins/test_control_api_plugin/index.md
+++ /dev/null
@@ -1,46 +0,0 @@
-
-## Description
-
-The `test_control_api_plugin` allows to send a control message to the [test_control_plugin](../test_control_plugin/index.md) telling the plugin to shut down the `nodeos` instance when reaching a particular block. It is intended for testing.
-
-## Usage
-
-```console
-# config.ini
-plugin = eosio::test_control_api_plugin
-```
-```sh
-# command-line
-nodeos ... --plugin eosio::test_control_api_plugin
-```
-
-## Options
-
-None
-
-## Usage Example
-
-```sh
-curl %s/v1/test_control/kill_node_on_producer -d '{ \"producer\":\"%s\", \"where_in_sequence\":%d, \"based_on_lib\":\"%s\" }' -X POST -H \"Content-Type: application/json\"" %
-```
-
-## Dependencies
-
-* [`test_control_plugin`](../test_control_plugin/index.md)
-* [`chain_plugin`](../chain_plugin/index.md)
-* [`http_plugin`](../http_plugin/index.md)
-
-### Load Dependency Examples
-
-```console
-# config.ini
-plugin = eosio::chain_plugin
-[options]
-plugin = eosio::http_plugin
-[options]
-```
-```sh
-# command-line
-nodeos ... --plugin eosio::chain_plugin [operations] [options] \
- --plugin eosio::http_plugin [options]
-```
diff --git a/docs/01_nodeos/03_plugins/test_control_plugin/index.md b/docs/01_nodeos/03_plugins/test_control_plugin/index.md
deleted file mode 100644
index 3802c8f5b56..00000000000
--- a/docs/01_nodeos/03_plugins/test_control_plugin/index.md
+++ /dev/null
@@ -1,37 +0,0 @@
-
-## Description
-
-The `test_control_plugin` is designed to cause a graceful shutdown when reaching a particular block in a sequence of blocks produced by a specific block producer. It can be invoked to either shutdown on the **head block** or the **last irreversible block**.
-
-This is intended for testing, to determine exactly when a `nodeos` instance will shutdown.
-
-## Usage
-
-```console
-# config.ini
-plugin = eosio::test_control_plugin
-```
-```sh
-# command-line
-nodeos ... --plugin eosio::test_control_plugin
-```
-
-## Options
-
-None
-
-## Dependencies
-
-* [`chain_plugin`](../chain_plugin/index.md)
-
-### Load Dependency Examples
-
-```console
-# config.ini
-plugin = eosio::chain_plugin
-[options]
-```
-```sh
-# command-line
-nodeos ... --plugin eosio::chain_plugin [operations] [options]
-```
diff --git a/docs/01_nodeos/04_replays/how-to-replay-from-a-blocks.log.md b/docs/01_nodeos/04_replays/how-to-replay-from-a-blocks.log.md
index 9c756cd9f74..da9191bdb28 100644
--- a/docs/01_nodeos/04_replays/how-to-replay-from-a-blocks.log.md
+++ b/docs/01_nodeos/04_replays/how-to-replay-from-a-blocks.log.md
@@ -9,8 +9,8 @@ The table below sumarizes the actions you should take for each of the files enum
Folder name | File name | Action
----------------------- | ------------------ | ------
data/blocks | blocks.index | Remove
-data/blocks | blocks.log | Replace this file with the `block.log` you want to replay
-data/blocks/reversible | forkdb.dat | Remove
+data/blocks | blocks.log | Replace this file with the `blocks.log` you want to replay
+data/state | fork_db.dat | Remove
data/blocks/reversible | shared_memory.bin | Remove
data/blocks/reversible | shared_memory.meta | Remove
diff --git a/docs/01_nodeos/05_rpc_apis/index.md b/docs/01_nodeos/05_rpc_apis/index.md
index 591bccd5571..0329aaa6335 100644
--- a/docs/01_nodeos/05_rpc_apis/index.md
+++ b/docs/01_nodeos/05_rpc_apis/index.md
@@ -7,5 +7,4 @@ link_text: RPC APIs
* [DB Size API Reference](../03_plugins/db_size_api_plugin/api-reference/index.md)
* [Net API Reference](../03_plugins/net_api_plugin/api-reference/index.md)
* [Producer API Reference](../03_plugins/producer_api_plugin/api-reference/index.md)
-* [Test Control API Reference](../03_plugins/test_control_api_plugin/api-reference/index.md)
* [Trace API Reference](../03_plugins/trace_api_plugin/api-reference/index.md)
diff --git a/docs/01_nodeos/06_logging/01_logging-levels.md b/docs/01_nodeos/06_logging/01_logging-levels.md
deleted file mode 100644
index bb68ceeeb1d..00000000000
--- a/docs/01_nodeos/06_logging/01_logging-levels.md
+++ /dev/null
@@ -1,66 +0,0 @@
----
-content_title: Logging Levels
----
-
-There are six available logging levels:
-- all
-- debug
-- info
-- warn
-- error
-- off
-
-Sample `logging.json`:
-
-```
-{
- "includes": [],
- "appenders": [{
- "name": "consoleout",
- "type": "console",
- "args": {
- "stream": "std_out",
- "level_colors": [{
- "level": "debug",
- "color": "green"
- },{
- "level": "warn",
- "color": "brown"
- },{
- "level": "error",
- "color": "red"
- }
- ]
- },
- "enabled": true
- },{
- "name": "net",
- "type": "gelf",
- "args": {
- "endpoint": "10.10.10.10",
- "host": "test"
- },
- "enabled": true
- }
- ],
- "loggers": [{
- "name": "default",
- "level": "info",
- "enabled": true,
- "additivity": false,
- "appenders": [
- "consoleout",
- "net"
- ]
- },{
- "name": "net_plugin_impl",
- "level": "debug",
- "enabled": true,
- "additivity": false,
- "appenders": [
- "net"
- ]
- }
- ]
-}
-```
diff --git a/docs/01_nodeos/06_logging/00_setup-logging.json.md b/docs/01_nodeos/06_logging/10_native_logging/10_setup-logging.json.md
similarity index 100%
rename from docs/01_nodeos/06_logging/00_setup-logging.json.md
rename to docs/01_nodeos/06_logging/10_native_logging/10_setup-logging.json.md
diff --git a/docs/01_nodeos/06_logging/10_native_logging/20_logging-levels.md b/docs/01_nodeos/06_logging/10_native_logging/20_logging-levels.md
new file mode 100644
index 00000000000..3c1e4260e65
--- /dev/null
+++ b/docs/01_nodeos/06_logging/10_native_logging/20_logging-levels.md
@@ -0,0 +1,168 @@
+---
+content_title: Logging Levels
+---
+
+There are six available logging levels:
+- all
+- debug
+- info
+- warn
+- error
+- off
+
+Sample `logging.json`:
+
+```
+{
+ "includes": [],
+ "appenders": [{
+ "name": "stderr",
+ "type": "console",
+ "args": {
+ "stream": "std_error",
+ "level_colors": [{
+ "level": "debug",
+ "color": "green"
+ },{
+ "level": "warn",
+ "color": "brown"
+ },{
+ "level": "error",
+ "color": "red"
+ }
+ ],
+ "flush": true
+ },
+ "enabled": true
+ },{
+ "name": "stdout",
+ "type": "console",
+ "args": {
+ "stream": "std_out",
+ "level_colors": [{
+ "level": "debug",
+ "color": "green"
+ },{
+ "level": "warn",
+ "color": "brown"
+ },{
+ "level": "error",
+ "color": "red"
+ }
+ ],
+ "flush": true
+ },
+ "enabled": true
+ },{
+ "name": "net",
+ "type": "gelf",
+ "args": {
+ "endpoint": "10.10.10.10:12201",
+ "host": "host_name"
+ },
+ "enabled": true
+ },{
+ "name": "zip",
+ "type": "zipkin",
+ "args": {
+ "endpoint": "http://127.0.0.1:9411",
+ "path": "/api/v2/spans",
+ "service_name": "nodeos",
+ "timeout_us": 200000
+ },
+ "enabled": true
+ }
+ ],
+ "loggers": [{
+ "name": "default",
+ "level": "debug",
+ "enabled": true,
+ "additivity": false,
+ "appenders": [
+ "stderr",
+ "net"
+ ]
+ },{
+ "name": "zipkin",
+ "level": "debug",
+ "enabled": true,
+ "additivity": false,
+ "appenders": [
+ "zip"
+ ]
+ },{
+ "name": "net_plugin_impl",
+ "level": "info",
+ "enabled": true,
+ "additivity": false,
+ "appenders": [
+ "stderr",
+ "net"
+ ]
+ },{
+ "name": "http_plugin",
+ "level": "debug",
+ "enabled": true,
+ "additivity": false,
+ "appenders": [
+ "stderr",
+ "net"
+ ]
+ },{
+ "name": "producer_plugin",
+ "level": "debug",
+ "enabled": true,
+ "additivity": false,
+ "appenders": [
+ "stderr",
+ "net"
+ ]
+ },{
+ "name": "transaction_success_tracing",
+ "level": "debug",
+ "enabled": true,
+ "additivity": false,
+ "appenders": [
+ "stderr",
+ "net"
+ ]
+ },{
+ "name": "transaction_failure_tracing",
+ "level": "debug",
+ "enabled": true,
+ "additivity": false,
+ "appenders": [
+ "stderr",
+ "net"
+ ]
+ },{
+ "name": "state_history",
+ "level": "debug",
+ "enabled": true,
+ "additivity": false,
+ "appenders": [
+ "stderr",
+ "net"
+ ]
+ },{
+ "name": "trace_api",
+ "level": "debug",
+ "enabled": true,
+ "additivity": false,
+ "appenders": [
+ "stderr",
+ "net"
+ ]
+ },{
+ "name": "blockvault_client_plugin",
+ "level": "debug",
+ "enabled": true,
+ "additivity": false,
+ "appenders": [
+ "stderr",
+ "net"
+ ]
+ }
+ ]
+}
+```
diff --git a/docs/01_nodeos/06_logging/10_native_logging/index.md b/docs/01_nodeos/06_logging/10_native_logging/index.md
new file mode 100644
index 00000000000..7828219f402
--- /dev/null
+++ b/docs/01_nodeos/06_logging/10_native_logging/index.md
@@ -0,0 +1,113 @@
+---
+content_title: Native Logging
+link_text: Native Logging
+---
+
+Logging for `nodeos` is controlled by the `logging.json` file. CLI options can be passed to `nodeos` to [setup `logging.json`](10_setup-logging.json.md). The logging configuration file can be used to define [appenders](#appenders) and tie them to [loggers](#loggers) and [logging levels](20_logging-levels.md).
+
+## Appenders
+
+The logging library built into EOSIO supports two appender types:
+
+- [Console](#console)
+- [GELF](#gelf) (Graylog Extended Log Format)
+
+### Console
+
+This will output log messages to the screen. The configuration options are:
+
+- `name` - arbitrary name to identify instance for use in loggers
+- `type` - "console"
+- `stream` - "std_out" or "std_err"
+- `level_colors` - maps a log level to a colour
+ - level - see [logging levels](20_logging-levels.md)
+ - color - may be one of ("red", "green", "brown", "blue", "magenta", "cyan", "white", "console_default")
+- `enabled` - bool value to enable/disable the appender.
+
+Example:
+
+```json
+{
+ "name": "consoleout",
+ "type": "console",
+ "args": {
+ "stream": "std_out",
+
+ "level_colors": [{
+ "level": "debug",
+ "color": "green"
+ },{
+ "level": "warn",
+ "color": "brown"
+ },{
+ "level": "error",
+ "color": "red"
+ }
+ ]
+ },
+ "enabled": true
+}
+```
+
+### GELF
+
+This sends the log messages to `Graylog`. `Graylog` is a fully integrated platform for collecting, indexing, and analyzing log messages. The configuration options are:
+
+ - `name` - arbitrary name to identify instance for use in loggers
+ - `type` - "gelf"
+ - `endpoint` - ip address and port number
+ - `host` - Graylog hostname, identifies you to Graylog.
+ - `enabled` - bool value to enable/disable the appender.
+
+Example:
+
+```json
+{
+ "name": "net",
+ "type": "gelf",
+ "args": {
+ "endpoint": "104.198.210.18:12202”,
+ "host":
+ },
+ "enabled": true
+}
+```
+
+## Loggers
+
+The logging library built into EOSIO currently supports the following loggers:
+
+- `default` - the default logger, always enabled.
+- `net_plugin_impl` - detailed logging for the net plugin.
+- `http_plugin` - detailed logging for the http plugin.
+- `producer_plugin` - detailed logging for the producer plugin.
+- `state_history` - detailed logging for state history plugin.
+- `transaction_success_tracing` - detailed log that emits successful verdicts from relay nodes on the P2P network.
+- `transaction_failure_tracing` - detailed log that emits failed verdicts from relay nodes on the P2P network.
+- `trace_api` - detailed logging for the trace_api plugin.
+- `blockvault_client_plugin` - detailed logging for the blockvault client plugin.
+
+The configuration options are:
+
+ - `name` - must match one of the names described above.
+ - `level` - see logging levels below.
+ - `enabled` - bool value to enable/disable the logger.
+ - `additivity` - true or false
+ - `appenders` - list of appenders by name (name in the appender configuration)
+
+Example:
+
+```json
+{
+ "name": "net_plugin_impl",
+ "level": "debug",
+ "enabled": true,
+ "additivity": false,
+ "appenders": [
+ "net"
+ ]
+}
+```
+
+[[info]]
+| The default logging level for all loggers if no `logging.json` is provided is `info`. Each logger can be configured independently in the `logging.json` file.
diff --git a/docs/01_nodeos/06_logging/20_third_party_logging/10_deep_mind_logger.md b/docs/01_nodeos/06_logging/20_third_party_logging/10_deep_mind_logger.md
new file mode 100644
index 00000000000..ce13dba2bde
--- /dev/null
+++ b/docs/01_nodeos/06_logging/20_third_party_logging/10_deep_mind_logger.md
@@ -0,0 +1,44 @@
+---
+content_title: Deep-mind Logger Integration
+link_text: Deep-mind Logger Integration
+---
+
+## Overview
+
+The `Deep-mind logger` is part of the `dfuse` [platform]([https://dfuse.io/](https://dfuse.io/)) which is a highly scalable and performant [open-source]([https://github.com/dfuse-io/dfuse-eosio/tree/master](https://github.com/dfuse-io/dfuse-eosio/tree/master)) platform for searching and processing blockchain data.
+
+### How To Enable Deep-mind Logger
+
+EOSIO integrates the `nodeos` core service daemon with `deep-mind logger`. To benefit from full `deep-mind` logging functionality you must start your `nodeos` instance with the flag `--deep-mind`. After the start you can observe in the `nodeos` console output the informative details outputs created by the `deep-mind` logger. They distinguish themselves from the default `nodeos` output lines because they start with the `DMLOG` keyword.
+
+Examples of `deep-mind` log lines as you would see them in the `nodeos` output console:
+
+```console
+DMLOG START_BLOCK 30515
+
+DMLOG TRX_OP CREATE onblock 308f77bf49ab4ddde74d37c7310c0742e253319d9da57ebe51eb7b35f1ffe174 {"expiration":"2020-11-12T10:13:06","ref_block_num":30514,...}
+
+DMLOG CREATION_OP ROOT 0
+
+DMLOG RLIMIT_OP ACCOUNT_USAGE UPD {"owner":"eosio","net_usage":{"last_ordinal":1316982371,"value_ex":0,"consumed":0},"cpu_usage":{"last_ordinal":1316982371,"value_ex":24855,"consumed":101},"ram_usage":27083}
+
+DMLOG APPLIED_TRANSACTION 30515 {"id":"308f77bf49ab4ddde74d37c7310c0742e253319d9da57ebe51eb7b35f1ffe174","block_num":30515,"block_time":"2020-11-12T10:13:05.500",...}
+
+DMLOG RLIMIT_OP STATE UPD {"average_block_net_usage":{"last_ordinal":30514,"value_ex":0,"consumed":0},"average_block_cpu_usage":{"last_ordinal":30514,...}
+DMLOG ACCEPTED_BLOCK 30516 {"block_num":30516,"dpos_proposed_irreversible_blocknum":30516,"dpos_irreversible_blocknum":30515,...
+
+...
+
+DMLOG FEATURE_OP ACTIVATE 0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd {"feature_digest":"0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd","subjective_restrictions":{"enabled":true,"preactivation_required":false,"earliest_allowed_activation_time":"1970-01-01T00:00:00.000"},"description_digest":"64fe7df32e9b86be2b296b3f81dfd527f84e82b98e363bc97e40bc7a83733310","dependencies":[],"protocol_feature_type":"builtin","specification":
+[{"name":"builtin_feature_codename","value":"PREACTIVATE_FEATURE"}]}
+
+...
+
+DMLOG FEATURE_OP ACTIVATE 825ee6288fb1373eab1b5187ec2f04f6eacb39cb3a97f356a07c91622dd61d16 {"feature_digest":"825ee6288fb1373eab1b5187ec2f04f6eacb39cb3a97f356a07c91622dd61d16","subjective_restrictions":{"enabled":true,"preactivation_required":true,"earliest_allowed_activation_time":"1970-01-01T00:00:00.000"},"description_digest":"14cfb3252a5fa3ae4c764929e0bbc467528990c9cc46aefcc7f16367f28b6278","dependencies":[],"protocol_feature_type":"builtin","specification":
+[{"name":"builtin_feature_codename","value":"KV_DATABASE"}]}
+
+...
+
+DMLOG FEATURE_OP ACTIVATE c3a6138c5061cf291310887c0b5c71fcaffeab90d5deb50d3b9e687cead45071 {"feature_digest":"c3a6138c5061cf291310887c0b5c71fcaffeab90d5deb50d3b9e687cead45071","subjective_restrictions":{"enabled":true,"preactivation_required":true,"earliest_allowed_activation_time":"1970-01-01T00:00:00.000"},"description_digest":"69b064c5178e2738e144ed6caa9349a3995370d78db29e494b3126ebd9111966","dependencies":[],"protocol_feature_type":"builtin","specification":
+[{"name":"builtin_feature_codename","value":"ACTION_RETURN_VALUE"}]}
+```
diff --git a/docs/01_nodeos/06_logging/20_third_party_logging/20_zipkin_tracer.md b/docs/01_nodeos/06_logging/20_third_party_logging/20_zipkin_tracer.md
new file mode 100644
index 00000000000..fef052ab791
--- /dev/null
+++ b/docs/01_nodeos/06_logging/20_third_party_logging/20_zipkin_tracer.md
@@ -0,0 +1,34 @@
+---
+content_title: Zipkin Tracer Integration
+link_text: Zipkin Tracer Integration
+---
+
+## Overview
+
+The `Zipkin service` is a [distributed tracing system](https://zipkin.io/). It helps gather timing data needed to troubleshoot latency problems in service architectures. Its features include both the collection and lookup of this data. `Zipkin tracer` is the EOSIO component that sends traces to the `Zipkin service`. The `Zipkin` service can be installed in the local environment or it can be remote.
+
+### How To Enable Zipkin Tracer
+
+EOSIO makes available `Zipkin tracer` through the [core `chain_plugin`](../../03_plugins/chain_plugin). To enable the `Zipkin tracer` you must set the `telemetry-url` parameter for the `chain_plugin`. There are two additional parameters you can set: `telemetry-service-name` and `telemetry-timeout-us`. All three available parameters are detailed below:
+
+* `telemetry-url` specifies the url of the Zipkin service, e.g. [http://127.0.0.1:9411/api/v2/spans](http://127.0.0.1:9411/api/v2/spans) if it is installed in the local environment.
+* `telemetry-service-name` specifies the Zipkin `localEndpoint.serviceName` sent with each span.
+* `telemetry-timeout-us`, optional parameter, specifies the timeout for sending zipkin spans with default value set to 200000. `Zipkin tracer` sends zipkin spans, in json format, to the `Zipkin service` via HTTP POST requests on a separate thread. `telemetry-timeout-us` specifies how long to allow each HTTP POST request before reaching the time out and thus fail. Nine consecutive failures will disable the `Zipkin tracer` until a restart of `nodeos` daemon occurs.
+
+Once `Zipkin tracer` is enabled you can observe the detailed traces it sends to the `Zipkin service`. Examples of such traces are given below.
+
+Submitted transaction:
+
+
+
+Processed transaction:
+
+
+
+Block accepted:
+
+
+
+SHiP Accepted:
+
+
diff --git a/docs/01_nodeos/06_logging/20_third_party_logging/block_accepted.png b/docs/01_nodeos/06_logging/20_third_party_logging/block_accepted.png
new file mode 100644
index 00000000000..baced1d2b3a
Binary files /dev/null and b/docs/01_nodeos/06_logging/20_third_party_logging/block_accepted.png differ
diff --git a/docs/01_nodeos/06_logging/20_third_party_logging/index.md b/docs/01_nodeos/06_logging/20_third_party_logging/index.md
new file mode 100644
index 00000000000..ce689a876d5
--- /dev/null
+++ b/docs/01_nodeos/06_logging/20_third_party_logging/index.md
@@ -0,0 +1,15 @@
+---
+content_title: Third-Party Logging And Tracing Integration
+link_text: Third-Party Logging And Tracing Integration
+---
+
+## Overview
+
+To stay informed about the overall and detailed performance of your EOSIO-based blockchain node(s), you can make use of the telemetry tools available. EOSIO offers integration with two such telemetry tools:
+
+* [Deep-mind logger](10_deep_mind_logger.md)
+* [Zipkin tracer](20_zipkin_tracer.md)
+
+## Performance Considerations
+
+Many wise people already said it, everything comes with a price. The telemetry tools, when activated, will have a certain impact on your `nodeos` performance which depends on various factors, but nevertheless the performance will be impacted; therefore, it is recommended you use them wisely in those situations when you really need the extra detailed information they provide, and then you turn them off.
diff --git a/docs/01_nodeos/06_logging/20_third_party_logging/processed_transaction.png b/docs/01_nodeos/06_logging/20_third_party_logging/processed_transaction.png
new file mode 100644
index 00000000000..baced1d2b3a
Binary files /dev/null and b/docs/01_nodeos/06_logging/20_third_party_logging/processed_transaction.png differ
diff --git a/docs/01_nodeos/06_logging/20_third_party_logging/ship_accepted.png b/docs/01_nodeos/06_logging/20_third_party_logging/ship_accepted.png
new file mode 100644
index 00000000000..baced1d2b3a
Binary files /dev/null and b/docs/01_nodeos/06_logging/20_third_party_logging/ship_accepted.png differ
diff --git a/docs/01_nodeos/06_logging/20_third_party_logging/submitted_transaction.png b/docs/01_nodeos/06_logging/20_third_party_logging/submitted_transaction.png
new file mode 100644
index 00000000000..baced1d2b3a
Binary files /dev/null and b/docs/01_nodeos/06_logging/20_third_party_logging/submitted_transaction.png differ
diff --git a/docs/01_nodeos/06_logging/index.md b/docs/01_nodeos/06_logging/index.md
index 8a7670e7fb5..1d6dcbab046 100644
--- a/docs/01_nodeos/06_logging/index.md
+++ b/docs/01_nodeos/06_logging/index.md
@@ -1,110 +1,9 @@
---
-content_title: Nodeos Logging
+content_title: Logging And Tracing
+link_text: Logging And Tracing
---
-Logging for `nodeos` is controlled by the `logging.json` file. CLI options can be passed to `nodeos` to [setup `logging.json`](00_setup-logging.json.md). The logging configuration file can be used to define [appenders](#appenders) and tie them to [loggers](#loggers) and [logging levels](01_logging-levels.md).
+Nodeos has the following logging and tracing features:
-## Appenders
-
-The logging library built into EOSIO supports two appender types:
-
-- [Console](#console)
-- [GELF](#gelf) (Graylog Extended Log Format)
-
-### Console
-
-This will output log messages to the screen. The configuration options are:
-
-- `name` - arbitrary name to identify instance for use in loggers
-- `type` - "console"
-- `stream` - "std_out" or "std_err"
-- `level_colors` - maps a log level to a colour
- - level - see [logging levels](01_logging-levels.md)
- - color - may be one of ("red", "green", "brown", "blue", "magenta", "cyan", "white", "console_default")
-- `enabled` - bool value to enable/disable the appender.
-
-Example:
-
-```json
-{
- "name": "consoleout",
- "type": "console",
- "args": {
- "stream": "std_out",
-
- "level_colors": [{
- "level": "debug",
- "color": "green"
- },{
- "level": "warn",
- "color": "brown"
- },{
- "level": "error",
- "color": "red"
- }
- ]
- },
- "enabled": true
-}
-```
-
-### GELF
-
-This sends the log messages to `Graylog`. `Graylog` is a fully integrated platform for collecting, indexing, and analyzing log messages. The configuration options are:
-
- - `name` - arbitrary name to identify instance for use in loggers
- - `type` - "gelf"
- - `endpoint` - ip address and port number
- - `host` - Graylog hostname, identifies you to Graylog.
- - `enabled` - bool value to enable/disable the appender.
-
-Example:
-
-```json
-{
- "name": "net",
- "type": "gelf",
- "args": {
- "endpoint": "104.198.210.18:12202”,
- "host":
- },
- "enabled": true
-}
-```
-
-## Loggers
-
-The logging library built into EOSIO currently supports the following loggers:
-
-- `default` - the default logger, always enabled.
-- `net_plugin_impl` - detailed logging for the net plugin.
-- `http_plugin` - detailed logging for the http plugin.
-- `producer_plugin` - detailed logging for the producer plugin.
-- `transaction_tracing` - detailed log that emits verdicts from relay nodes on the P2P network.
-- `transaction_failure_tracing` - detailed log that emits failed verdicts from relay nodes on the P2P network.
-- `trace_api` - detailed logging for the trace_api plugin.
-
-The configuration options are:
-
- - `name` - must match one of the names described above.
- - `level` - see logging levels below.
- - `enabled` - bool value to enable/disable the logger.
- - `additivity` - true or false
- - `appenders` - list of appenders by name (name in the appender configuration)
-
-Example:
-
-```json
-{
- "name": "net_plugin_impl",
- "level": "debug",
- "enabled": true,
- "additivity": false,
- "appenders": [
- "net"
- ]
-}
-```
-
-[[info]]
-| The default logging level for all loggers if no `logging.json` is provided is `info`. Each logger can be configured independently in the `logging.json` file.
+* [Native Logging](10_native_logging/index.md)
+* [Third-Party Logging And Tracing Integration](20_third_party_logging/index.md)
diff --git a/docs/01_nodeos/07_concepts/05_storage-and-read-modes.md b/docs/01_nodeos/07_concepts/05_storage-and-read-modes.md
index df2a872729a..4de395bd377 100644
--- a/docs/01_nodeos/07_concepts/05_storage-and-read-modes.md
+++ b/docs/01_nodeos/07_concepts/05_storage-and-read-modes.md
@@ -2,22 +2,33 @@
content_title: Storage and Read Modes
---
-The EOSIO platform stores blockchain information in various data structures at various stages of a transaction's lifecycle. Some of these are described below. The producing node is the `nodeos` instance run by the block producer who is currently creating blocks for the blockchain (which changes every 6 seconds, producing 12 blocks in sequence before switching to another producer.)
+The EOSIO platform stores blockchain information in various data structures at various stages of a transaction's lifecycle. Some of these are described below. The producing node is the `nodeos` instance run by the block producer who is currently creating blocks for the blockchain (which changes every 6 seconds, producing 12 blocks in sequence before switching to another producer).
## Blockchain State and Storage
-Every `nodeos` instance creates some internal files to housekeep the blockchain state. These files reside in the `~/eosio/nodeos/data` installation directory and their purpose is described below:
+Every `nodeos` instance creates some internal files to store the blockchain state. These files reside in the `~/eosio/nodeos/data` installation directory and their purpose is described below:
* The `blocks.log` is an append only log of blocks written to disk and contains all the irreversible blocks. These blocks contain final, confirmed transactions.
* `reversible_blocks` is a memory mapped file and contains blocks that have been written to the blockchain but have not yet become irreversible. These blocks contain valid pushed transactions that still await confirmation to become final via the consensus protocol. The head block is the last block written to the blockchain, stored in `reversible_blocks`.
-* The `chain state` or `chain database` is currently stored and cached in a memory mapped file. It contains the blockchain state associated with each block, including account details, deferred transactions, and data stored using multi index tables in smart contracts. The last 65,536 block IDs are also cached to support Transaction as Proof of Stake (TaPOS). The transaction ID/expiration is also cached until the transaction expires.
-
+* The `chain state` or `chain database` is stored either in `chainbase` or in `rocksdb`, dependant on the `nodeos` `chain_plugin` configuration option `backing-store`. It contains the blockchain state associated with each block, including account details, deferred transactions, and data stored using multi index tables in smart contracts. The last 65,536 block IDs are also cached to support Transaction as Proof of Stake (TaPOS). The transaction ID/expiration is also cached until the transaction expires.
* The `pending block` is an in memory block containing transactions as they are processed and pushed into the block; this will/may eventually become the head block. If the `nodeos` instance is the producing node, the pending block is distributed to other `nodeos` instances.
-* Outside the chain state, block data is cached in RAM until it becomes final/irreversible; especifically the signed block itself. After the last irreversible block (LIB) catches up to the block, that block is then retrieved from the irreversible blocks log.
+* Outside the `chain state`, block data is cached in RAM until it becomes final/irreversible; specifically the signed block itself. After the last irreversible block (LIB) catches up to the block, that block is then retrieved from the irreversible blocks log.
+
+### Configurable state storage
+
+`Nodeos` stores the transaction history and current state. The transaction history is stored in the `blocks.log` file on disk. Current state, which is changed by the execution of transactions, is currently stored using chainbase or RocksDB (as of EOSIO 2.1). EOSIO 2.1 introduces configurable state storage and currently supports these backing stores:
+
+* Chainbase
+* RocksDB
+
+Chainbase is a proprietary in-memory transactional database, built by Block.one, which uses memory mapped files for persistence.
+
+RocksDB is an open source persistent key value store. Storing state in memory is fast, however limited by the amount of available RAM. RocksDB utilises low latency storage such as flash drives and high-speed disk drives to persist data and memory caches for fast data access. For some deployments, RocksDB may be a better state store. See [the RocksDB website](https://rocksdb.org/) for more information.
+
## EOSIO Interfaces
-EOSIO provides a set of [services](../../) and [interfaces](https://developers.eos.io/manuals/eosio.cdt/latest/files) that enable contract developers to persist state across action, and consequently transaction, boundaries. Contracts may use these services and interfaces for various purposes. For example, `eosio.token` contract keeps balances for all users in the chain database. Each instance of `nodeos` keeps the database in memory, so contracts can read and write data with ease.
+EOSIO provides a set of [services](../../) and [interfaces](https://developers.eos.io/manuals/eosio.cdt/latest/files) that enable contract developers to persist state across action, and consequently transaction, boundaries. Contracts may use these services and interfaces for various purposes. For example, `eosio.token` contract keeps balances for all users in the `chain database`. Each instance of `nodeos` maintains the `chain database` in an efficient data store, so contracts can read and write data with ease.
### Nodeos RPC API
diff --git a/docs/01_nodeos/07_concepts/10_context-free-data/05_how-to-prune-context-free-data.md b/docs/01_nodeos/07_concepts/10_context-free-data/05_how-to-prune-context-free-data.md
new file mode 100644
index 00000000000..aaed758d3a9
--- /dev/null
+++ b/docs/01_nodeos/07_concepts/10_context-free-data/05_how-to-prune-context-free-data.md
@@ -0,0 +1,376 @@
+---
+content_title: How to prune context-free data
+link_text: How to prune context-free data
+---
+
+## Summary
+
+This how-to procedure showcases the steps to prune context-free data (CFD) from a transaction. The process involves launching the [`eosio-blocklog`](../../../10_utilities/eosio-blocklog.md) utility with the `--prune-transactions` option, the transaction ID(s) that contain(s) the context-free data, and additional options as specified below.
+
+[[caution | Data Pruning on Public Chains]]
+| Pruning transaction data is not suitable for public EOSIO blockchains, unless previously agreed upon through EOSIO consensus by a supermajority of producers. Even if a producing node on a public EOSIO network prunes context-free data from a transaction, only their node would be affected. The integrity of the blockchain would not be compromised.
+
+## Prerequisites
+
+The following items must be known in advance or completed before starting the procedure:
+
+* The ID of a retired transaction with context-free data in a finalized block.
+* Become familiar with the [context-free data](index.md) section of a transaction.
+* Review the [`eosio-blocklog`](../../../10_utilities/eosio-blocklog.md) command-line utility reference.
+
+## Procedure
+
+Complete the following steps to prune the context-free data from the transaction:
+
+1. Locate the transaction ID you want to prune the context-free data from, e.g. ``. The transaction ID can also be found on the `id` field of the transaction.
+2. Locate the block number that contains the transaction, e.g. ``. Make sure the block number matches the `block_num` field of the transaction.
+3. Find the blocks directory and state history directory (if applicable), e.g. `` and ``, respectively.
+4. Launch the [`eosio-blocklog`](../../../10_utilities/eosio-blocklog.md) utility as follows:
+
+ `eosio-blocklog [--blocks-dir ] [--state-history-dir ] --prune-transactions --block-num --transaction [--transaction ...]`
+
+ If the operation is *successful*:
+ * The [`eosio-blocklog`](../../../10_utilities/eosio-blocklog.md) utility terminates silently with a zero error code (no error).
+ * The following fields are updated within the pruned transaction from the block logs:
+ * The `prunable_data["prunable_data"][0]` field is set from 0 to 1.
+ * The `signatures` field is set to an empty array.
+ * The `context_free_data` field is set to an empty array.
+ * The `packed_context_free_data` field, if any, is removed.
+
+ If the operaton is *unsuccessful*:
+ * The [`eosio-blocklog`](../../../10_utilities/eosio-blocklog.md) utility outputs an error to `stderr` and terminates with a non-zero error code (indicating an error).
+
+## Notes
+
+Some additional considerations are in order:
+
+* You can pass multiple transactions to [`eosio-blocklog`](../../../10_utilities/eosio-blocklog.md) if they are within the same block.
+* You can use [`eosio-blocklog`](../../../10_utilities/eosio-blocklog.md) to display the block that contains the pruned transactions.
+
+## Example
+
+In this example, we reproduce the steps listed in the [Procedure](#procedure) section above.
+
+### Transaction sample (before)
+
+Refer to the following transaction sample with context-free data:
+
+```json
+{
+ "id": "1b9a9c53f9b692d3382bcc19c0c21eb22207e2f51a30fe88dabbb45376b6ff23",
+ "trx": {
+ "receipt": {
+ "status": "executed",
+ "cpu_usage_us": 155,
+ "net_usage_words": 14,
+ "trx": [
+ 1,
+ {
+ "compression": "none",
+ "prunable_data": {
+ "prunable_data": [
+ 0,
+ {
+ "signatures": [
+ "SIG_K1_K3AJXEMFH99KScLFC1cnLA3WDnVK7WRsS8BtafHfP4VWmfQXXwX21KATVVtrCqopkcve6V8noc5bS4BJkwgSsonpfpWEJi"
+ ],
+ "packed_context_free_data": "0203a1b2c3031a2b3c"
+ }
+ ]
+ },
+ "packed_trx": "ec42545f7500ffe8aa290000000100305631191abda90000000000901d4d00000100305631191abda90000000000901d4d0100305631191abda900000000a8ed32320000"
+ }
+ ]
+ },
+ "trx": {
+ "expiration": "2020-09-06T02:01:16",
+ "ref_block_num": 117,
+ "ref_block_prefix": 699066623,
+ "max_net_usage_words": 0,
+ "max_cpu_usage_ms": 0,
+ "delay_sec": 0,
+ "context_free_actions": [
+ {
+ "account": "payloadless",
+ "name": "doit",
+ "authorization": [],
+ "data": ""
+ }
+ ],
+ "actions": [
+ {
+ "account": "payloadless",
+ "name": "doit",
+ "authorization": [
+ {
+ "actor": "payloadless",
+ "permission": "active"
+ }
+ ],
+ "data": ""
+ }
+ ],
+ "signatures": [
+ "SIG_K1_K3AJXEMFH99KScLFC1cnLA3WDnVK7WRsS8BtafHfP4VWmfQXXwX21KATVVtrCqopkcve6V8noc5bS4BJkwgSsonpfpWEJi"
+ ],
+ "context_free_data": [
+ "a1b2c3",
+ "1a2b3c"
+ ]
+ }
+ },
+ "block_time": "2020-09-06T02:00:47.000",
+ "block_num": 119,
+ "last_irreversible_block": 128,
+ "traces": [
+ {
+ "action_ordinal": 1,
+ "creator_action_ordinal": 0,
+ "closest_unnotified_ancestor_action_ordinal": 0,
+ "receipt": {
+ "receiver": "payloadless",
+ "act_digest": "4f09a630d4456585ee4ec5ef96c14151587367ad381f9da445b6b6239aae82cf",
+ "global_sequence": 156,
+ "recv_sequence": 2,
+ "auth_sequence": [],
+ "code_sequence": 1,
+ "abi_sequence": 1
+ },
+ "receiver": "payloadless",
+ "act": {
+ "account": "payloadless",
+ "name": "doit",
+ "authorization": [],
+ "data": ""
+ },
+ "context_free": true,
+ "elapsed": 206,
+ "console": "Im a payloadless action",
+ "trx_id": "1b9a9c53f9b692d3382bcc19c0c21eb22207e2f51a30fe88dabbb45376b6ff23",
+ "block_num": 119,
+ "block_time": "2020-09-06T02:00:47.000",
+ "producer_block_id": null,
+ "account_ram_deltas": [],
+ "account_disk_deltas": [],
+ "except": null,
+ "error_code": null,
+ "return_value_hex_data": ""
+ },
+ {
+ "action_ordinal": 2,
+ "creator_action_ordinal": 0,
+ "closest_unnotified_ancestor_action_ordinal": 0,
+ "receipt": {
+ "receiver": "payloadless",
+ "act_digest": "b8871e8f3c79b02804a2ad28acb015f503e7f6e56f35565e5fa37b6767da1aa5",
+ "global_sequence": 157,
+ "recv_sequence": 3,
+ "auth_sequence": [
+ [
+ "payloadless",
+ 3
+ ]
+ ],
+ "code_sequence": 1,
+ "abi_sequence": 1
+ },
+ "receiver": "payloadless",
+ "act": {
+ "account": "payloadless",
+ "name": "doit",
+ "authorization": [
+ {
+ "actor": "payloadless",
+ "permission": "active"
+ }
+ ],
+ "data": ""
+ },
+ "context_free": false,
+ "elapsed": 11,
+ "console": "Im a payloadless action",
+ "trx_id": "1b9a9c53f9b692d3382bcc19c0c21eb22207e2f51a30fe88dabbb45376b6ff23",
+ "block_num": 119,
+ "block_time": "2020-09-06T02:00:47.000",
+ "producer_block_id": null,
+ "account_ram_deltas": [],
+ "account_disk_deltas": [],
+ "except": null,
+ "error_code": null,
+ "return_value_hex_data": ""
+ }
+ ]
+}
+```
+
+### Steps
+
+Using the above transaction to recreate the steps above:
+
+1. Locate the transaction ID: `1b9a9c53f9b692d3382bcc19c0c21eb22207e2f51a30fe88dabbb45376b6ff23`.
+2. Locate the block number: `119`.
+3. Find the blocks directory and state history directory (if applicable), e.g. `` and ``.
+4. Launch the [`eosio-blocklog`](../../../10_utilities/eosio-blocklog.md) utility as follows:
+
+ `eosio-blocklog --blocks-dir --state-history-dir --prune-transactions --block-num 119 --transaction 1b9a9c53f9b692d3382bcc19c0c21eb22207e2f51a30fe88dabbb45376b6ff23`
+
+If *successful*, the utility returns silently. If *unsuccessful*, it outputs an error to `stderr`.
+
+### Transaction sample (after)
+
+After retrieving the transaction a second time, the pruned transaction looks as follows:
+
+```json
+{
+ "id": "1b9a9c53f9b692d3382bcc19c0c21eb22207e2f51a30fe88dabbb45376b6ff23",
+ "trx": {
+ "receipt": {
+ "status": "executed",
+ "cpu_usage_us": 155,
+ "net_usage_words": 14,
+ "trx": [
+ 1,
+ {
+ "compression": "none",
+ "prunable_data": {
+ "prunable_data": [
+ 1,
+ {
+ "digest": "6f29ea8ab323ffee90585238ff32300c4ee6aa563235ff05f3c1feb855f09189"
+ }
+ ]
+ },
+ "packed_trx": "ec42545f7500ffe8aa290000000100305631191abda90000000000901d4d00000100305631191abda90000000000901d4d0100305631191abda900000000a8ed32320000"
+ }
+ ]
+ },
+ "trx": {
+ "expiration": "2020-09-06T02:01:16",
+ "ref_block_num": 117,
+ "ref_block_prefix": 699066623,
+ "max_net_usage_words": 0,
+ "max_cpu_usage_ms": 0,
+ "delay_sec": 0,
+ "context_free_actions": [
+ {
+ "account": "payloadless",
+ "name": "doit",
+ "authorization": [],
+ "data": ""
+ }
+ ],
+ "actions": [
+ {
+ "account": "payloadless",
+ "name": "doit",
+ "authorization": [
+ {
+ "actor": "payloadless",
+ "permission": "active"
+ }
+ ],
+ "data": ""
+ }
+ ],
+ "signatures": [],
+ "context_free_data": []
+ }
+ },
+ "block_time": "2020-09-06T02:00:47.000",
+ "block_num": 119,
+ "last_irreversible_block": 131,
+ "traces": [
+ {
+ "action_ordinal": 1,
+ "creator_action_ordinal": 0,
+ "closest_unnotified_ancestor_action_ordinal": 0,
+ "receipt": {
+ "receiver": "payloadless",
+ "act_digest": "4f09a630d4456585ee4ec5ef96c14151587367ad381f9da445b6b6239aae82cf",
+ "global_sequence": 156,
+ "recv_sequence": 2,
+ "auth_sequence": [],
+ "code_sequence": 1,
+ "abi_sequence": 1
+ },
+ "receiver": "payloadless",
+ "act": {
+ "account": "payloadless",
+ "name": "doit",
+ "authorization": [],
+ "data": ""
+ },
+ "context_free": true,
+ "elapsed": 206,
+ "console": "Im a payloadless action",
+ "trx_id": "1b9a9c53f9b692d3382bcc19c0c21eb22207e2f51a30fe88dabbb45376b6ff23",
+ "block_num": 119,
+ "block_time": "2020-09-06T02:00:47.000",
+ "producer_block_id": null,
+ "account_ram_deltas": [],
+ "account_disk_deltas": [],
+ "except": null,
+ "error_code": null,
+ "return_value_hex_data": ""
+ },
+ {
+ "action_ordinal": 2,
+ "creator_action_ordinal": 0,
+ "closest_unnotified_ancestor_action_ordinal": 0,
+ "receipt": {
+ "receiver": "payloadless",
+ "act_digest": "b8871e8f3c79b02804a2ad28acb015f503e7f6e56f35565e5fa37b6767da1aa5",
+ "global_sequence": 157,
+ "recv_sequence": 3,
+ "auth_sequence": [
+ [
+ "payloadless",
+ 3
+ ]
+ ],
+ "code_sequence": 1,
+ "abi_sequence": 1
+ },
+ "receiver": "payloadless",
+ "act": {
+ "account": "payloadless",
+ "name": "doit",
+ "authorization": [
+ {
+ "actor": "payloadless",
+ "permission": "active"
+ }
+ ],
+ "data": ""
+ },
+ "context_free": false,
+ "elapsed": 11,
+ "console": "Im a payloadless action",
+ "trx_id": "1b9a9c53f9b692d3382bcc19c0c21eb22207e2f51a30fe88dabbb45376b6ff23",
+ "block_num": 119,
+ "block_time": "2020-09-06T02:00:47.000",
+ "producer_block_id": null,
+ "account_ram_deltas": [],
+ "account_disk_deltas": [],
+ "except": null,
+ "error_code": null,
+ "return_value_hex_data": ""
+ }
+ ]
+}
+```
+
+### Remarks
+
+Notice the following modified fields within the pruned transaction:
+ * The `prunable_data["prunable_data"][0]` field is 1.
+ * The `signatures` field now contains an empty array.
+ * The `context_free_data` field contains an empty array.
+ * The `packed_context_free_data` field is removed.
+
+## Next Steps
+
+The following actions are available after you complete the procedure:
+
+* Verify that the pruned transaction indeed contains pruned context-free data.
+* Display the block that contains the pruned transaction from the block logs.
diff --git a/docs/01_nodeos/07_concepts/10_context-free-data/index.md b/docs/01_nodeos/07_concepts/10_context-free-data/index.md
index 0a31072bcbe..01565e1e13d 100644
--- a/docs/01_nodeos/07_concepts/10_context-free-data/index.md
+++ b/docs/01_nodeos/07_concepts/10_context-free-data/index.md
@@ -6,6 +6,9 @@ link_text: Context-Free Data
## Overview
The immutable nature of the blockchain allows data to be stored securely while also enforcing the integrity of such data. However, this benefit also complicates the removal of non-essential data from the blockchain. Consequently, EOSIO blockchains contain a special section within the transaction, called the *context-free data*. As its name implies, data stored in the context-free data section is considered free of previous contexts or dependencies, which makes their potential removal possible. More importantly, such removal can be performed safely without compromising the integrity of the blockchain.
+[[info | Blockchain Integrity]]
+| Pruning of context-free data does not bend or relax the security of the blockchain. Nodes configured in full validation mode can still detect integrity violations on blocks with pruned transaction data.
+
## Concept
The goal of context-free data is to allow blockchain applications the option to store non-essential information within a transaction. Some examples of context-free data include:
@@ -14,3 +17,27 @@ The goal of context-free data is to allow blockchain applications the option to
* User comments made to an online article stored on the blockchain
In general, any data that is not vital for the operation and integrity of the blockchain may be stored as context-free data. It may also be used to comply with regional laws and regulations concerning data usage and personal information.
+
+## Pruning
+Blockchain applications that use context-free data might also want to remove the contents without affecting blockchain integrity. This can be achieved through a process called *pruning*. Removal of the context-free data associated with a transaction provides more functionality to blockchain applications, namely:
+
+* A mechanism to delete transaction data free of any context or inter-dependencies.
+* A way to maintain blockchain integrity while removing such context-free data.
+
+Pruning of context-free data only allows light block validation between trusted nodes. Full block validation, which involves transaction signature verification and permission authorization checks, is not fully feasible without violating the integrity checks of blocks and transactions where the pruning occurred.
+
+[[info | Pruning on Private Blockchains]]
+| Private EOSIO blockchains can benefit the most from context-free data pruning. Their controlled environment allows for trusted nodes to operate in light validation mode. This allows blockchain applications to use private EOSIO blockchains for this powerful feature.
+
+### Pruning Support
+`nodeos` supports the pruning of context-free data by meeting the following requirements:
+
+* Correct handling of irreversible blocks with removed context-free data in pruned transactions
+* Efficient deletion of existing context-free data within arbitrary finalized transactions
+* Correct handling of transaction traces with removed context-free data generated by the state history plugin
+* Efficient deletion of existing context-free data within finalized transactions from the trace log used by the state history plugin
+* Peer-to-peer synchronization of blocks with removed context-free data from applicable transactions
+* Tool support for the actual CFD pruning within the irreversible blocks log and the state history plugin trace log
+
+[[info | Pruning Tool]]
+| Node operators can perform the pruning of context-free data within a given transaction by using the [`eosio-blocklog`](../../../10_utilities/eosio-blocklog.md) utility. For instructions on using this tool for CFD pruning, see [How to prune context-free data](05_how-to-prune-context-free-data.md).
diff --git a/docs/01_nodeos/08_troubleshooting/index.md b/docs/01_nodeos/08_troubleshooting/index.md
index bb4a0d7edcb..e02265fdde0 100644
--- a/docs/01_nodeos/08_troubleshooting/index.md
+++ b/docs/01_nodeos/08_troubleshooting/index.md
@@ -46,4 +46,4 @@ cleos --url http://localhost:8888 get info | grep server_version
### Error 3070000: WASM Exception Error
-If you try to deploy the `eosio.bios` contract or `eosio.system` contract in an attempt to boot an EOSIO-based blockchain and you get the following error or similar: `Publishing contract... Error 3070000: WASM Exception Error Details: env.set_proposed_producers_ex unresolveable`, it is because you have to activate the `PREACTIVATE_FEATURE` protocol first. More details about it and how to enable it can be found in the [Bios Boot Sequence Tutorial](https://developers.eos.io/welcome/latest/tutorials/bios-boot-sequence/#112-set-the-eosiosystem-contract). For more information, you may also visit the [Nodeos Upgrade Guides](https://developers.eos.io/manuals/eos/latest/nodeos/upgrade-guides/).
+If you try to deploy the `eosio.bios` contract or `eosio.system` contract in an attempt to boot an EOSIO-based blockchain and you get the following error or similar: `Publishing contract... Error 3070000: WASM Exception Error Details: env.set_proposed_producers_ex unresolveable`, it is because you have to activate the `PREACTIVATE_FEATURE` protocol first. More details about it and how to enable it can be found in the [Bios Boot Sequence Tutorial](https://developers.eos.io/welcome/v2.1/tutorials/bios-boot-sequence/#112-set-the-eosiosystem-contract). For more information, you may also visit the [Nodeos Upgrade Guides](https://developers.eos.io/manuals/eos/latest/nodeos/upgrade-guides/).
diff --git a/docs/02_cleos/02_how-to-guides/how-to-buy-ram.md b/docs/02_cleos/02_how-to-guides/how-to-buy-ram.md
index 6dc5f723b5e..7829866f4d8 100644
--- a/docs/02_cleos/02_how-to-guides/how-to-buy-ram.md
+++ b/docs/02_cleos/02_how-to-guides/how-to-buy-ram.md
@@ -1,23 +1,52 @@
-## Goal
-Acquire RAM for contract deployment, database tables, and other blockchain resources
+## Overview
+This guide provides instructions on how to buy RAM for an EOSIO blockchain account using the cleos CLI tool. RAM is a system resource used to store blockchain state such as smart contract data and account information.
-## Before you begin
+The example uses `cleos` to buy RAM for the alice account. The alice account pays for the RAM and the alice@active permisssion authorizes the transaction.
-* You have an account
+## Before you Begin
+Make sure you meet the following requirements:
-* Ensure the reference system contracts from `eosio.contracts` repository is deployed and used to manage system resources
+* Install the currently supported version of `cleos.`
+[[info | Note]]
+| `Cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will install the `cleos` and `keosd` command line tools.
+* You have access to an EOSIO blockchain and the `eosio.system` reference contract from [`eosio.contracts`](https://github.com/EOSIO/eosio.contracts) repository is deployed and used to manage system resources.
+* You have an EOSIO account and access to the account's private key.
+* You have sufficient [tokens allocated](how-to-transfer-an-eosio.token-token.md) to your account.
-* You have sufficient token allocated to your account
+## Reference
+See the following reference guides for command line usage and related options:
-* Install the currently supported version of `cleos`
+* [cleos system buyram](../03_command-reference/system/system-buyram.md) command
-* Unlock your wallet
+## Buy Ram Procedure
-## Steps
+The following step shows you how to buy RAM
-Buys RAM in value of 0.1 SYS tokens for account `alice`:
+1. Run the following command to buy RAM worth 0.1 of `SYS` tokens for the alice account:
-```sh
+```shell
cleos system buyram alice alice "0.1 SYS" -p alice@active
-```
\ No newline at end of file
+```
+
+**Where**
+* `alice` = payer, the account paying for RAM.
+* `alice` = receiver, the account receiving bought RAM.
+* `0.1 SYS` = The amount of tokens to pay for RAM.
+* `-p alice@active` = The permission used to authorize the payment, in this case the active permission.
+
+**Example Output**
+
+```sh
+executed transaction: aa243c30571a5ecc8458cb971fa366e763682d89b636fe9dbe7d28327d1cc4e9 128 bytes 283 us
+# eosio <= eosio::buyram {"payer":"alice","receiver":"alice","quant":"0.1000 SYS"}
+# eosio.token <= eosio.token::transfer {"from":"alice","to":"eosio.ram","quantity":"0.0995 SYS","memo":"buy ram"}
+# eosio.token <= eosio.token::transfer {"from":"alice","to":"eosio.ramfee","quantity":"0.0005 SYS","memo":"ram fee"}
+# alice <= eosio.token::transfer {"from":"alice","to":"eosio.ram","quantity":"0.0995 SYS","memo":"buy ram"}
+# eosio.ram <= eosio.token::transfer {"from":"alice","to":"eosio.ram","quantity":"0.0995 SYS","memo":"buy ram"}
+# alice <= eosio.token::transfer {"from":"alice","to":"eosio.ramfee","quantity":"0.0005 SYS","memo":"ram fee"}
+# eosio.ramfee <= eosio.token::transfer {"from":"alice","to":"eosio.ramfee","quantity":"0.0005 SYS","memo":"ram fee"}
+warning: transaction executed locally, but may not be confirmed by the network yet ]
+```
+## Summary
+In conclusion, by following these instructions you are able to purchase RAM, with a specified amount of tokens, for the specified accounts.
\ No newline at end of file
diff --git a/docs/02_cleos/02_how-to-guides/how-to-connect-a-specific-network.md b/docs/02_cleos/02_how-to-guides/how-to-connect-a-specific-network.md
deleted file mode 100644
index 3b4698c2ba3..00000000000
--- a/docs/02_cleos/02_how-to-guides/how-to-connect-a-specific-network.md
+++ /dev/null
@@ -1,25 +0,0 @@
-## Goal
-
-Connect to a specific `nodeos` or `keosd` host to send COMMAND
-
-`cleos` and `keosd` can connect to a specific node by using the `--url` or `--wallet-url` optional arguments, respectively, followed by the http address and port number these services are listening to.
-
-[[info | Default address:port]]
-| If no optional arguments are used (i.e. `--url` or `--wallet-url`), `cleos` attempts to connect to a local `nodeos` or `keosd` running at localhost `127.0.0.1` and default port `8888`.
-
-## Before you begin
-
-* Install the currently supported version of `cleos`
-
-## Steps
-### Connecting to Nodeos
-
-```sh
-cleos -url http://nodeos-host:8888 COMMAND
-```
-
-### Connecting to Keosd
-
-```sh
-cleos --wallet-url http://keosd-host:8888 COMMAND
-```
diff --git a/docs/02_cleos/02_how-to-guides/how-to-connect-to-a-specific-keosd.md b/docs/02_cleos/02_how-to-guides/how-to-connect-to-a-specific-keosd.md
new file mode 100644
index 00000000000..a5e3dfefa16
--- /dev/null
+++ b/docs/02_cleos/02_how-to-guides/how-to-connect-to-a-specific-keosd.md
@@ -0,0 +1,35 @@
+## Overview
+This guide provides instructions on how to connect to specifc wallet when using `cleos`. `Cleos` can connect to a specific wallet by using the `--wallet-url` optional argument, followed by the http address and port number.
+
+The example uses the `wallet-url` optional arguments to request data from the the specified `keosd` instance.
+
+[[info | Default address:port]]
+| If no optional arguments are used (i.e. no `--wallet-url`), `cleos` attempts to connect to a local `nodeos` or `keosd` running at localhost or `127.0.0.1` and default port `8900`. Use the `keosd` command line arguments or [config.ini](../../03_keosd/10_usage.md/#launching-keosd-manually) file to specify a different address.
+
+## Before you Begin
+Make sure you meet the following requirements:
+
+* Install the currently supported version of `cleos` and `keosd`.
+[[info | Note]]
+| The `cleos` tool and `keosd` are bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will install the `cleos` and `keosd` command line tools.
+* You have access to an EOSIO blockchain and the http address and port number of a `nodeos` instance.
+
+## Reference
+See the following reference guides for command line usage and related options:
+
+* [cleos](../index.md) command
+
+## Example
+
+1. Add the `--wallet-url` option to specify the `keosd` instance
+
+```shell
+cleos --wallet-url http://keosd-host:8900 COMMAND
+```
+
+**where**
+* `--wallet-url http://keosd-host:8900` = The http address and port number of the `keosd` instance to connect to
+* COMMAND = The `cleos`command.
+
+## Summary
+In conclusion, by following these instructions you are able to connect to a specified `keosd` instance.
diff --git a/docs/02_cleos/02_how-to-guides/how-to-connect-to-a-specific-network.md b/docs/02_cleos/02_how-to-guides/how-to-connect-to-a-specific-network.md
new file mode 100644
index 00000000000..65d155d05c1
--- /dev/null
+++ b/docs/02_cleos/02_how-to-guides/how-to-connect-to-a-specific-network.md
@@ -0,0 +1,34 @@
+## Overview
+This guide provides instructions on how to connect to specifc EOSIO blockchain when using `cleos`. `Cleos` can connect to a specific node by using the `--url` optional argument, followed by the http address and port number.
+
+The examples use the `--url`optional argument to send commands to the specified blockchain.
+
+[[info | Default address:port]]
+| If no optional arguments are used (i.e. no `--url`), `cleos` attempts to connect to a local `nodeos` running at localhost or `127.0.0.1` and default port `8888`. Use the `nodeos` command line arguments or [config.ini](../../01_nodeos/02_usage/01_nodeos-configuration/#configini-location) file to specify a different address.
+
+## Before you Begin
+Make sure you meet the following requirements:
+
+* Install the currently supported version of `cleos`.
+[[info | Note]]
+| `Cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will install the `cleos` and `keosd` command line tools.
+* You have access to an EOSIO blockchain and the http afddress and port number of a `nodeos` instance.
+
+## Reference
+See the following reference guides for command line usage and related options:
+
+* [cleos](../index.md) command
+
+## Example
+
+1. Add the `-url` option to specify the `nodeos` instance
+
+```shell
+cleos -url http://nodeos-host:8888 COMMAND
+```
+**Where**
+* `-url http://nodeos-host:8888` = The http address and port number of the `nodeos` instance to connect to
+* COMMAND = The `cleos`command.
+
+## Summary
+In conclusion, by following these instructions you are able to connect to a specified `nodeos` instance.
diff --git a/docs/02_cleos/02_how-to-guides/how-to-create-a-wallet.md b/docs/02_cleos/02_how-to-guides/how-to-create-a-wallet.md
index 4973217f161..8d6b45eab7d 100644
--- a/docs/02_cleos/02_how-to-guides/how-to-create-a-wallet.md
+++ b/docs/02_cleos/02_how-to-guides/how-to-create-a-wallet.md
@@ -13,9 +13,9 @@ Make sure you meet the following requirements:
[[info | Note]]
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install `cleos`.
-* Understand what an [account](https://developers.eos.io/welcome/latest/glossary/index/#account) is and its role in the blockchain.
-* Understand [Accounts and Permissions](https://developers.eos.io/welcome/latest/protocol-guides/accounts_and_permissions) in the protocol documents.
-* Understand what a [public](https://developers.eos.io/welcome/latest/glossary/index/#public-key) and [private](https://developers.eos.io/welcome/latest/glossary/index/#private-key) key pair is.
+* Understand what an [account](https://developers.eos.io/welcome/v2.1/glossary/index/#account) is and its role in the blockchain.
+* Understand [Accounts and Permissions](https://developers.eos.io/welcome/v2.1/protocol-guides/accounts_and_permissions) in the protocol documents.
+* Understand what a [public](https://developers.eos.io/welcome/v2.1/glossary/index/#public-key) and [private](https://developers.eos.io/welcome/v2.1/glossary/index/#private-key) key pair is.
## Steps
diff --git a/docs/02_cleos/02_how-to-guides/how-to-create-an-account.md b/docs/02_cleos/02_how-to-guides/how-to-create-an-account.md
index 53908938c99..9ef26d31d5a 100644
--- a/docs/02_cleos/02_how-to-guides/how-to-create-an-account.md
+++ b/docs/02_cleos/02_how-to-guides/how-to-create-an-account.md
@@ -1,21 +1,47 @@
## Goal
+Create a new EOSIO blockchain account
## Before you begin
* Install the currently supported version of `cleos`
-* Understand the following:
- * What is an account
- * What is a public and private key pair
+[[info | Note]]
+| The cleos tool is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install the cleos tool.
+
+* Acquire functional understanding of the following:
+ * [EOSIO Accounts and Permissions](https://developers.eos.io/welcome/v2.1/protocol/accounts_and_permissions)
+ * Asymmetric cryptography (public and private keypair)
* Created an Owner and an Active key pair
-* Imported a key pair which can authorize on behalf of a creator account
+* [Import a private key](../02_how-to-guides/how-to-import-a-key.md) to the wallet which can authorize on behalf of a creator account
## Steps
+**Command**
+
```sh
-cleos create account creator name OwnerKey [ActiveKey]
+cleos create account [creator account name] [new account name][OwnerKey] [ActiveKey]
```
+Where:
+
+[creator account name] = name of the existing account that authorizes the creation of a new account
+
+[new account name] = The name of the new account account adhering to EOSIO account naming conventions
+
+[OwnerKey] = The owner permissions linked to the ownership of the account
+
+[ActiveKey] = The active permissions linked with the creator account
[[info | Recommend]]
| `ActiveKey` is optional but recommended.
+
+[[info | Note]]
+| To create a new account in the EOSIO blockchain, an existing account, also referred to as a creator account, is required to authorize the creation of a new account. For a newly created EOSIO blockchain, the default system account used to create a new account is eosio.
+
+**Example Output**
+```sh
+cleos create account eosio bob EOS87TQktA5RVse2EguhztfQVEh6XXxBmgkU8b4Y5YnGvtYAoLGNN
+executed transaction: 4d65a274de9f809f9926b74c3c54aadc0947020bcfb6dd96043d1bcd9c46604c 200 bytes 166 us
+# eosio <= eosio::newaccount {"creator":"eosio","name":"bob","owner":{"threshold":1,"keys":[{"key":"EOS87TQktA5RVse2EguhztfQVEh6X...
+warning: transaction executed locally, but may not be confirmed by the network yet ]
+```
diff --git a/docs/02_cleos/02_how-to-guides/how-to-create-key-pairs.md b/docs/02_cleos/02_how-to-guides/how-to-create-key-pairs.md
index dc0a77bca7c..9ebb6b35836 100644
--- a/docs/02_cleos/02_how-to-guides/how-to-create-key-pairs.md
+++ b/docs/02_cleos/02_how-to-guides/how-to-create-key-pairs.md
@@ -1,22 +1,50 @@
## Goal
+Create a keypair consisting of a public and a private key for signing transactions in the EOSIO blockchain.
## Before you begin
+Before you follow the steps to create a new key pair, make sure the following items are fulfilled:
+
* Install the currently supported version of `cleos`
-* Understand the following:
- * What is a public and private key pair
+[[info | Note]]
+| The cleos tool is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install the cleos tool.
+
+* Acquire functional understanding of asymmetric cryptography (public and private keypair) in the context of blockchain
## Steps
-To output the key pair to the console
+To create a keypair and print the result to the console:
+
+```sh
+cleos create key --to-console
+```
+
+**Example Output**
```sh
cleos create key --to-console
+Private key: 5KPzrqNMJdr6AX6abKg*******************************cH
+Public key: EOS4wSiQ2jbYGrqiiKCm8oWR88NYoqnmK4nNL1RCtSQeSFkGtqsNc
```
-To save the key pair to file
+
+To create a keypair and save it to a file:
```sh
cleos create key --file FILE_TO_SAVEKEY
-```
\ No newline at end of file
+```
+Where: FILE_TO_SAVEKEY = name of the file
+
+**Example Output**
+```sh
+cleos create key --file pw.txt
+saving keys to pw.txt
+```
+
+To view the saved keypair in the file:
+```sh
+cat pw.txt
+Private key: 5K7************************************************
+Public key: EOS71k3WdpLDeqeyqVRAAxwpz6TqXwDo9Brik5dQhdvvpeTKdNT59
+```
diff --git a/docs/02_cleos/02_how-to-guides/how-to-delegate-CPU-resource.md b/docs/02_cleos/02_how-to-guides/how-to-delegate-CPU-resource.md
index 5345bd83f63..c5e5b31aa61 100644
--- a/docs/02_cleos/02_how-to-guides/how-to-delegate-CPU-resource.md
+++ b/docs/02_cleos/02_how-to-guides/how-to-delegate-CPU-resource.md
@@ -13,9 +13,9 @@ Make sure you meet the following requirements:
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install `cleos`.
* Ensure the reference system contracts from [`eosio.contracts`](https://github.com/EOSIO/eosio.contracts) repository is deployed and used to manage system resources.
-* Understand what an [account](https://developers.eos.io/welcome/latest/glossary/index/#account) is and its role in the blockchain.
-* Understand [CPU bandwidth](https://developers.eos.io/welcome/latest/glossary/index/#cpu) in an EOSIO blockchain.
-* Understand [NET bandwidth](https://developers.eos.io/welcome/latest/glossary/index/#net) in an EOSIO blockchain.
+* Understand what an [account](https://developers.eos.io/welcome/v2.1/glossary/index/#account) is and its role in the blockchain.
+* Understand [CPU bandwidth](https://developers.eos.io/welcome/v2.1/glossary/index/#cpu) in an EOSIO blockchain.
+* Understand [NET bandwidth](https://developers.eos.io/welcome/v2.1/glossary/index/#net) in an EOSIO blockchain.
## Steps
diff --git a/docs/02_cleos/02_how-to-guides/how-to-delegate-net-resource.md b/docs/02_cleos/02_how-to-guides/how-to-delegate-net-resource.md
index 118c36ba13a..8de80eeb74d 100644
--- a/docs/02_cleos/02_how-to-guides/how-to-delegate-net-resource.md
+++ b/docs/02_cleos/02_how-to-guides/how-to-delegate-net-resource.md
@@ -13,9 +13,9 @@ Make sure you meet the following requirements:
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install `cleos`.
* Ensure the reference system contracts from [`eosio.contracts`](https://github.com/EOSIO/eosio.contracts) repository is deployed and used to manage system resources.
-* Understand what an [account](https://developers.eos.io/welcome/latest/glossary/index/#account) is and its role in the blockchain.
-* Understand [NET bandwidth](https://developers.eos.io/welcome/latest/glossary/index/#net) in an EOSIO blockchain.
-* Understand [CPU bandwidth](https://developers.eos.io/welcome/latest/glossary/index/#cpu) in an EOSIO blockchain.
+* Understand what an [account](https://developers.eos.io/welcome/v2.1/glossary/index/#account) is and its role in the blockchain.
+* Understand [NET bandwidth](https://developers.eos.io/welcome/v2.1/glossary/index/#net) in an EOSIO blockchain.
+* Understand [CPU bandwidth](https://developers.eos.io/welcome/v2.1/glossary/index/#cpu) in an EOSIO blockchain.
## Steps
diff --git a/docs/02_cleos/02_how-to-guides/how-to-get-account-information.md b/docs/02_cleos/02_how-to-guides/how-to-get-account-information.md
index c3dfd3b3bb2..b294afbea61 100644
--- a/docs/02_cleos/02_how-to-guides/how-to-get-account-information.md
+++ b/docs/02_cleos/02_how-to-guides/how-to-get-account-information.md
@@ -6,8 +6,11 @@ Query infomation of an EOSIO account
* Install the currently supported version of `cleos`
-* Understand the following:
- * What is an account
+[[info | Note]]
+| The cleos tool is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install the cleos tool.
+
+* Acquire functional understanding of [EOSIO Accounts and Permissions](https://developers.eos.io/welcome/v2.1/protocol/accounts_and_permissions)
+
## Steps
@@ -16,8 +19,9 @@ Execute the command below:
```sh
cleos get account ACCOUNT_NAME
```
+Where ACCOUNT_NAME = name of the existing account in the EOSIO blockchain.
-This should produce similar output as below:
+**Example Output**
```console
created: 2018-06-01T12:00:00.000
diff --git a/docs/02_cleos/02_how-to-guides/how-to-get-block-information.md b/docs/02_cleos/02_how-to-guides/how-to-get-block-information.md
index 7efd62427f6..b35ccf12e4f 100644
--- a/docs/02_cleos/02_how-to-guides/how-to-get-block-information.md
+++ b/docs/02_cleos/02_how-to-guides/how-to-get-block-information.md
@@ -12,20 +12,20 @@ Make sure to meet the following requirements:
[[info | Note]]
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install `cleos`.
-* Understand what a [block](https://developers.eos.io/welcome/latest/glossary/index/#block) is and its role in the blockchain.
-* Understand the [block lifecycle](https://developers.eos.io/welcome/latest/protocol-guides/consensus_protocol/#5-block-lifecycle) in the EOSIO consensus protocol.
+* Understand what a [block](https://developers.eos.io/welcome/v2.1/glossary/index/#block) is and its role in the blockchain.
+* Understand the [block lifecycle](https://developers.eos.io/welcome/v2.1/protocol-guides/consensus_protocol/#5-block-lifecycle) in the EOSIO consensus protocol.
## Steps
Perform the step below:
-Retrieve full information about a block:
+Retrieve full or partial information about a block:
```sh
-cleos get block
+cleos get block [--info]
```
-Where `block_number_or_id` is the specified block number or block ID.
+Where `block_number_or_id` is the specified block number or block ID and `--info` is an optional parameter to retrieve a partial subset of the block information.
Some examples are provided below:
@@ -78,3 +78,29 @@ cleos -u https://api.testnet.eos.io get block 02e1c7888a92206573ae38d00e09366c7b
"ref_block_prefix": 3493375603
}
```
+
+* Query the local chain to retrieve partial block information about block number `1`:
+
+**Example Output**
+
+```sh
+cleos get block --info 1
+```
+```json
+{
+ "block_num": 1,
+ "ref_block_num": 1,
+ "id": "0000000130d70e94e0022fd2fa035cabb9e542c34ea27f572ac90b5a7aa3d891",
+ "timestamp": "2018-03-02T12:00:00.000",
+ "producer": "",
+ "confirmed": 1,
+ "previous": "0000000000000000000000000000000000000000000000000000000000000000",
+ "transaction_mroot": "0000000000000000000000000000000000000000000000000000000000000000",
+ "action_mroot": "0000000000000000000000000000000000000000000000000000000000000000",
+ "schedule_version": 0,
+ "producer_signature": "SIG_K1_111111111111111111111111111111111111111111111111111111111111111116uk5ne",
+ "ref_block_prefix": 3526296288
+}
+```
+
+Note that the partial block information excludes the variable fields `new_producers`, `header_extensions`, `transactions`, or `block_extensions`.
diff --git a/docs/02_cleos/02_how-to-guides/how-to-link-permission.md b/docs/02_cleos/02_how-to-guides/how-to-link-permission.md
index 7fec13730bd..0ab8da650de 100644
--- a/docs/02_cleos/02_how-to-guides/how-to-link-permission.md
+++ b/docs/02_cleos/02_how-to-guides/how-to-link-permission.md
@@ -1,20 +1,43 @@
-## Goal
+## Overview
+This guide provides instructions to link a permission to a smart contract action.
-Link a permission to an action of a contract
+The example uses `cleos` to link a custom permission _customp_ in the account _alice_ to a _hi_ action deployed to the _scontract_ account so that the _alice_ account's `active` permission and _customp_ permission are authorized to call the _hi_ _action.
-## Before you begin
+## Before you Begin
+Make sure you meet the following requirements:
-* Install the currently supported version of `cleos`
+* Install the currently supported version of `cleos.`
+[[info | Note]]
+| `Cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install the `cleos` and `keosd` comand line tools.
+* You have an EOSIO account and access to the account's `active` private key.
+* You have created a custom permission. See [cleos set account permission](../03_command-reference/set/set-account-permission.md).
-* Understand the following:
- * What is an account
- * What is permission level
- * What is an action
+## Command Reference
+See the following reference guides for command line usage and related options:
-## Steps
+* [cleos set action permission](../03_command-reference/set/set-action-permission.md) command
+## link Procedure
-Link a permission level `permlvl` to the action `transfer` of contract `hodlcontract`
+The following step shows you how to link a permission:
+
+1. Run the following command to link _alices_ account permission _customp_ with the _hi_ action deployed to the _scontract_ account:
+
+```shell
+cleos set action permission alice scontract hi customp -p alice@active
+```
+
+**Where**
+* `alice` = The name of the account containing the permission to link.
+* `scontract`= The name of the account which owns the smart contract.
+* `hi` = The name of the action to link to a permission.
+* `customp` = The permission used to authorize the transaction.
+* `-p alice@active` = The permission used to authorize linking the _customp_ permission.
+
+**Example Output**
+```shell
+executed transaction: 4eb4cf3aea232d46e0e949bc273c3f0575be5bdba7b61851ab51d927cf74a838 128 bytes 141 us
+# eosio <= eosio::linkauth {"account":"alice","code":"scontract","type":"hi","requirement":"customp"}
+```
+## Summary
+In conclusion, by following these instructions you are able to link a permission to a smart contract action.
-```sh
-cleos set action permission alice hodlcontract transfer permlvl
-```
\ No newline at end of file
diff --git a/docs/02_cleos/02_how-to-guides/how-to-stake-resource.md b/docs/02_cleos/02_how-to-guides/how-to-stake-resource.md
index 6a9566f424d..9b243067d4f 100644
--- a/docs/02_cleos/02_how-to-guides/how-to-stake-resource.md
+++ b/docs/02_cleos/02_how-to-guides/how-to-stake-resource.md
@@ -1,28 +1,111 @@
-## Goal
+## Overview
-Stake resource for your account
+This how-to guide provides instructions on how to stake resources, NET and/or CPU, for your account using the `cleos` CLI tool.
## Before you begin
-* Install the currently supported version of `cleos`
+* Install the currently supported version of `cleos`.
-* Ensure the reference system contracts from `eosio.contracts` repository is deployed and used to manage system resources
+* Ensure the [reference system contracts](https://developers.eos.io/manuals/eosio.contracts/v1.9/build-and-deploy) are deployed and used to manage system resources.
* Understand the following:
- * What is an account
- * What is network bandwidth
- * What is CPU bandwidth
+ * What an [account](https://developers.eos.io/welcome/v2.1/glossary/index/#account) is.
+ * What [NET bandwidth](https://developers.eos.io/manuals/eosio.contracts/v1.9/key-concepts/net) is.
+ * What [CPU bandwidth](https://developers.eos.io/manuals/eosio.contracts/v1.9/key-concepts/cpu) is.
+ * The [`delegatebw` cleos sub-command](https://developers.eos.io/manuals/eos/v2.1/cleos/command-reference/system/system-delegatebw).
-## Steps
+## Command Reference
-Stake 0.01 SYS network bandwidth for `alice`
+See the following reference guides for command line usage and related options for the `cleos` command:
+
+* The [`delegatebw` cleos sub-command](https://developers.eos.io/manuals/eos/v2.1/cleos/command-reference/system/system-delegatebw).
+
+## Procedure
+
+The following steps show:
+
+1. [How to stake NET bandwidth.](#1-stake-net-bandwidth)
+2. [How to stake CPU bandwidth.](#2-stake-cpu-bandwidth)
+3. [How to stake NET and CPU bandwidth.](#3-stake-net-and-cpu-bandwidth)
+
+### 1. Stake NET bandwidth
+
+Run the following command to stake `0.01 SYS` of NET bandwidth for `alice` account from `bob` account:
```sh
-cleos system delegatebw alice alice "0 SYS" "0.01 SYS"
+cleos system delegatebw alice bob "0.01 SYS" "0 SYS"
+```
+
+Where:
+
+* `alice` = the account for which the NET bandwidth is staked.
+* `bob` = the account that pays the `0.01 SYS` for the NET bandwidth staked.
+* `0.01 SYS` = the amount of `SYS` tokens allocated to stake NET bandwidth.
+* `0 SYS` = the amount of `SYS` tokens allocated to stake CPU bandwidth.
+
+Example output:
+
+```console
+executed transaction: 5487afafd67bf459a20fcc2dbc5d0c2f0d1f10e33123eaaa07088046fd18e3ae 192 bytes 503 us
+# eosio <= eosio::delegatebw {"from":"bob","receiver":"alice","stake_net_quantity":"0.01 SYS","stake_cpu_quanti...
+# eosio.token <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.01 EOS","memo":"stake bandwidth"}
+# alice <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.01 SYS","memo":"stake bandwidth"}
+# eosio.stake <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.01 SYS","memo":"stake bandwidth"}
```
-Stake 0.01 SYS CPU bandwidth for `alice`:
+### 2. Stake CPU bandwidth
+
+Run the following command to stake `0.01 SYS` of CPU bandwidth for `alice` account from `bob` account:
```sh
-cleos system delegatebw alice alice "0.01 SYS" "0 SYS"
-```
\ No newline at end of file
+cleos system delegatebw alice bob "0 SYS" "0.01 SYS"
+```
+
+Where:
+
+* `alice` = the account for which the CPU bandwidth is staked.
+* `bob` = the account that pays the `0.01 SYS` for the CPU bandwidth staked.
+* `0 SYS` = the amount of `SYS` tokens allocated to stake NET bandwidth.
+* `0.01 SYS` = the amount `SYS` tokens allocated to stake CPU bandwidth.
+
+Example output:
+
+```console
+executed transaction: 5487afafd67bf459a20fcc2dbc5d0c2f0d1f10e33123eaaa07088046fd18e3ae 192 bytes 503 us
+# eosio <= eosio::delegatebw {"from":"bob","receiver":"alice","stake_net_quantity":"0.0000 SYS","stake_cpu_quanti...
+# eosio.token <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.01 EOS","memo":"stake bandwidth"}
+# alice <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.01 SYS","memo":"stake bandwidth"}
+# eosio.stake <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.01 SYS","memo":"stake bandwidth"}
+```
+
+### 3. Stake NET and CPU bandwidth
+
+Run the following command to stake `0.01 SYS` of NET and `0.02 SYS` of CPU bandwidth for `alice` account from `bob` account:
+
+```sh
+cleos system delegatebw alice bob "0.01 SYS" "0.02 SYS"
+```
+
+Where:
+
+* `alice` = the account for which the NET and CPU bandwidth is staked.
+* `bob` = the account that pays `0.01 SYS` for the NET and `0.02 SYS` for the CPU bandwidth staked.
+* `0.01 SYS` = the amount of `SYS` tokens allocated to stake NET bandwidth.
+* `0.02 SYS` = the amount of `SYS` tokens allocated to stake CPU bandwidth.
+
+Example output:
+
+```console
+executed transaction: 5487afafd67bf459a20fcc2dbc5d0c2f0d1f10e33123eaaa07088046fd18e3ae 192 bytes 503 us
+# eosio <= eosio::delegatebw {"from":"bob","receiver":"alice","stake_net_quantity":"0.01 SYS","stake_cpu_quanti...
+# eosio.token <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.01 EOS","memo":"stake bandwidth"}
+# alice <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.01 SYS","memo":"stake bandwidth"}
+# eosio.stake <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.01 SYS","memo":"stake bandwidth"}
+```
+
+[[info|An account can stake to itself]]
+| An account can stake resources to itself, that is, `bob` account can be substituted in the above examples with `alice`, provided `alice` account holds sufficient `SYS` tokens. That means `alice` account stakes resources to itself.
+
+## Summary
+
+In conclusion, the above instructions show how to stake CPU and/or NET bandwidth from one account to another or to itself.
diff --git a/docs/02_cleos/02_how-to-guides/how-to-submit-a-transaction.md b/docs/02_cleos/02_how-to-guides/how-to-submit-a-transaction.md
index 89207f1cfe0..ded2288f30a 100644
--- a/docs/02_cleos/02_how-to-guides/how-to-submit-a-transaction.md
+++ b/docs/02_cleos/02_how-to-guides/how-to-submit-a-transaction.md
@@ -1,18 +1,35 @@
-## Goal
+## Overview
-Push a transaction
+This how-to guide provides instructions on how to submit, or push, a transaction using the `cleos` CLI tool.
## Before you begin
* Install the currently supported version of `cleos`
* Understand the following:
- * What is a transaction
- * How to generate a valid transaction JSON
+ * What a [transaction](https://developers.eos.io/welcome/latest/glossary/index/#transaction) is.
+ * How to generate a valid transaction JSON.
+ * Consult [cleos push transaction](https://developers.eos.io/manuals/eos/v2.1/cleos/command-reference/push/push-transaction) reference, and pay attention to option `-d` and `-j`.
+ * Consult [push transaction](https://developers.eos.io/manuals/eos/v2.1/nodeos/plugins/chain_api_plugin/api-reference/index#operation/push_transaction) endpoint for chain api plug-in, and pay attention to the payload definition.
-## Steps
+## Command Reference
-* Create a JSON snippet contains a valid transaction such as the following:
+See the following reference guides for command line usage and related options for the `cleos` command:
+
+* The [cleos push transaction](https://developers.eos.io/manuals/eos/v2.1/cleos/command-reference/push/push-transaction) reference.
+
+## Procedure
+
+The following steps show how to:
+
+1. [Create the transaction as JSON snippet.](#1-create-the-transaction-as-json-snippet)
+2. [Send the transaction.](#2-send-the-transaction)
+
+### 1. Create the transaction as JSON snippet
+
+You can create the JSON snippet defining the transaction in two ways:
+
+* Create a JSON snippet which contains a valid transaction and uses hex format for `data` field.
```JSON
{
@@ -39,12 +56,12 @@ Push a transaction
}
```
-* You can also create a JSON snippet that uses clear text JSON for `data` field.
+* Alternatively, you can also create a JSON snippet that uses clear text JSON for `data` field.
[[info]]
-| Be aware that if a clear text `data` field is used, cleos need to fetch copies of required ABIs using `nodeos` API. That operation has a performance overhead on `nodeos`
+| Be aware that if a clear text `data` field is used, `cleos` needs to fetch the smart contract's ABI using `nodeos` API. This operation has an overall performance overhead for both `cleos` and `nodeos`. On the other hand if hex data is used in the `data` field then the ABI fetching is not executed and thus the total time to send and execute the transaction is faster.
-```JSON
+```json
{
"expiration": "2019-08-01T07:15:49",
"ref_block_num": 34881,
@@ -74,18 +91,22 @@ Push a transaction
}
```
-* Execute the following command:
+### 2. Send the transaction
+
+You can send the transaction you created as JSON snippet in two ways:
+
+* You can send the transaction stored in `TRX_FILE.json` file:
```sh
cleos push transaction TRX_FILE.json
```
-* Submit a transaction from a JSON:
+* Alternatively, you can send the transaction using the JSON content directly:
```sh
-cleos push transaction JSON
+cleos push transaction '{"expiration": "2019-08-01T07:15:49", "ref_block_num": 34881,"ref_block_prefix": 2972818865,"max_net_usage_words": 0,"max_cpu_usage_ms": 0,"delay_sec": 0,"context_free_actions": [],"actions": [{"account": "eosio.token","name": "transfer","authorization": [{"actor": "han","permission": "active"}],"data": {"from": "han","to": "eosio","quantity": "0.0001 SYS","memo": "m"}}],"transaction_extensions": [],"context_free_data": []}'
```
-
\ No newline at end of file
+## Summary
+
+In conclusion, the above instructions show how to submit, or push, a transaction using the `cleos` CLI tool.
diff --git a/docs/02_cleos/02_how-to-guides/how-to-transfer-an-eosio.token-token.md b/docs/02_cleos/02_how-to-guides/how-to-transfer-an-eosio.token-token.md
index 3abcb7f6916..71490662028 100644
--- a/docs/02_cleos/02_how-to-guides/how-to-transfer-an-eosio.token-token.md
+++ b/docs/02_cleos/02_how-to-guides/how-to-transfer-an-eosio.token-token.md
@@ -1,21 +1,47 @@
-## Goal
+## Overview
-Transfer token created by eosio.token contract
+This how-to guide provides instructions on how to transfer tokens created by `eosio.token` contract.
## Before you begin
-* Install the currently supported version of `cleos`
+* Install the currently supported version of `cleos`.
-* You are going to transfer a token created by eosio.token contract and eosio.token contract has been deployed on the network which you are connected to
+* `eosio.token` contract is deployed on the network you are connected to.
* Understand the following:
- * What is a transaction
- * Token transfers are irrevertable
+ * What a [transaction](https://developers.eos.io/welcome/v2.1/glossary/index/#transaction) is.
+ * Token transfers are irreversible.
-## Steps
+## Command Reference
-Assume you would like to transfer `0.0001 SYS` token to an account called `bob` from an account called `alice`, execute the following:
+See the following reference guides for command line usage and related options for the `cleos` command:
+
+* The [cleos transfer](https://developers.eos.io/manuals/eos/latest/cleos/command-reference/transfer) reference.
+
+## Procedure
+
+The following steps show how to transfer `0.0001 SYS` tokens to an account called `bob` from an account called `alice`:
```sh
cleos transfer alice bob "0.0001 SYS" "Hodl!" -p alice@active
```
+
+Where:
+
+* `alice` = the account that transfers the tokens.
+* `bob` = the account that receives the tokens.
+* `0.0001 SYS` = the amount of `SYS` tokens sent.
+* `Hodl!` = the message, or memo, that is accompanying the transaction.
+
+Example output:
+
+```console
+executed transaction: 800835f28659d405748f4ac0ec9e327335eae579a0d8e8ef6330e78c9ee1b67c 128 bytes 1073 us
+# eosio.token <= eosio.token::transfer {"from":"alice","to":"bob","quantity":"25.0000 SYS","memo":"m"}
+# alice <= eosio.token::transfer {"from":"alice","to":"bob","quantity":"25.0000 SYS","memo":"m"}
+# bob <= eosio.token::transfer {"from":"alice","to":"bob","quantity":"25.0000 SYS","memo":"m"}
+```
+
+## Summary
+
+In conclusion, the above instructions show how to transfer tokens created by `eosio.token` contract from one account to another.
diff --git a/docs/02_cleos/02_how-to-guides/how-to-update-account-keys.md b/docs/02_cleos/02_how-to-guides/how-to-update-account-keys.md
new file mode 100644
index 00000000000..1295d379a94
--- /dev/null
+++ b/docs/02_cleos/02_how-to-guides/how-to-update-account-keys.md
@@ -0,0 +1,93 @@
+
+## Overview
+This how-to guide provides instructions on how to update an account keys for an EOSIO blockchain account using the cleos CLI tool.
+
+The example uses `cleos` to update the keys for the **alice** account.
+
+## Before you Begin
+Make sure you meet the following requirements:
+
+* Install the currently supported version of `cleos.`
+[[info | Note]]
+| The `cleos` tool is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will install the `cleos` and `keosd` command line tools.
+* You have an EOSIO account and access to the account's private key.
+
+## Reference
+See the following reference guides for command line usage and related options:
+
+* [cleos create key](../03_command-reference/create/key.md) command
+* [cleos wallet import](../03_command-reference/wallet/import.md) command
+* [cleos set account](../03_command-reference/set/set-account.md) command
+
+## Procedure
+The following step shows how to change the keys for the `active` permissions:
+
+1. Create a new key pair for the `active` permission
+```shell
+cleos create key --to-console
+```
+**Where**
+`--to-console` = Tells the `cleos create key` command to print the private/public keys to the console.
+
+**Example Output**
+```shell
+Private key: 5KDNWQvY2seBPVUz7MiiaEDGTwACfuXu78bwZu7w2UDM9A3u3Fs
+Public key: EOS5zG7PsdtzQ9achTdRtXwHieL7yyigBFiJDRAQonqBsfKyL3XhC
+```
+
+2. Import the new private key into your wallet
+```shell
+cleos wallet import --private-key 5KDNWQvY2seBPVUz7MiiaEDGTwACfuXu78bwZu7w2UDM9A3u3Fs
+```
+**Where**
+`--private-key 5KDNWQvY2seBPVUz7MiiaEDGTwACfuXu78bwZu7w2UDM9A3u3Fs` = The private key, in WIF format, to import.
+
+**Example Output**
+```shell
+imported private key for: EOS5zG7PsdtzQ9achTdRtXwHieL7yyigBFiJDRAQonqBsfKyL3XhC
+```
+
+3. Update the `active` permission key
+```shell
+cleos set account permission alice active EOS5zG7PsdtzQ9achTdRtXwHieL7yyigBFiJDRAQonqBsfKyL3XhC -p alice@owner
+```
+**Where**
+* `alice` = The name of the account to update the key.
+* `active`= The name of the permission to update the key.
+* `EOS5zG7PsdtzQ9achTdRtXwHieL7yyigBFiJDRAQonqBsfKyL3XhC` = The new public key.
+* `-p alice@owner` = The permission used to authorize the transaction.
+
+**Example Output**
+```shell
+executed transaction: ab5752ecb017f166d56e7f4203ea02631e58f06f2e0b67103b71874f608793e3 160 bytes 231 us
+# eosio <= eosio::updateauth {"account":"alice","permission":"active","parent":"owner","auth":{"threshold":1,"keys":[{"key":"E...
+```
+
+4. Check the account
+```shell
+cleos get account alice
+```
+**Where**
+`alice` = name, the name of the account to retrieve.
+
+**Example Output**
+```shell
+permissions:
+ owner 1: 1 EOS6c5UjmyRsZSdikLbpAoMdg4V7FQwvdhep3KMxUifzmpDnoLVPe
+ active 1: 1 EOS5zG7PsdtzQ9achTdRtXwHieL7yyigBFiJDRAQonqBsfKyL3XhC
+memory:
+ quota: xxx used: 2.66 KiB
+
+net bandwidth:
+ used: xxx
+ available: xxx
+ limit: xxx
+
+cpu bandwidth:
+ used: xxx
+ available: xxx
+ limit: xxx
+```
+
+## Summary
+In conclusion, by following these instructions you are able to change the keys used by an account.
diff --git a/docs/02_cleos/02_how-to-guides/how-to-vote.md b/docs/02_cleos/02_how-to-guides/how-to-vote.md
index b3eae710857..a5d43974158 100644
--- a/docs/02_cleos/02_how-to-guides/how-to-vote.md
+++ b/docs/02_cleos/02_how-to-guides/how-to-vote.md
@@ -1,30 +1,47 @@
-## Goal
+## Overview
-Vote for a block producer
+This how-to guide provides instructions on how to vote for block producers.
## Before you begin
-* Install the currently supported version of `cleos`
+* Install the latest version of `cleos`.
-* Ensure the reference system contracts from `eosio.contracts` repository is deployed and used to manage system resources
+* Ensure the [reference system contracts](https://developers.eos.io/manuals/eosio.contracts/v1.9/build-and-deploy) are deployed and used to manage system resources.
* Understand the following:
- * What is a block producer
- * How does voting works
+ * What a [block producer](https://developers.eos.io/welcome/v2.1/protocol-guides/consensus_protocol/#11-block-producers) is.
+ * How [voting](https://developers.eos.io/manuals/eosio.contracts/v1.9/key-concepts/vote) works.
-* Unlock your wallet
+* Unlock your wallet.
-## Steps
+## Command Reference
-Assume you are going to vote for blockproducer1 and blockproducer2 from an account called `eosiotestts2`, execute the following:
+See the following reference guides for command line usage and related options for the `cleos` command:
+
+* The [cleos system voteproducer prods](https://developers.eos.io/manuals/eos/v2.1/cleos/command-reference/system/system-voteproducer-prods) reference.
+
+## Procedure
+
+The following steps show:
+
+1. How to vote for blockproducer1 and blockproducer2 from an account called `eosiotestts2`:
```sh
cleos system voteproducer prods eosiotestts2 blockproducer1 blockproducer2
```
-This should produce similar output as below:
+Where:
+
+* `eosiotestts2` = the account that votes.
+* `blockproducer1` and `blockproducer2` = the accounts receiving the votes. The number of accounts receiving the votes can vary from one to multiple. Maximum default number of block producers one account can vote for is 30.
+
+Example output:
```console
executed transaction: 2d8b58f7387aef52a1746d7a22d304bbbe0304481d7751fc4a50b619df62676d 128 bytes 374 us
# eosio <= eosio::voteproducer {"voter":"eosiotestts2","proxy":"","producers":["blockproducer1","blockproducer2"]}
```
+
+## Summary
+
+In conclusion, the above instructions show how to vote for block producers.
diff --git a/docs/02_cleos/03_command-reference/create/key.md b/docs/02_cleos/03_command-reference/create/key.md
index 81bce139358..7b875dfe0b6 100755
--- a/docs/02_cleos/03_command-reference/create/key.md
+++ b/docs/02_cleos/03_command-reference/create/key.md
@@ -1,28 +1,62 @@
-## Description
+## Command
+cleos create key [OPTIONS]
-Creates a new keypair and prints the public and private keys
+**Where**
+* [OPTIONS] = See Options in Command Usage section below. You must choose one option of `--file` or `--to-console`
-## Usage
+**Note**: The arguments and options enclosed in square brackets are optional.
-```console
-Usage: cleos create key [OPTIONS]
+## Description
+Creates a new keypair and either prints the public and private keys to the screen or to a file.
+
+## Command Usage
+The following information shows the different positionals and options you can use with the `cleos create key` command:
+
+### Positionals:
+- none
+### Options
+- `-h,--help` - Print this help message and exit
+- `--r1` - Generate a key using the R1 curve (iPhone), instead of the K1 curve (Bitcoin)
+`-f`,`--file` _TEXT_ - Name of file to write private/public key output to. (Must be set, unless "--to-console" is passed
+`--to-console` - Print private/public keys to console.
+
+## Requirements
+* Install the currently supported version of `cleos`.
+[[info | Note]]
+| The `cleos` tool is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will install the `cleos` and `keosd` command line tools.
+
+## Examples
+1. Create a new key pair and output to the screen
+```shell
+cleos create key --to-console
+```
+**Where**
+`--to-console` = Tells the `cleos create key` command to print the private/public keys to the console.
-Options:
- -h,--help Print this help message and exit
- --r1 Generate a key using the R1 curve (iPhone), instead of the K1 curve (Bitcoin)
- -f,--file TEXT Name of file to write private/public key output to. (Must be set, unless "--to-console" is passed
- --to-console Print private/public keys to console.
+**Example Output**
+```shell
+Private key: 5KDNWQvY2seBPVUz7MiiaEDGTwACfuXu78bwZu7w2UDM9A3u3Fs
+Public key: EOS5zG7PsdtzQ9achTdRtXwHieL7yyigBFiJDRAQonqBsfKyL3XhC
```
-## Command
+2. Create a new key pair and output to a file
+```shell
+cleos create key --file my_keys.txt
+```
+**Where**
+`--file` keys.txt = Tells the `cleos create key` command to output the private/public keys to afile called `my_keys.txt`.
-```sh
-cleos create key -f passwd
+**Example Output**
+```shell
+saving keys to my_keys.txt
```
-## Output
+```shell
+cat my_keys.txt
+```
-```console
-Private key: 5KCkcSxYKZfh5Cr8CCunS2PiUKzNZLhtfBjudaUnad3PDargFQo
-Public key: EOS5uHeBsURAT6bBXNtvwKtWaiDSDJSdSmc96rHVws5M1qqVCkAm6
+**Example Output**
+```shell
+Private key: 5KWcfnGao5K6WV65Zgjd1xvpugRUeKwb6oxzmwaS1tPE2Ef4qzo
+Public key: EOS7oDiBtzSHtShprGFmXm9JLnwxhcPeDyhww3tXDvVATDYtciLGG
```
diff --git a/docs/02_cleos/03_command-reference/get/account.md b/docs/02_cleos/03_command-reference/get/account.md
index 8f38ebd6c93..d185cfc9522 100755
--- a/docs/02_cleos/03_command-reference/get/account.md
+++ b/docs/02_cleos/03_command-reference/get/account.md
@@ -1,20 +1,43 @@
+
+## Command
+cleos get account [OPTIONS] name [core-symbol]
+
+**Where**
+* [OPTIONS] = See Options in Command Usage section below.
+
+**Note**: The arguments and options enclosed in square brackets are optional.
+
## Description
-Retrieves an account from the blockchain
+Retrieve an account from the blockchain
+
+## Command Usage
+The following information shows the different positionals and options you can use with the `cleos create key` command:
-## Positional Parameters
+### Positionals:
- `name` _TEXT_ - The name of the account to retrieve
-- `core-symbol` _TEXT_ - The expected core symbol of the chain you are querying
+- `core-symbol` _TEXT_ - The expected core symbol of the chain you are querying - OPTIONAL
-## Options
+### Options
+- `-h,--help` Print this help message and exit
- `-j,--json` - Output in JSON format
+## Requirements
+* Install the currently supported version of `cleos.`
+[[info | Note]]
+| The `cleos` tool is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will install the `cleos` and `keosd` command line tools.
+* You have access to an EOSIO blockchain.
+
## Examples
-### Get formatted data for user **eosio**
+1. Get formatted data for user **eosio**
-```sh
+```shell
cleos get account eosio
```
+**Where**
+`eosio` = The name of the account.
+
+**Example Output**
```console
privileged: true
permissions:
@@ -35,11 +58,13 @@ cpu bandwidth: (averaged over 3 days)
producers:
```
-### Get JSON data for user **eosio**
+2. Get JSON data for user **eosio**
```sh
cleos get account eosio --json
```
+**Example Output**
+
```json
{
"account_name": "eosio",
@@ -106,4 +131,4 @@ cleos get account eosio --json
```
## See Also
-- [Accounts and Permissions](https://developers.eos.io/welcome/latest/protocol/accounts_and_permissions) protocol document.
+- [Accounts and Permissions](https://developers.eos.io/welcome/v2.1/protocol/accounts_and_permissions) protocol document.
diff --git a/docs/02_cleos/03_command-reference/get/block.md b/docs/02_cleos/03_command-reference/get/block.md
index 2d862827561..6952d4784bf 100755
--- a/docs/02_cleos/03_command-reference/get/block.md
+++ b/docs/02_cleos/03_command-reference/get/block.md
@@ -5,8 +5,10 @@ Retrieves a full block from the blockchain
- `block` _TEXT_ - The number **or** ID of the block to retrieve
## Options
- `--header-state` - Get block header state from fork database instead
+- `--info` - Get block info from the blockchain by block num only
## Example
+### Get the full block:
```sh
cleos get block 1
@@ -37,3 +39,31 @@ This will output a block object similar to the following
"ref_block_prefix": 3526296288
}
```
+
+### Get the block info:
+
+```sh
+cleos get block --info 1
+```
+
+This will output a block info object similar to the following
+
+```json
+{
+ "block_num": 1,
+ "ref_block_num": 1,
+ "id": "0000000130d70e94e0022fd2fa035cabb9e542c34ea27f572ac90b5a7aa3d891",
+ "timestamp": "2018-03-02T12:00:00.000",
+ "producer": "",
+ "confirmed": 1,
+ "previous": "0000000000000000000000000000000000000000000000000000000000000000",
+ "transaction_mroot": "0000000000000000000000000000000000000000000000000000000000000000",
+ "action_mroot": "0000000000000000000000000000000000000000000000000000000000000000",
+ "schedule_version": 0,
+ "producer_signature": "SIG_K1_111111111111111111111111111111111111111111111111111111111111111116uk5ne",
+ "ref_block_prefix": 3526296288
+}
+```
+
+## Remarks
+The block info object has a fixed size and excludes the following fields: new_producers, header_extensions, transactions, block_extensions.
diff --git a/docs/02_cleos/03_command-reference/get/index.md b/docs/02_cleos/03_command-reference/get/index.md
index 594852b921f..ca896f9fee2 100755
--- a/docs/02_cleos/03_command-reference/get/index.md
+++ b/docs/02_cleos/03_command-reference/get/index.md
@@ -9,6 +9,7 @@ Retrieves various items and information from the blockchain
- [code](code.md) - Retrieve the code and ABI for an account
- [abi](abi.md) - Retrieve the ABI for an account
- [table](table.md) - Retrieve the contents of a database table
+- [kv_table](kv_table.md) - Retrieve the contents of a database kv_table
- [scope](scope.md) - Retrieve a list of scopes and tables owned by a contract
- [currency](currency.md) - Retrieve information related to standard currencies
- [accounts](accounts.md) - Retrieve accounts associated with a public key
diff --git a/docs/02_cleos/03_command-reference/get/kv_table.md b/docs/02_cleos/03_command-reference/get/kv_table.md
new file mode 100644
index 00000000000..b378e28c2d6
--- /dev/null
+++ b/docs/02_cleos/03_command-reference/get/kv_table.md
@@ -0,0 +1,404 @@
+## Description
+
+Retrieves the contents of a database kv_table
+
+## Positional Parameters
+`account` _TEXT_ - The account who owns the kv_table where the smart contract was deployed
+
+`table` _TEXT_ - The name of the kv_table as specified by the contract abi
+
+`index_name` _TEXT_ - The name of the kv_table index as specified by the contract abi
+
+## Options
+`-l,--limit` _UINT_ - The maximum number of rows to return
+
+`-i,--index` _TEXT_ - index value used for point query; encoded as `--encode-type`
+
+`-L,--lower` _TEXT_ - JSON representation of lower bound index value of `--key` for ranged query (defaults to first). Query result includes rows specified with `--lower`
+
+`-U,--upper` _TEXT_ - JSON representation of upper bound index value of `--key` for ranged query (defaults to last). Query result does NOT include rows specified with `--upper`
+
+`--encode-type` _TEXT_ - The encoding type of `--index`, `--lower`, `--upper`; `bytes` for hexadecimal encoded bytes; `string` for string values; `dec` for decimal encoding of (`uint[64|32|16|8]`, `int[64|32|16|8]`, `float64`); `hex` for hexadecimal encoding of (`uint[64|32|16|8]`, `int[64|32|16|8]`, `sha256`, `ripemd160`
+
+`-b,--binary` _UINT_ - Return the value as BINARY rather than using abi to interpret as JSON
+
+`-r,--reverse` - Iterate in reverse order; results are returned in reverse order
+
+`--show-payer` - Show RAM payer
+
+## Remarks
+
+ * When `--reverse` option is not set, `--upper` is optional; if `--upper` is not set, the result includes the end of the matching rows.
+ * When `--reverse` option is set, `--lower` is optional; if `--lower` is not set, the result includes the start of the matching rows.
+ * When the result returns `"more": true`, the remaining rows can be retrieved by setting `--encode_bytes` to `bytes` and `--index`, `--lower` or `--upper` (as applicable, depending on the `--reverse` option) to the value returned in `"next_key": "XYZ"`, where `XYZ` is the next index value in hex.
+ * When `--index` is used as non-unique secondary index, the result can return multiple rows.
+
+## Examples
+
+Point query to return the row that matches eosio name key `boba` from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `primarykey`:
+```sh
+cleos get kv_table --encode-type name -i boba contr_acct kvtable primarykey -b
+```
+```json
+{
+ "rows": [
+ "000000000000600e3d010000000000000004626f6261000000"
+ ],
+ "more": false,
+ "next_key": ""
+}
+```
+
+Point query to return the row that matches decimal key `1` from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `foo` (note that multiple rows could have resulted since `foo` is a non-unique secondary index):
+```sh
+cleos get kv_table --encode-type dec -i 1 contr_acct kvtable foo
+```
+```json
+{
+ "rows": [
+ "000000000000600e3d010000000000000004626f6261"
+ ],
+ "more": false,
+ "next_key": ""
+}
+```
+
+Range query to return all rows starting from eosio name key `bobd` up to `bobh` (exclusive) from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `primarykey`:
+```sh
+cleos get kv_table --encode-type name -L bobd -U bobh contr_acct kvtable primarykey -b
+```
+```json
+{
+ "rows": [
+ "000000000000900e3d040000000000000004626f6264000000",
+ "000000000000a00e3d050000000000000004626f6265000000",
+ "000000000000b00e3d060000000000000004626f6266000000",
+ "000000000000c00e3d070000000000000004626f6267000000"
+ ],
+ "more": false,
+ "next_key": ""
+}
+```
+
+Range query to return all rows (in reverse order) starting from eosio name key `bobh` down to `bobd` (exclusive) from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `primarykey`:
+```sh
+cleos get kv_table --encode-type name -L bobd -U bobh contr_acct kvtable primarykey -b -r
+```
+```json
+{
+ "rows": [
+ "000000000000d00e3d080000000000000004626f6268000000",
+ "000000000000c00e3d070000000000000004626f6267000000",
+ "000000000000b00e3d060000000000000004626f6266000000",
+ "000000000000a00e3d050000000000000004626f6265000000"
+ ],
+ "more": false,
+ "next_key": ""
+}
+```
+
+Range query to return all rows starting from eosio name key `bobg` up to the last row key from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `primarykey`:
+```sh
+cleos get kv_table --encode-type name -L bobg contr_acct kvtable primarykey -b
+```
+```json
+{
+ "rows": [
+ "000000000000c00e3d070000000000000004626f6267000000",
+ "000000000000d00e3d080000000000000004626f6268000000",
+ "000000000000e00e3d090000000000000004626f6269000000",
+ "000000000000f00e3d0a0000000000000004626f626a000000"
+ ],
+ "more": false,
+ "next_key": ""
+}
+```
+
+Range query to return all rows (in reverse order) starting from the last row key down to eosio name key `bobg` (exclusive) from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `primarykey`:
+```sh
+cleos get kv_table --encode-type name -L bobg contr_acct kvtable primarykey -b -r
+```
+```json
+{
+ "rows": [
+ "000000000000f00e3d0a0000000000000004626f626a000000",
+ "000000000000e00e3d090000000000000004626f6269000000",
+ "000000000000d00e3d080000000000000004626f6268000000"
+ ],
+ "more": false,
+ "next_key": ""
+}
+```
+
+Range query to return all rows starting from the first row key up to eosio name key `bobe` (exclusive) from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `primarykey`:
+```sh
+cleos get kv_table --encode-type name -U bobe contr_acct kvtable primarykey -b
+```
+```json
+{
+ "rows": [
+ "000000000000600e3d010000000000000004626f6261000000",
+ "000000000000700e3d020000000000000004626f6262000000",
+ "000000000000800e3d030000000000000004626f6263000000",
+ "000000000000900e3d040000000000000004626f6264000000"
+ ],
+ "more": false,
+ "next_key": ""
+}
+```
+
+Range query to return all rows (in reverse order) starting from eosio name key `bobe` down to the first row key from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `primarykey`:
+```sh
+cleos get kv_table --encode-type name -U bobe contr_acct kvtable primarykey -b -r
+```
+```json
+{
+ "rows": [
+ "000000000000a00e3d050000000000000004626f6265000000",
+ "000000000000900e3d040000000000000004626f6264000000",
+ "000000000000800e3d030000000000000004626f6263000000",
+ "000000000000700e3d020000000000000004626f6262000000",
+ "000000000000600e3d010000000000000004626f6261000000"
+ ],
+ "more": false,
+ "next_key": ""
+}
+```
+
+Range query to return all rows (in reverse order, limit results to 2 rows) starting from eosio name key `bobe` down to the first row key from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `primarykey`:
+```sh
+cleos get kv_table --encode-type name -U bobe contr_acct kvtable primarykey -b -r -l 2
+```
+```json
+{
+ "rows": [
+ "000000000000a00e3d050000000000000004626f6265000000",
+ "000000000000900e3d040000000000000004626f6264000000"
+ ],
+ "more": true,
+ "next_key": "3D0E800000000000"
+}
+```
+
+Continue previous range query to return all rows (in reverse order, limit results to 2 rows) starting from hex key `3D0E800000000000` (returned in `next_key` field from previous result) down to the first row key from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `primarykey`:
+```sh
+cleos get kv_table --encode-type bytes -U 3D0E800000000000 contr_acct kvtable primarykey -b -r -l 2
+```
+```json
+{
+ "rows": [
+ "000000000000800e3d030000000000000004626f6263000000",
+ "000000000000700e3d020000000000000004626f6262000000"
+ ],
+ "more": true,
+ "next_key": "3D0E600000000000"
+}
+```
+
+Continue previous range query to return all rows (in reverse order, limit results to 2 rows) starting from hex key `3D0E600000000000` (returned in `next_key` field from previous result) down to the first row key from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `primarykey`:
+```sh
+cleos get kv_table --encode-type bytes -U 3D0E600000000000 contr_acct kvtable primarykey -b -r -l 2
+```
+```json
+{
+ "rows": [
+ "000000000000600e3d010000000000000004626f6261000000"
+ ],
+ "more": false,
+ "next_key": ""
+}
+```
+
+Range query to return all rows starting from decimal key `0` up to `3` (exclusive) from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `foo` (note that key `0` does not exist, so it starts from key `1`):
+```sh
+cleos get kv_table --encode-type dec -L 0 -U 3 contr_acct kvtable foo -b
+```
+```json
+{
+ "rows": [
+ "000000000000600e3d010000000000000004626f6261",
+ "000000000000700e3d020000000000000004626f6262"
+ ],
+ "more": false,
+ "next_key": ""
+}
+```
+
+Range query to return all rows starting from decimal key `6` up to the last row key from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `foo`:
+```sh
+cleos get kv_table --encode-type dec -L 6 contr_acct kvtable foo -b
+```
+```json
+{
+ "rows": [
+ "000000000000b00e3d060000000000000004626f6266",
+ "000000000000c00e3d070000000000000004626f6267",
+ "000000000000d00e3d080000000000000004626f6268",
+ "000000000000e00e3d090000000000000004626f6269",
+ "000000000000f00e3d0a0000000000000004626f626a"
+ ],
+ "more": false,
+ "next_key": ""
+}
+```
+
+Range query to return all rows (limit results to 2 rows) starting from decimal key `6` up to the last row key from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `foo`:
+```sh
+cleos get kv_table --encode-type dec -L 6 contr_acct kvtable foo -b -l 2
+```
+```json
+{
+ "rows": [
+ "000000000000b00e3d060000000000000004626f6266",
+ "000000000000c00e3d070000000000000004626f6267"
+ ],
+ "more": true,
+ "next_key": "0000000000000008"
+}
+```
+
+Continue previous range query to return all rows (limit results to 2 rows) starting from hex key `0000000000000008` (returned in `next_key` field from previous result, which is also hex for decimal key `8`) up to the last row key from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `foo`:
+```sh
+cleos get kv_table --encode-type bytes -L 0000000000000008 contr_acct kvtable foo -b -l 2
+```
+```json
+{
+ "rows": [
+ "000000000000d00e3d080000000000000004626f6268",
+ "000000000000e00e3d090000000000000004626f6269"
+ ],
+ "more": true,
+ "next_key": "000000000000000A"
+}
+```
+
+Continue previous range query to return all rows (limit results to 2 rows) starting from hex key `000000000000000A` (returned in `next_key` field from previous result, which is also hex for decimal key `10`) up to the last row key from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `foo`:
+```sh
+cleos get kv_table --encode-type bytes -L 000000000000000A contr_acct kvtable foo -b -l 2
+```
+```json
+{
+ "rows": [
+ "000000000000f00e3d0a0000000000000004626f626a"
+ ],
+ "more": false,
+ "next_key": ""
+}
+```
+
+Range query to return all rows (in reverse order) starting from hex key `4` down to `2` (exclusive) from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `foo` (note that hex keys are not correctly specified, or decimal type should be used instead):
+```sh
+cleos get kv_table --encode-type bytes -L 2 -U 4 contr_acct kvtable foo -b -r
+```
+```console
+Error 3060003: Contract Table Query Exception
+Most likely, the given table doesn't exist in the blockchain.
+Error Details:
+Invalid index type/encode_type/Index_value: uint64/bytes/{v}
+```
+
+Range query to return all rows (in reverse order) starting from decimal key `4` down to `2` (exclusive) from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `foo`:
+```sh
+cleos get kv_table --encode-type dec -L 2 -U 4 contr_acct kvtable foo -b -r
+```
+```json
+{
+ "rows": [
+ "000000000000900e3d040000000000000004626f6264",
+ "000000000000800e3d030000000000000004626f6263"
+ ],
+ "more": false,
+ "next_key": ""
+}
+```
+
+Range query to return all rows (in reverse order) starting from hex key `0000000000000004` down to `0000000000000002` (exclusive) from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `foo`
+```sh
+cleos get kv_table --encode-type bytes -L 0000000000000002 -U 0000000000000004 contr_acct kvtable foo -b -r
+```
+```json
+{
+ "rows": [
+ "000000000000900e3d040000000000000004626f6264",
+ "000000000000800e3d030000000000000004626f6263"
+ ],
+ "more": false,
+ "next_key": ""
+}
+```
+
+Range query to return all rows starting from string key `boba` up to `bobe` (exclusive) from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `foo` (note that `--lower` and `--upper` values have correct `string` type, but the incorrect index `foo` was used):
+```sh
+cleos get kv_table --encode-type string -L boba -U bobe contr_acct kvtable foo -b
+```
+```json
+{
+ "rows": [],
+ "more": false,
+ "next_key": ""
+}
+```
+
+Range query to return all rows starting from string key `boba` up to `bobe` (exclusive) from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `bar`:
+```sh
+cleos get kv_table --encode-type string -L boba -U bobe contr_acct kvtable bar -b
+```
+```json
+{
+ "rows": [
+ "0186f263c540000000addd235fd05780003d0e60000000",
+ "0186f263c540000000addd235fd05780003d0e70000000",
+ "0186f263c540000000addd235fd05780003d0e80000000",
+ "0186f263c540000000addd235fd05780003d0e90000000"
+ ],
+ "more": false,
+ "next_key": ""
+}
+```
+
+Range query to return all rows (in reverse order) starting from string key `bobe` down to `boba` (exclusive) from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `bar`:
+```sh
+cleos get kv_table --encode-type string -L boba -U bobe contr_acct kvtable bar -b -r
+```
+```json
+{
+ "rows": [
+ "0186f263c540000000addd235fd05780003d0ea0000000",
+ "0186f263c540000000addd235fd05780003d0e90000000",
+ "0186f263c540000000addd235fd05780003d0e80000000",
+ "0186f263c540000000addd235fd05780003d0e70000000"
+ ],
+ "more": false,
+ "next_key": ""
+}
+```
+
+Range query to return all rows (in reverse order, limit results to 2 rows) starting from string key `bobe` down to `boba` (exclusive) from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `bar`:
+```sh
+cleos get kv_table --encode-type string -L boba -U bobe contr_acct kvtable bar -b -r -l 2
+```
+```json
+{
+ "rows": [
+ "0186f263c540000000addd235fd05780003d0ea0000000",
+ "0186f263c540000000addd235fd05780003d0e90000000"
+ ],
+ "more": true,
+ "next_key": "626F62630000"
+}
+```
+
+Continue previous range query to return all rows (in reverse order, limit results to 2 rows) starting from hex key `626F62630000` (returned in `next_key` field from previous result, which is also hex for string `bobc`) down to hex key `626F62610000` (hex for string `boba`) (exclusive) from kv_table named `kvtable` owned by `contr_acct` account using kv_table index `bar`:
+```sh
+cleos get kv_table --encode-type bytes -L 626F62610000 -U 626F62630000 contr_acct kvtable bar -b -r -l 2
+```
+```json
+{
+ "rows": [
+ "0186f263c540000000addd235fd05780003d0e80000000",
+ "0186f263c540000000addd235fd05780003d0e70000000"
+ ],
+ "more": false,
+ "next_key": ""
+}
+```
diff --git a/docs/02_cleos/03_command-reference/index.md b/docs/02_cleos/03_command-reference/index.md
index ee3eb8ac691..d083920f2aa 100644
--- a/docs/02_cleos/03_command-reference/index.md
+++ b/docs/02_cleos/03_command-reference/index.md
@@ -4,6 +4,7 @@ Documentation for all `cleos` main commands
- [version](version) - Retrieve version information
- [create](create) - Create various items, on and off the blockchain
- [convert](convert) - Pack and unpack transactions
+- [validate](validate) - Validate transactions
- [get](get) - Retrieve various items and information from the blockchain
- [set](set) - Set or update blockchain state
- [transfer](transfer.md) - Transfer tokens from account to account
diff --git a/docs/02_cleos/03_command-reference/net/connect.md b/docs/02_cleos/03_command-reference/net/connect.md
index 682b5923f4d..be0b2af0b3b 100755
--- a/docs/02_cleos/03_command-reference/net/connect.md
+++ b/docs/02_cleos/03_command-reference/net/connect.md
@@ -1,17 +1,56 @@
+## Command
+```sh
+cleos net connect [OPTIONS] host
+```
+
+**Where:**
+* [OPTIONS] = See **Options** in the [**Command Usage**](command-usage) section below.
+* host = The hostname:port to connect to
+
+**Note:** The arguments and options enclosed in square brackets are optional.
+
## Description
-Start a new connection to a peer
+Start a new connection to a specified peer. A node operator can use this command to instruct a node to connect to another peer without restarting the node.
+
+## Command Usage
+The following information shows the different positionals and options you can use with the `cleos net connect` command:
+
+### Positionals
+* `host` _TEXT_ REQUIRED - The hostname:port to connect to
+
+### Options
+* `-h,--help` - Print this help message and exit
+
+## Requirements
+Make sure you meet the following requirements:
-**Command**
+* Install the currently supported version of `cleos`.
+[[info | Note]]
+| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../../00_install/index.md) will also install the `cleos` and `keosd` command line tools.
+* You have access to a producing node instance with the [`net_api_plugin`](../../../01_nodeos/03_plugins/net_api_plugin/index.md) loaded.
+## Examples
+The following examples demonstrate how to use the `cleos net connect` command:
+
+* Instruct default local node (listening at default http address `http://127.0.0.1:8888`) to connect to peer node listening at p2p address `localhost:9002`:
```sh
-cleos net connect
+cleos net connect localhost:9002
+```
+**Output:**
+```console
+"added connection"
```
-**Output**
-
+* Instruct local node listening at http address `http://127.0.0.1:8001` to connect to peer node listening at p2p address `localhost:9002`:
+```sh
+cleos -u http://127.0.0.1:8001 net connect localhost:9002
+```
+**Output:**
```console
-Usage: cleos net connect host
+"added connection"
+```
-Positionals:
- host TEXT The hostname:port to connect to.
+**Note:** If any of the above commands are re-executed, `cleos` returns the following message as expected:
+```console
+"already connected"
```
diff --git a/docs/02_cleos/03_command-reference/net/disconnect.md b/docs/02_cleos/03_command-reference/net/disconnect.md
index 15eafd9ba6a..29c30399610 100755
--- a/docs/02_cleos/03_command-reference/net/disconnect.md
+++ b/docs/02_cleos/03_command-reference/net/disconnect.md
@@ -1,17 +1,56 @@
+## Command
+```sh
+cleos net disconnect [OPTIONS] host
+```
+
+**Where:**
+* [OPTIONS] = See **Options** in the [**Command Usage**](command-usage) section below.
+* host = The hostname:port to disconnect from
+
+**Note:** The arguments and options enclosed in square brackets are optional.
+
## Description
-close an existing connection
+Close an existing connection to a specified peer. A node operator can use this command to instruct a node to disconnect from another peer without restarting the node.
+
+## Command Usage
+The following information shows the different positionals and options you can use with the `cleos net disconnect` command:
+
+### Positionals
+* `host` _TEXT_ REQUIRED - The hostname:port to disconnect from
+
+### Options
+* `-h,--help` - Print this help message and exit
+
+## Requirements
+Make sure you meet the following requirements:
-**Command**
+* Install the currently supported version of `cleos`.
+[[info | Note]]
+| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../../00_install/index.md) will also install the `cleos` and `keosd` command line tools.
+* You have access to a producing node instance with the [`net_api_plugin`](../../../01_nodeos/03_plugins/net_api_plugin/index.md) loaded.
+## Examples
+The following examples demonstrate how to use the `cleos net disconnect` command:
+
+* Instruct default local node (listening at default http address `http://127.0.0.1:8888`) to disconnect from peer node listening at p2p address `localhost:9002`:
```sh
-cleos net disconnect
+cleos net disconnect localhost:9002
+```
+**Output:**
+```console
+"connection removed"
```
-**Output**
-
+* Instruct local node listening at http address `http://127.0.0.1:8001` to disconnect from peer node listening at p2p address `localhost:9002`:
+```sh
+cleos -u http://127.0.0.1:8001 net disconnect localhost:9002
+```
+**Output:**
```console
-Usage: cleos net disconnect host
+"connection removed"
+```
-Positionals:
- host TEXT The hostname:port to disconnect from.
+**Note:** If any of the above commands are re-executed, `cleos` returns the following message as expected:
+```console
+"no known connection for host"
```
diff --git a/docs/02_cleos/03_command-reference/net/peers.md b/docs/02_cleos/03_command-reference/net/peers.md
index 4389d5b9514..2814731c758 100755
--- a/docs/02_cleos/03_command-reference/net/peers.md
+++ b/docs/02_cleos/03_command-reference/net/peers.md
@@ -1,16 +1,112 @@
+## Command
+```sh
+cleos net peers [OPTIONS]
+```
+
+**Where:**
+* [OPTIONS] = See **Options** in the [**Command Usage**](command-usage) section below.
+
+**Note:** The arguments and options enclosed in square brackets are optional.
+
## Description
-status of all existing peers
+Returns a list with the status of all peer connections. This command allows a node operator to check the status of a node's peer connections.
+
+## Command Usage
+The following information shows the different positionals and options you can use with the `cleos net peers` command:
-**Command**
+### Positionals
+* `host` _TEXT_ REQUIRED - The hostname:port to disconnect from
+
+### Options
+* `-h,--help` - Print this help message and exit
+
+## Requirements
+Make sure you meet the following requirements:
+
+* Install the currently supported version of `cleos`.
+[[info | Note]]
+| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../../00_install/index.md) will also install the `cleos` and `keosd` command line tools.
+* You have access to a producing node instance with the [`net_api_plugin`](../../../01_nodeos/03_plugins/net_api_plugin/index.md) loaded.
+
+## Examples
+The following examples demonstrate how to use the `cleos net peers` command:
+
+* List the status of all peer connections for a local node listening at http address `http://127.0.0.1:8001`:
```sh
-cleos net status
+cleos -u http://127.0.0.1:8001 net peers
```
-**Output**
+**Output:**
+```json
+[{
+ "peer": "",
+ "connecting": false,
+ "syncing": false,
+ "last_handshake": {
+ "network_version": 1210,
+ "chain_id": "60fb0eb4742886af8a0e147f4af6fd363e8e8d8f18bdf73a10ee0134fec1c551",
+ "node_id": "58ed23173cd4ed89ae90c2e65f5c29bb51e233e78d730d72220b6d84543bfc08",
+ "key": "EOS1111111111111111111111111111111114T1Anm",
+ "time": "1621013128445696000",
+ "token": "0000000000000000000000000000000000000000000000000000000000000000",
+ "sig": "SIG_K1_111111111111111111111111111111111111111111111111111111111111111116uk5ne",
+ "p2p_address": "127.0.0.1:9005 - 58ed231",
+ "last_irreversible_block_num": 127,
+ "last_irreversible_block_id": "0000007f97323fae098048ae41f22a99238afc5db56cad17f50304919d21e1c2",
+ "head_num": 128,
+ "head_id": "0000008072eb0fc043770e44a5db5dedfbd86db9aa5c41b28618f1b9343c2d22",
+ "os": "osx",
+ "agent": "EOS Test Agent",
+ "generation": 4
+ }
+ },{
+ "peer": "",
+ "connecting": false,
+ "syncing": false,
+ "last_handshake": {
+ "network_version": 1210,
+ "chain_id": "60fb0eb4742886af8a0e147f4af6fd363e8e8d8f18bdf73a10ee0134fec1c551",
+ "node_id": "2101bd8d770e8eabb3e69cb981db4350b494a04cd5b7a7cea0cd3070aa722306",
+ "key": "EOS1111111111111111111111111111111114T1Anm",
+ "time": "1621013129884873000",
+ "token": "0000000000000000000000000000000000000000000000000000000000000000",
+ "sig": "SIG_K1_111111111111111111111111111111111111111111111111111111111111111116uk5ne",
+ "p2p_address": "127.0.0.1:9017 - 2101bd8",
+ "last_irreversible_block_num": 129,
+ "last_irreversible_block_id": "0000008117074454dbaa7e8662c6f3d6918e776cc063c45f52b37bdc945ddc5d",
+ "head_num": 130,
+ "head_id": "0000008248cc3498b4bbf14a183711d9a73a36517a8069367a343bd4060fed14",
+ "os": "osx",
+ "agent": "EOS Test Agent",
+ "generation": 3
+ }
+ },{
-```console
-Usage: cleos net status host
+ ...
-Positionals:
- host TEXT The hostname:port to query status of connection
+ },{
+ "peer": "",
+ "connecting": false,
+ "syncing": false,
+ "last_handshake": {
+ "network_version": 1210,
+ "chain_id": "60fb0eb4742886af8a0e147f4af6fd363e8e8d8f18bdf73a10ee0134fec1c551",
+ "node_id": "d9eb85085d09581521d0ec53b87a9657d0176c74fdf8657c56b09a91b3821c6f",
+ "key": "EOS1111111111111111111111111111111114T1Anm",
+ "time": "1621013127894327000",
+ "token": "0000000000000000000000000000000000000000000000000000000000000000",
+ "sig": "SIG_K1_111111111111111111111111111111111111111111111111111111111111111116uk5ne",
+ "p2p_address": "127.0.0.1:9002 - d9eb850",
+ "last_irreversible_block_num": 125,
+ "last_irreversible_block_id": "0000007d9a3b9cf6a61776ba1bbce226754aefcad664338d2acb5be34cc53a5b",
+ "head_num": 126,
+ "head_id": "0000007eccafd4f32a437b5fd8b111b326e2da8d0bcb832036984841b81ab64e",
+ "os": "osx",
+ "agent": "EOS Test Agent",
+ "generation": 4
+ }
+ }
+]
```
+
+**Note:** The `last_handshake` field contains the chain state of each connected peer as of the last handshake message with the node. For more information read the [Handshake Message](https://developers.eos.io/welcome/latest/protocol/network_peer_protocol#421-handshake-message) in the *Network Peer Protocol* document.
diff --git a/docs/02_cleos/03_command-reference/net/status.md b/docs/02_cleos/03_command-reference/net/status.md
index 318e21ce35b..f8f45265ecb 100755
--- a/docs/02_cleos/03_command-reference/net/status.md
+++ b/docs/02_cleos/03_command-reference/net/status.md
@@ -1,31 +1,66 @@
+## Command
+```sh
+cleos net status [OPTIONS] host
+```
+
+**Where:**
+* [OPTIONS] = See **Options** in the [**Command Usage**](command-usage) section below.
+* host = The hostname:port to query status of connection
+
+**Note:** The arguments and options enclosed in square brackets are optional.
+
## Description
-status of existing connection
+Returns the status of a connected peer. This command allows a node operator to check the status of a node's connected peer.
-**Command**
+## Command Usage
+The following information shows the different positionals and options you can use with the `cleos net status` command:
-```sh
-cleos net status
-```
-**Output**
+### Positionals
+* `host` _TEXT_ REQUIRED - The hostname:port to query status of connection
-```console
-Usage: cleos net status host
+### Options
+* `-h,--help` - Print this help message and exit
-Positionals:
- host TEXT The hostname:port to query status of connection
-```
+## Requirements
+Make sure you meet the following requirements:
+
+* Install the currently supported version of `cleos`.
+[[info | Note]]
+| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../../00_install/index.md) will also install the `cleos` and `keosd` command line tools.
+* You have access to a producing node instance with the [`net_api_plugin`](../../../01_nodeos/03_plugins/net_api_plugin/index.md) loaded.
-Given, a valid, existing `hostname:port` parameter the above command returns a json response looking similar to the one below:
+## Examples
+The following examples demonstrate how to use the `cleos net status` command:
+* List the status of a connected peer listening at p2p address `localhost:9001` for a local node listening at http address `http://127.0.0.1:8002`:
+
+```sh
+cleos -u http://127.0.0.1:8002 net status localhost:9001
```
+**Output:**
+```json
{
- "peer": "hostname:port",
- "connecting": false/true,
- "syncing": false/true,
+ "peer": "localhost:9001",
+ "connecting": false,
+ "syncing": false,
"last_handshake": {
- ...
+ "network_version": 1210,
+ "chain_id": "60fb0eb4742886af8a0e147f4af6fd363e8e8d8f18bdf73a10ee0134fec1c551",
+ "node_id": "7432b032b50a5a3b04a220c48d75f12e5a089405dfee578c3e5b4cf46865e86e",
+ "key": "EOS1111111111111111111111111111111114T1Anm",
+ "time": "1620935866018960000",
+ "token": "0000000000000000000000000000000000000000000000000000000000000000",
+ "sig": "SIG_K1_111111111111111111111111111111111111111111111111111111111111111116uk5ne",
+ "p2p_address": "127.0.0.1:9001 - 7432b03",
+ "last_irreversible_block_num": 184,
+ "last_irreversible_block_id": "000000b899bd9462ac4697b5d265e47ef5d88d5a66a24a1c2d37de7974fe32f5",
+ "head_num": 185,
+ "head_id": "000000b9f79e2394a48738fb3c8c87dac944094648c23818427e1d44375b6034",
+ "os": "osx",
+ "agent": "EOS Test Agent",
+ "generation": 1
}
}
```
-The `last_handshake` structure is explained in detail in the [Network Peer Protocol](https://developers.eos.io/welcome/latest/protocol/network_peer_protocol#421-handshake-message) documentation section.
\ No newline at end of file
+**Note:** The `last_handshake` field contains the chain state of the specified peer as of the last handshake message with the node. For more information read the [Handshake Message](https://developers.eos.io/welcome/latest/protocol/network_peer_protocol#421-handshake-message) in the *Network Peer Protocol* document.
diff --git a/docs/02_cleos/03_command-reference/push/push-action.md b/docs/02_cleos/03_command-reference/push/push-action.md
index 82e8f657274..fecadad191a 100755
--- a/docs/02_cleos/03_command-reference/push/push-action.md
+++ b/docs/02_cleos/03_command-reference/push/push-action.md
@@ -8,8 +8,6 @@ Push a transaction with a single action
`data` _Type: Text_ - The arguments to the contract
-**Output**
-
## Options
` -h,--help` - Print this help message and exit
@@ -31,3 +29,72 @@ Push a transaction with a single action
`--max-net-usage` _UINT_ - set an upper limit on the net usage budget, in bytes, for the transaction (defaults to 0 which means no limit)
`--delay-sec` _UINT_ - set the delay_sec seconds, defaults to 0s
+
+## Output
+
+For actions that return a value `cleos` has a line which is prefixed with `=>`.
+
+Let's consider for exemplification the three actions defined below. The first two are `rstring` and `ruint`, which return the value passed as input parameter to them, and the third one is `rtmp` returning a default `tmp` object.
+
+```c++
+struct tmp {
+ uint32_t id = 1;
+ std::vector list{ 1, 2 };
+};
+
+[[eosio::action]]
+std::string rstring(const std::string & str) { return str; }
+
+[[eosio::action]]
+uint16_t ruint(uint16_t i) { return i; }
+
+[[eosio::action]]
+tmp rtmp() { return tmp{}; }
+```
+
+The `cleos` commands and their respective outputs are.
+
+```shell
+> cleos push action eosio rstring '{"str":null}' -p eosio@active
+
+executed transaction: 1e72a3ef1fa01a9c90b870fe86bf31413c6a2f40a2722ca72d9dd707f58851af 96 bytes 116 us
+# eosio <= eosio::rstring {"str":""}
+=> return value: ""
+
+> cleos push action eosio rstring '{"str":"test"}' -p eosio@active
+
+executed transaction: 2484ba021683bb3c6daaabe291ba291e2689d1be899a293d0a09cc68cf0967fb 96 bytes 116 us
+# eosio <= eosio::rstring {"str":"test"}
+=> return value: "test"
+
+> cleos push action eosio ruint '{"i":42}' -p eosio@active
+
+executed transaction: 12c51fd27fad9bb0fa959037a72093ad0b168f5846e916a0e9a295c8416bdf9f 96 bytes 138 us
+# eosio <= eosio::ruint {"i":42}
+=> return value: 42
+```
+
+The `rtmp` action output, returning a default `tmp` object, looks like this:
+
+```shell
+> cleos push action eosio rtmp '{}' -p eosio@active
+
+executed transaction: 42386687d94695d77d67cf901cf8d1a4f83ac9f89382f0b01f3fb51267cc21cd 96 bytes 110 us
+# eosio <= eosio::rtmp ""
+=> return value: {"id":1,"list":[1,2]}
+```
+
+When it is not possible to decode the return value, for example when ABI doesn’t contain information about an action return value, output will look like this:
+
+```shell
+=> return value (hex): 1400000001000770656e64696e6700000000
+```
+
+If the length of the return value string is more than 100 chars the string will be truncated to the first 100 chars and three dots `...` will be added at the end. It's similar to what cleos does to action parameters output.
+
+```shell
+> cleos push action eosio rstring '{"str":"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq"}' -p eosio@active
+executed transaction: 9fb35c72dbccadb4ff7b72a3a046543fbe2ae36eea70265f2b8356e8192c3f0e 248 bytes 176 us
+# eosio <= eosio::rstring {"str":"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq...
+=> return value: "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq...
+```
diff --git a/docs/02_cleos/03_command-reference/set/set-account-permission.md b/docs/02_cleos/03_command-reference/set/set-account-permission.md
new file mode 100755
index 00000000000..2a2c8bf5593
--- /dev/null
+++ b/docs/02_cleos/03_command-reference/set/set-account-permission.md
@@ -0,0 +1,108 @@
+## Command
+cleos set account permission [OPTIONS] account permission [authority] [parent]
+
+**Where**
+* [OPTIONS] = See Options in Command Usage section below.
+* account = The name of the account you want to set.
+* permission = The name of the permission you want to set.
+* authority = May be a public key, JSON string or filename defining the authority.
+* parent = The parent of this permission, defaults to `active`.
+
+**Note**: The arguments and options enclosed in square brackets are optional.
+
+## Description
+Set or update blockchain account state. Can be used to set parameters dealing with account permissions.
+
+## Command Usage
+The following information shows the different positionals and options you can use with the `cleos set account` command:
+
+### Positionals:
+- `account` _TEXT_ REQUIRED The account to set/delete a permission authority for
+- `permission` _TEXT_ REQUIRED The permission name to set/delete an authority for
+- `authority` _TEXT_ [delete] NULL, [create/update] public key, JSON string or filename defining the authority, [code] contract name
+- `parent` _TEXT_ [create] The permission name of this parents permission, defaults to 'active'
+
+### Options:
+- `-h,--help` Print this help message and exit
+- `--add-code` [code] Add 'eosio.code' permission to specified permission authority
+- `--remove-code` [code] Remove 'eosio.code' permission from specified permission authority
+- `-x`,`--expiration` Set the time in seconds before a transaction expires, defaults to 30s
+- `-f`,`--force-unique` Force the transaction to be unique. this will consume extra bandwidth and remove any protections against accidently issuing the same transaction multiple times
+- `-s`,`--skip-sign` Specify if unlocked wallet keys should be used to sign transaction
+- `-j`,`--json` Print result as json
+- `--json-file` _TEXT_ Save result in json format into a file
+- `-d`,`--dont-broadcast` Don't broadcast transaction to the network (just print to stdout)
+- `--return-packed` Used in conjunction with --dont-broadcast to get the packed transaction
+- `-r`,`--ref-block` _TEXT_ Set the reference block num or block id used for TAPOS (Transaction as Proof-of-Stake)
+- `--use-old-rpc` Use old RPC push_transaction, rather than new RPC send_transaction
+- `-p`,`--permission` _TEXT_ An account and permission level to authorize, as in 'account@permission' (defaults to 'account@active')
+- `--max-cpu-usage-ms` _UINT_ Set an upper limit on the milliseconds of cpu usage budget, for the execution of the transaction (defaults to 0 which means no limit)
+- `--max-net-usage` _UINT_ Set an upper limit on the net usage budget, in bytes, for the transaction (defaults to 0 which means no limit)
+- `--delay-sec` _UINT_ Set the delay_sec seconds, defaults to 0s
+
+## Requirements
+* Install the currently supported version of `cleos`.
+[[info | Note]]
+| `Cleos` is bundled with the EOSIO software. [Installing EOSIO](../../../00_install/index.md) will also install the `cleos` and `keosd` comand line tools.
+* You have access to an EOSIO blockchain.
+* You have an EOSIO account and access to the account's private key.
+
+## Examples
+
+1. Update the `active` permission key:
+
+```shell
+cleos set account permission alice active EOS5zG7PsdtzQ9achTdRtXwHieL7yyigBFiJDRAQonqBsfKyL3XhC -p alice@owner
+```
+
+**Where**
+* `alice` = The name of the account to update the key.
+* `active`= The name of the permission to update the key.
+* `EOS5zG7PsdtzQ9achTdRtXwHieL7yyigBFiJDRAQonqBsfKyL3XhC` = The new public key for the authority.
+* `-p alice@owner` = The permission used to authorize the transaction.
+
+**Example Output**
+```shell
+executed transaction: ab5752ecb017f166d56e7f4203ea02631e58f06f2e0b67103b71874f608793e3 160 bytes 231 us
+# eosio <= eosio::updateauth {"account":"alice","permission":"active","parent":"owner","auth":{"threshold":1,"keys":[{"key":"E...
+```
+
+2. Add the `eosio.code` permission to the contract account `active` permission to enable calling inline actions by the contract account's `active` permission:
+
+```shell
+cleos set account permission alice active --add-code -p alice@active
+```
+
+**Where**
+* `alice` = The name of the account to add `eosio.code`.
+* `active`= The name of the permission to add `eosio.code`.
+* `--add-code` = Tells the command to add `eosio.code`.
+* `-p alice@active` = The permission used to authorize the transaction.
+
+**Example Output**
+```shell
+executed transaction: ab5752ecb017f166d56e7f4203ea02631e58f06f2e0b67103b71874f608793e3 160 bytes 231 us
+# eosio <= eosio::updateauth {"account":"alice","permission":"active","parent":"owner","auth":{"threshold":1,"keys":[{"key":"E...
+```
+
+3. Add a custom permission to the **alice** account:
+
+```shell
+cleos set account permission alice customp EOS58wmANoBtT7RdPgMRCGDb37tcCQswfwVpj6NzC55D247tTMU9D active -p alice@active
+```
+
+**Where**
+* `alice` = The name of the account you are adding a custom permission to.
+* `customp`= The name of the custom permission.
+* `EOS58wmANoBtT7RdPgMRCGDb37tcCQswfwVpj6NzC55D247tTMU9D` = The public key of the custom permission.
+* `active` = The parent of the custom permission.
+* `-p alice@active` = The permission used to authorize the transaction.
+
+**Example Output**
+```shell
+executed transaction: 69c5297571ce3503edb9a1fd8a2f2a5cc1805ad19197a8751ca09093487c3cf8 160 bytes 134 us
+# eosio <= eosio::updateauth {"account":"alice","permission":"customp","parent":"active","auth":{"threshold":1,"keys":[{"key":"EOS...```
+
+## See Also
+- [Accounts and Permissions](https://developers.eos.io/welcome/v2.1/protocol/accounts_and_permissions) protocol document.
+- [Creating and Linking Custom Permissions](https://developers.eos.io/welcome/v2.1/smart-contract-guides/linking-custom-permission) tutorial.
diff --git a/docs/02_cleos/03_command-reference/set/set-account.md b/docs/02_cleos/03_command-reference/set/set-account.md
deleted file mode 100755
index e4ed9f6e32d..00000000000
--- a/docs/02_cleos/03_command-reference/set/set-account.md
+++ /dev/null
@@ -1,91 +0,0 @@
-## Description
-set parameters dealing with account permissions
-
-[[info | JSON input]]
-| This command involves specifying JSON input which depends on underlying class definitions. Therefore, such JSON input is subject to change in future versions of the EOSIO software.
-
-## Positionals
-- `account` _TEXT_ - The account to set/delete a permission authority for
-- `permission` _TEXT_ - The permission name to set/delete an authority for
-- `authority` _TEXT_ - [delete] NULL, [create/update] public key, JSON string, or filename defining the authority
-- `parent` _TEXT_ - [create] The permission name of this parents permission (Defaults to: "active")
-## Options
-
-`-h,--help` Print this help message and exit
-
-`--add-code` [code] add 'eosio.code' permission to specified permission authority
-
-`--remove-code` [code] remove 'eosio.code' permission from specified permission authority
-
-`-x,--expiration` _TEXT_ - set the time in seconds before a transaction expires, defaults to 30s
-
-`-f,--force-unique` - force the transaction to be unique. this will consume extra bandwidth and remove any protections against accidently issuing the same transaction multiple times
-
-`-s,--skip-sign` Specify if unlocked wallet keys should be used to sign transaction
-
-`-d,--dont-broadcast` - Don't broadcast transaction to the network (just print to stdout)
-
-`-r,--ref-block` _TEXT_ set the reference block num or block id used for TAPOS (Transaction as Proof-of-Stake)
-
-`-p,--permission` _TEXT_ - An account and permission level to authorize, as in 'account@permission' (defaults to 'account@active')
-
-`--max-cpu-usage-ms` _UINT_ - set an upper limit on the milliseconds of cpu usage budget, for the execution of the transaction (defaults to 0 which means no limit)
-
-`--max-net-usage` _UINT_ - set an upper limit on the net usage budget, in bytes, for the transaction (defaults to 0 which means no limit)
-
-`--delay-sec` _UINT_ - set the delay_sec seconds, defaults to 0s
-
-## Command
-To modify the permissions of an account, you must have the authority over the account and the permission of which you are modifying.
-
-The first example associates a new key to the active permissions of an account.
-
-```sh
-cleos set account permission test active '{"threshold":1,"keys":[{"key":"EOS8X7Mp7apQWtL6T2sfSZzBcQNUqZB7tARFEm9gA9Tn9nbMdsvBB","weight":1}],"accounts":[{"permission":{"actor":"acc2","permission":"active"},"weight":50}]}' owner
-```
-This second example modifies the same account permission, but removes the key set in the last example, and grants active authority of the test account to another account.
-
-```sh
-cleos set account permission test active '{"threshold":1,"keys":[],"accounts":[{"permission":{"actor":"acc1","permission":"active"},"weight":50},{"permission":{"actor":"sandwich","permission":"active"},"weight":1}]}' owner
-```
-
-The third example demonstrates how to set up permissions for multisig.
-
-```sh
-cleos set account permission test active '{"threshold" : 100, "keys" : [{"key":"EOS8X7Mp7apQWtL6T2sfSZzBcQNUqZB7tARFEm9gA9Tn9nbMdsvBB","weight":25}], "accounts" : [{"permission":{"actor":"sandwich","permission":"active"},"weight":75}]}' owner
-```
-The JSON object used in this command is actually composed of two different types of objects
-
-The authority JSON object ...
-
-```json
-{
- "threshold" : 100, /*An integer that defines cumulative signature weight required for authorization*/
- "keys" : [], /*An array made up of individual permissions defined with an EOS PUBLIC KEY*/
- "accounts" : [] /*An array made up of individual permissions defined with an EOS ACCOUNT*/
-}
-```
-...which includes one or more permissions objects.
-
-```json
-/*Set Permission with Key*/
-{
- "permission" : {
- "key" : "EOS8X7Mp7apQWtL6T2sfSZzBcQNUqZB7tARFEm9gA9Tn9nbMdsvBB",
- "permission" : "active"
- },
- weight : 25 /*Set the weight of a signature from this permission*/
-}
-
-/*Set Permission with Account*/
-{
- "permission" : {
- "account" : "sandwich",
- "permission" : "active"
- },
- weight : 75 /*Set the weight of a signature from this permission*/
-}
-```
-
-## See Also
-- [Accounts and Permissions](https://developers.eos.io/welcome/latest/protocol/accounts_and_permissions) protocol document.
diff --git a/docs/02_cleos/03_command-reference/set/set-action-permission.md b/docs/02_cleos/03_command-reference/set/set-action-permission.md
new file mode 100755
index 00000000000..8a4701c7bc1
--- /dev/null
+++ b/docs/02_cleos/03_command-reference/set/set-action-permission.md
@@ -0,0 +1,109 @@
+## Command
+cleos set action permission [OPTIONS] account code type requirement
+
+**Where**
+* [OPTIONS] = See Options in Command Usage section below.
+* account = The account to set/delete a permission authority for.
+* code = The account that owns the code for the action.
+* type = The name of the action, note permissions must be set per action.
+* requirement = To remove a permission use NULL, To set or update the permission use the name of the permission required for executing the given action.
+
+**Note**: The arguments and options enclosed in square brackets are optional.
+
+## Description
+Set parameters dealing with account permissions
+
+## Command Usage
+The following information shows the different positionals and options you can use with the `cleos set action permission` command:
+
+### Positionals:
+- `account` _TEXT_ REQUIRED The account to set/delete a permission authority
+- `code` _TEXT_ REQUIRED The account that owns the code for the action
+- `type` _TEXT_ REQUIRED The type of the action
+- `requirement` _TEXT_ REQUIRED [delete] NULL, [set/update] The permission name require for executing the given action
+
+### Options:
+- `-h,--help` Print this help message and exit
+- `-x`,`--expiration` Set the time in seconds before a transaction expires, defaults to 30s
+- `-f`,`--force-unique` Force the transaction to be unique. this will consume extra bandwidth and remove any protections against accidently issuing the same transaction multiple times
+- `-s`,`--skip-sign` Specify if unlocked wallet keys should be used to sign transaction
+- `-j`,`--json` Print result as json
+- `--json-file` _TEXT_ Save result in json format into a file
+- `-d`,`--dont-broadcast` Don't broadcast transaction to the network (just print to stdout)
+- `--return-packed` Used in conjunction with --dont-broadcast to get the packed transaction
+- `-r`,`--ref-block` _TEXT_ Set the reference block num or block id used for TAPOS (Transaction as Proof-of-Stake)
+- `--use-old-rpc` Use old RPC push_transaction, rather than new RPC send_transaction
+- `-p`,`--permission` _TEXT_ An account and permission level to authorize, as in 'account@permission' (defaults to 'account@active')
+- `--max-cpu-usage-ms` _UINT_ Set an upper limit on the milliseconds of cpu usage budget, for the execution of the transaction (defaults to 0 which means no limit)
+- `--max-net-usage` _UINT_ Set an upper limit on the net usage budget, in bytes, for the transaction (defaults to 0 which means no limit)
+- `--delay-sec` _UINT_ Set the delay_sec seconds, defaults to 0s
+
+## Requirements
+* Install the currently supported version of `cleos`.
+[[info | Note]]
+| `Cleos` is bundled with the EOSIO software. [Installing EOSIO](../../../00_install/index.md) will also install the `cleos` and `keosd` comand line tools.
+* You have access to an EOSIO blockchain.
+* You have an EOSIO account and access to the account's private key.
+
+## Examples
+
+1. Set permission on a _hi_ action deployed to the _scontract1_ account so that the _bob_ account's `active` permission and _customp1_ permission are authorized:
+
+```shell
+cleos set action permission bob scontract1 hi customp1 -p bob@active
+```
+
+**Where**
+* `bob` = The name of the account to link the custom permission authority.
+* `scontract1`= The name of the account which owns the smart contract.
+* `hi` = The name of the action to link to a permission.
+* `customp1` = The permission used to authorize the transaction.
+* `-p bob@active` = The permission used to authorize setting the permissions.
+
+**Example Output**
+```shell
+executed transaction: 4eb4cf3aea232d46e0e949bc273c3f0575be5bdba7b61851ab51d927cf74a838 128 bytes 141 us
+# eosio <= eosio::linkauth {"account":"bob","code":"scontract1","type":"hi","requirement":"customp1"}
+```
+
+2. Set permissions on a _bye_ action deployed to the _scontract1_ account so that the _bob_ account's `active` permission and _customp2_ permission are authorized:
+
+```shell
+cleos set action permission bob scontract1 bye customp2 -p bob@active
+```
+
+**Where**
+* `bob` = The name of the account to link the custom permission authority.
+* `scontract1`= The name of the account which owns the smart contract.
+* `bye` = The name of the action to link to a permission.
+* `customp2` = The permission used to authorize the transaction.
+* `-p bob@active` = The permission used to authorize setting the permissions.
+
+**Example Output**
+```shell
+executed transaction: 4eb4cf3aea232d46e0e949bc273c3f0575be5bdba7b61851ab51d927cf74a838 128 bytes 141 us
+# eosio <= eosio::linkauth {"account":"bob","code":"scontract1","type":"bye","requirement":"customp2"}
+```
+
+3. To remove the customp1 permission from the _hi_ action:
+
+```shell
+cleos set action permission bob scontract1 hi NULL -p bob@active
+```
+**Where**
+* `bob` = The name of the account to link the custom permission authority.
+* `scontract1`= The name of the account which owns the smart contract.
+* `hi` = The name of the action to link to a permission.
+* `NULL` = Remove the permission.
+* `-p bob@active` = The permission used to authorize the transaction.
+
+**Example Output**
+```shell
+executed transaction: 50fe754760a1b8bd0e56f57570290a3f5daa509c090deb54c81a721ee7048201 120 bytes 242 us
+# eosio <= eosio::unlinkauth {"account":"bob","code":"scontract1","type":"hi"}
+```
+
+## See Also
+- [Accounts and Permissions](https://developers.eos.io/welcome/v2.1/protocol/accounts_and_permissions) protocol document.
+- [Creating and Linking Custom Permissions](https://developers.eos.io/welcome/v2.1/smart-contract-guides/linking-custom-permission) tutorial.
+
diff --git a/docs/02_cleos/03_command-reference/set/set-action.md b/docs/02_cleos/03_command-reference/set/set-action.md
deleted file mode 100755
index cb8199739bf..00000000000
--- a/docs/02_cleos/03_command-reference/set/set-action.md
+++ /dev/null
@@ -1,73 +0,0 @@
-## Description
-Sets or updates an action's state on the blockchain.
-
-**Command**
-
-```sh
-cleos set action
-```
-**Output**
-
-```console
-Usage: cleos set action [OPTIONS] SUBCOMMAND
-
-Options:
- -h,--help Print this help message and exit
-
-Subcommands:
- permission set parmaters dealing with account permissions
-```
-**Command**
-
-```sh
-cleos set action permission
-```
-
-## Positionals
-
-`account` TEXT The account to set/delete a permission authority for (required
-
-`code` _Text_ The account that owns the code for the action
-
-`type` _Type_ the type of the action
-
-`requirement` _Type_ The permission name require for executing the given action
-
-## Options
-`-h,--help` Print this help message and exit
-
-`-x,--expiration` _Type:Text_ - set the time in seconds before a transaction expires, defaults to 30s
-
-`-f,--force-unique` - force the transaction to be unique. this will consume extra bandwidth and remove any protections against accidently issuing the same transaction multiple times
-
-`-s,--skip-sign` Specify if unlocked wallet keys
-should be used to sign transaction
-
-`-j,--json` print result as json
-
-`-d,--dont-broadcast` - Don't broadcast transaction to the network (just print to stdout)
-
-`--return-packed` used in conjunction with --dont-broadcast to get the packed transaction
-
-`-r,--ref-block` _TEXT_ set the reference block num or block id used for TAPOS (Transaction as Proof-of-Stake)
-
-`-p,--permission` _Type:Text_ - An account and permission level to authorize, as in 'account@permission' (defaults to 'account@active')
-
-`--max-cpu-usage-ms` _UINT_ - Set an upper limit on the milliseconds of cpu usage budget, for the execution of the transaction (defaults to 0 which means no limit)
-
-`--max-net-usage` _UINT_ - Set an upper limit on the net usage budget, in bytes, for the transaction (defaults to 0 which means no limit)
-
-`--delay-sec` _UINT_ - set the delay_sec seconds, defaults to 0s
-
-## Usage
-
-```sh
-#Link a `voteproducer` action to the 'voting' permissions
-cleos set action permission sandwichfarm eosio.system voteproducer voting -p sandwichfarm@voting
-
-#Now can execute the transaction with the previously set permissions.
-cleos system voteproducer approve sandwichfarm someproducer -p sandwichfarm@voting
-```
-
-## See Also
-- [Accounts and Permissions](https://developers.eos.io/welcome/latest/protocol/accounts_and_permissions) protocol document.
diff --git a/docs/02_cleos/03_command-reference/system/system-buyram.md b/docs/02_cleos/03_command-reference/system/system-buyram.md
index 028df3f8384..942f7543d4f 100755
--- a/docs/02_cleos/03_command-reference/system/system-buyram.md
+++ b/docs/02_cleos/03_command-reference/system/system-buyram.md
@@ -1,22 +1,46 @@
+
+## Command
+cleos system buyram [OPTIONS] payer receiver amount
+
+**Where**
+* [OPTIONS] = See Options in Command Usage section below.
+* payer = The account paying for RAM.
+* receiver = The account receiving bought RAM.
+* amount = The amount of EOS to pay for RAM
+
+**Note**: The arguments and options enclosed in square brackets are optional.
+
## Description
-Buy RAM
+Use this command to buy RAM for a blockchain account on EOSIO.
-## Positional Arguments
-- `payer` _TEXT_ - Theaccount paying for RAM
+## Command Usage
+The following information shows the different positionals and options you can use with the `cleos system buyram` command:
+
+### Positionals:
+- `payer` _TEXT_ - The account paying for RAM
- `receiver` _TEXT_ - The account receiving bought RAM
- `amount` _TEXT_ - The amount of EOS to pay for RAM
-## Options
-- `-h,--help` Print this help message and exit
-- `-k,--kbytes` buyram in number of kibibytes (KiB)
-- `-b,--bytes` buyram in number of bytes
-- `-x,--expiration` _TEXT_ - set the time in seconds before a transaction expires, defaults to 30s
-- `-f,--force-unique` - force the transaction to be unique. this will consume extra bandwidth and remove any protections against accidently issuing the same transaction multiple times
-- `-s,--skip-sign` Specify if unlocked wallet keys should be used to sign transaction
-- `-j,--json` - print result as json
+### Options
+- `-h,--help` - Print this help message and exit
+- `-k,--kbytes` - Buyram in number of kibibytes (KiB)
+- `-b,--bytes` - Buyram in number of bytes
+- `-x,--expiration` _TEXT_ - Set the time in seconds before a transaction expires, defaults to 30s
+- `-f,--force-unique` - Force the transaction to be unique. This will consume extra bandwidth and remove any protections against accidently issuing the same transaction multiple times
+- `-s,--skip-sign` - Specify if unlocked wallet keys should be used to sign transaction
+- `-j,--json` - Print result as json
+- `--json-file` _TEXT_ - save result in json format into a file
- `-d,--dont-broadcast` - Don't broadcast transaction to the network (just print to stdout)
-- `-r,--ref-block` _TEXT_ set the reference block num or block id used for TAPOS (Transaction as Proof-of-Stake)
-- `-p,--permission` _TEXT_ - An account and permission level to authorize, as in 'account@permission' (defaults to 'account@active')
-- `--max-cpu-usage-ms` _UINT_ - set an upper limit on the milliseconds of cpu usage budget, for the execution of the transaction (defaults to 0 which means no limit)
-- `--max-net-usage` _UINT_ - set an upper limit on the net usage budget, in bytes, for the transaction (defaults to 0 which means no limit)
-- `--delay-sec` _UINT_ - set the delay_sec seconds, defaults to 0s
+- `--return-packed` - Used in conjunction with --dont-broadcast to get the packed transaction
+- `-r,--ref-block` _TEXT_ - Set the reference block num or block id used for TAPOS (Transaction as Proof-of-Stake)
+- ` --use-old-rpc` - Use old RPC push_transaction, rather than new RPC send_transaction
+- `-p,--permission` _TEXT_ - An account and permission level to authorize, as in 'account@permission' (defaults to 'account@active')
+- `--max-cpu-usage-ms` _UINT_ - Set an upper limit on the milliseconds of cpu usage budget, for the execution of the transaction (defaults to 0 which means no limit)
+- `--max-net-usage` _UINT_ - Set an upper limit on the net usage budget, in bytes, for the transaction (defaults to 0 which means no limit)
+- `--delay-sec` _UINT_ - Set the delay_sec seconds, defaults to 0s
+
+## Requirements
+For the prerequisites to run this command see the Before you Begin section of [How to Buy Ram](../02_how-to-guides/how-to-buy-ram.md)
+
+## Examples
+* [How to Buy Ram](../02_how-to-guides/how-to-buy-ram.md)
\ No newline at end of file
diff --git a/docs/02_cleos/03_command-reference/validate/index.md b/docs/02_cleos/03_command-reference/validate/index.md
new file mode 100644
index 00000000000..128256db04f
--- /dev/null
+++ b/docs/02_cleos/03_command-reference/validate/index.md
@@ -0,0 +1,14 @@
+## Description
+Validate transactions
+
+## Commands
+
+```console
+Usage: cleos validate [OPTIONS] SUBCOMMAND
+
+Options:
+ -h,--help Print this help message and exit
+```
+
+## Subcommands
+- [signatures](validate-signatures) - Validate signatures and recover public keys
diff --git a/docs/02_cleos/03_command-reference/validate/validate-signatures.md b/docs/02_cleos/03_command-reference/validate/validate-signatures.md
new file mode 100644
index 00000000000..25235138b95
--- /dev/null
+++ b/docs/02_cleos/03_command-reference/validate/validate-signatures.md
@@ -0,0 +1,66 @@
+## Description
+Validate signatures and recover public keys
+
+[[info | JSON input]]
+| This command involves specifying JSON input which depends on underlying class definitions. Therefore, such JSON input is subject to change in future versions of the EOSIO software.
+
+## Usage
+```sh
+cleos validate signatures [OPTIONS] transaction
+```
+
+## Positional Arguments
+- `transaction` _TEXT_ - The JSON string or filename defining the signed transaction to validate
+
+## Options
+- `-c,--chain-id` _TEXT_ - The chain id that will be used in signature verification
+
+## Example
+
+```sh
+cleos validate signatures --chain-id cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f '{ "expiration": "2020-04-23T04:47:23", "ref_block_num": 20, "ref_block_prefix": 3872940040,
+"max_net_usage_words": 0, "max_cpu_usage_ms": 0, "delay_sec": 0, "context_free_actions": [], "actions": [ { "account": "eosio", "name": "voteproducer", "authorization": [ { "actor": "initb", "permission": "active" } ], "data": "000000008093dd74000000000000000001000000008093dd74" } ], "transaction_extensions": [], "signatures": [ "SIG_K1_Jy81u5yWSE4vGET1cm9TChKrzhAz4QE2hB2pWnUsHQExGafqhVwXtg7a7mbLZwXcon8bVQJ3J5jtZuecJQADTiz2kwcm7c" ], "context_free_data": [] }'
+```
+or
+```sh
+cleos -u https://api.testnet.eos.io validate signatures '{ "expiration": "2020-04-23T04:47:23", "ref_block_num": 20, "ref_block_prefix": 3872940040,
+"max_net_usage_words": 0, "max_cpu_usage_ms": 0, "delay_sec": 0, "context_free_actions": [], "actions": [ { "account": "eosio", "name": "voteproducer", "authorization": [ { "actor": "initb", "permission": "active" } ], "data": "000000008093dd74000000000000000001000000008093dd74" } ], "transaction_extensions": [], "signatures": [ "SIG_K1_Jy81u5yWSE4vGET1cm9TChKrzhAz4QE2hB2pWnUsHQExGafqhVwXtg7a7mbLZwXcon8bVQJ3J5jtZuecJQADTiz2kwcm7c" ], "context_free_data": [] }'
+```
+
+## Output
+```console
+[
+ "EOS7pCywBCz5zw2bc7teCVcT7MEWUr9s749qnYDNPEsBoH32vGqqN"
+]
+```
+
+## See Also
+- [How to submit a transaction](../../02_how-to-guides/how-to-submit-a-transaction.md)
diff --git a/docs/02_cleos/03_command-reference/wallet/create.md b/docs/02_cleos/03_command-reference/wallet/create.md
index b4594459019..463b12d64e9 100755
--- a/docs/02_cleos/03_command-reference/wallet/create.md
+++ b/docs/02_cleos/03_command-reference/wallet/create.md
@@ -7,4 +7,85 @@ None
## Options
- `-n, --name` _TEXT_ - The name of the new wallet
- `-f, --file` _TEXT_ - Name of file to write wallet password output to. (Must be set, unless "--to-console" is passed
-- `--to-console` - Print password to console
\ No newline at end of file
+- `--to-console` - Print password to console
+
+## Command
+cleos wallet create [OPTIONS]
+
+**Where**
+* [OPTIONS] = See Options in Command Usage section below.
+
+**Note**: The arguments and options enclosed in square brackets are optional.
+
+## Description
+Create a new wallet locally.
+
+## Command Usage
+The following information shows the different positionals and options you can use with the `cleos wallet create` command:
+
+### Positionals:
+- none
+### Options
+`-h`, `--help` - Print this help message and exit
+`-n`, `--name` _TEXT_ - The name of the new wallet, if blank the name is `default`
+`-f`, `--file` _TEXT_ - Name of file to write wallet password output to. Must be set, unless "--to-console" is passed
+`--to-console` - Print password to console.
+
+## Requirements
+* Install the currently supported version of `cleos` and `keosd`.
+[[info | Note]]
+| `Cleos` and `keosd` are bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install the `cleos` and `keosd` command line tools.
+
+## Examples
+1. Create a new wallet called `default` and output the wallet password to the screen
+```shell
+cleos wallet create --to-console
+```
+**Where**
+`--to-console` = Tells the `cleos wallet create` command to print the wallet password to the console.
+
+**Example Output**
+```shell
+Creating wallet: default
+Save password to use in the future to unlock this wallet.
+Without password imported keys will not be retrievable.
+"PW5HuN7hkCBdMNQAa8z3NuThp3LSDtjv77odQYs5t2wgghJq4MUxo"
+```
+
+2. Create a new wallet called `my_wallet` and output the wallet password to a file called `my_wallet_password.txt`
+```shell
+cleos wallet create --name my_wallet --file my_wallet_passwords.txt
+```
+**Where**
+`--name` my_wallet = Tells the `cleos wallet create` command to create a wallet called `my_wallet_password.txt`
+`--file` my_wallet_passwords.txt = Tells the `cleos wallet create` command to store the password in a file called `my_wallet_password.txt`.
+
+**Example Output**
+```shell
+Creating wallet: my_wallet
+Save password to use in the future to unlock this wallet.
+Without password imported keys will not be retrievable.
+saving password to my_wallet_passwords.txt
+```
+
+```shell
+cat my_wallet_passwords.txt
+```
+
+**Example Output**
+```shell
+PW5JZaEQXoTKWZRg313aTYS7iNh2jMH4Xs7zWS3vrTZ4p5hCSFGFH(base)
+```
+
+```shell
+cleos wallet list
+```
+
+**Example Output**
+```shell
+Wallets:
+[
+ "default *",
+ "my_wallet *"
+]
+```
diff --git a/docs/02_cleos/03_command-reference/wallet/import.md b/docs/02_cleos/03_command-reference/wallet/import.md
index 38563a1ed1a..a3352b7ac17 100755
--- a/docs/02_cleos/03_command-reference/wallet/import.md
+++ b/docs/02_cleos/03_command-reference/wallet/import.md
@@ -1,9 +1,55 @@
+## Command
+cleos wallet import [OPTIONS]
+
+**Where**
+* [OPTIONS] = See Options in Command Usage section below.
+
+**Note**: The arguments and options enclosed in square brackets are optional.
+
## Description
-Imports private key into wallet
+Imports private key into wallet. This command will launch `keosd` if it is not already running.
-## Positionals
-None
+## Command Usage
+The following information shows the different positionals and options you can use with the `cleos wallet import` command:
-## Options
+### Positionals:
+- none
+### Options
+- `-h,--help` - Print this help message and exit
- `-n, --name` _TEXT_ - The name of the wallet to import key into.
-- `--private-key` _TEXT_ - Private key in WIF format to import.
\ No newline at end of file
+- `--private-key` _TEXT_ - Private key in WIF format to import.
+
+## Requirements
+* Install the currently supported version of `cleos` and `keosd`.
+[[info | Note]]
+| `Cleos` and `keosd` are bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install the `cleos` and `keosd` command line tools.
+
+## Examples
+1. Import a private key to the default wallet. The wallet must be **open** and **unlocked**.
+```shell
+cleos wallet import
+```
+
+The command asks for the private key. Enter it.
+
+```shell
+5KDNWQvY2seBPVUz7MiiaEDGTwACfuXu78bwZu7w2UDM9A3u3Fs
+```
+
+**Example Output**
+```shell
+private key: imported private key for: EOS5zG7PsdtzQ9achTdRtXwHieL7yyigBFiJDRAQonqBsfKyL3XhC
+```
+
+2. Import a private key to a named wallet. The wallet must be `open` and `unlocked.`
+```shell
+cleos wallet import --name my_wallet --private-key 5KDNWQvY2seBPVUz7MiiaEDGTwACfuXu78bwZu7w2UDM9A3u3Fs
+```
+**Where**
+`--name` my_wallet = Tells the `cleos wallet import` command to import the key to `my_wallet`
+`--private-key` 5KDNWQvY2seBPVUz7MiiaEDGTwACfuXu78bwZu7w2UDM9A3u3Fs = Tells the `cleos wallet import` command the private key to import
+
+**Example Output**
+```shell
+imported private key for: EOS5zG7PsdtzQ9achTdRtXwHieL7yyigBFiJDRAQonqBsfKyL3XhC
+```
diff --git a/docs/02_cleos/index.md b/docs/02_cleos/index.md
index 6e0ea9423bd..1c2392aefce 100644
--- a/docs/02_cleos/index.md
+++ b/docs/02_cleos/index.md
@@ -43,6 +43,7 @@ Subcommands:
version Retrieve version information
create Create various items, on and off the blockchain
convert Pack and unpack transactions
+ validate Validate transactions
get Retrieve various items and information from the blockchain
set Set or update blockchain state
transfer Transfer tokens from account to account
diff --git a/docs/10_utilities/eosio-blocklog.md b/docs/10_utilities/eosio-blocklog.md
index b6c7a3ca609..6abe95fcea5 100644
--- a/docs/10_utilities/eosio-blocklog.md
+++ b/docs/10_utilities/eosio-blocklog.md
@@ -9,13 +9,18 @@ link_text: eosio-blocklog
* Generate `blocks.index` from `blocks.log` in blocks directory.
* Trim `blocks.log` and `blocks.index` between a range of blocks.
* Perform consistency test between `blocks.log` and `blocks.index`.
+* Repair `blocks.log` and reconstruct `blocks.index` if corrupted.
+* Prune context-free data within given transaction and block number.
* Output the results of the operation to a file or `stdout` (default).
## Options
+`eosio-blocklog` supports the following options:
+
Option (=default) | Description
-|-
`--blocks-dir arg (="blocks")` | The location of the blocks directory (absolute path or relative to the current directory)
+`--state-history-dir arg (="state-history")` | The location of the `state-history` directory (absolute path or relative to the current dir)
`-o [ --output-file ] arg` | The file to write the generated output to (absolute or relative path). If not specified then output is to `stdout`
`-f [ --first ] arg (=0)` | The first block number to log or the first block to keep if `trim-blocklog` specified
`-l [ --last ] arg (=4294967295)` | the last block number to log or the last block to keep if `trim-blocklog` specified
@@ -23,7 +28,11 @@ Option (=default) | Description
`--as-json-array` | Print out JSON blocks wrapped in JSON array (otherwise the output is free-standing JSON objects)
`--make-index` | Create `blocks.index` from `blocks.log`. Must give `blocks-dir` location. Give `output-file` relative to current directory or absolute path (default is `/blocks.index`)
`--trim-blocklog` | Trim `blocks.log` and `blocks.index`. Must give `blocks-dir` and `first` and/or `last` options.
+`--fix-irreversible-blocks` | When the existing block log is inconsistent with the index, allows fixing the block log and index files automatically - it takes the highest indexed block if valid; otherwise, it repairs the block log and reconstructs the index
`--smoke-test` | Quick test that `blocks.log` and `blocks.index` are well formed and agree with each other
+`--block-num arg (=0)` | The block number which contains the transactions to be pruned
+`-t [ --transaction ] arg` | The transaction id to be pruned
+`--prune-transactions` | Prune the context free data and signatures from specified transactions of specified block-num
`-h [ --help ]` | Print this help message and exit
## Remarks
diff --git a/docs/20_upgrade-guide/79_2.0-upgrade-guide.md b/docs/20_upgrade-guide/79_2.0-upgrade-guide.md
deleted file mode 100644
index 1a8d5b57ce1..00000000000
--- a/docs/20_upgrade-guide/79_2.0-upgrade-guide.md
+++ /dev/null
@@ -1,3 +0,0 @@
----
-link: /20_upgrade-guide/index.md
----
diff --git a/docs/20_upgrade-guide/index.md b/docs/20_upgrade-guide/index.md
deleted file mode 100644
index f627e445c39..00000000000
--- a/docs/20_upgrade-guide/index.md
+++ /dev/null
@@ -1,52 +0,0 @@
----
-content_title: EOSIO 2.0 Upgrade Guide
----
-
-This section contains important instructions for node operators and other EOSIO stakeholders to transition an EOSIO network successfully through an EOSIO version or protocol upgrade.
-
-## Consensus Protocol Upgrades
-EOSIO v2.0.x introduces two new consensus protocol upgrade features (or just protocol features for short):
-
-1. `WEBAUTHN_KEY`: Adds support for WebAuthn keys and signatures ([#7421](https://github.com/EOSIO/eos/pull/7421))
-2. `WTMSIG_BLOCK_SIGNATURES`: Adds support for weighted threshold multi-signature (WTMsig) authorities for block production ([#7404](https://github.com/EOSIO/eos/pull/7404), [#8002](https://github.com/EOSIO/eos/pull/8002), [#8021](https://github.com/EOSIO/eos/pull/8021))
-
-Both of these features require activation through the privileged `preactivate_feature` intrinsic. This is typically facilitated by executing the `eosio::activate` system contract action (requires system contract [v1.7.0](https://github.com/EOSIO/eosio.contracts/releases/tag/v1.7.0) or later) via the `eosio.msig` contract after getting supermajority block producer approval. However, while these protocol features can be activated through coordination of the block producers alone, **it is still critical to give sufficient time for all nodes to upgrade to v2.0.x before activating any of the above two protocol features**. Activation of any of these two protocol features will immediately fork out any nodes that do not support the protocol features (e.g. any nodes running a version of nodeos earlier than v2.0.x).
-
-Both of the above protocol features only add new behavior to the EOSIO blockchain. They are not expected to change existing behavior in a significant way that would cause existing contracts to break. Existing applications and block explorers are also unlikely to break upon activation of these protocol features. However, these new features enable new data structures to be utilized on-chain which applications and especially block explorers need to be prepared to handle. For example, activation of the `WEBAUTHN_KEY` protocol feature means that an `eosio::newaccount` or `eosio::updateauth` action could now include WebAuthn public keys as part of the provided `authority`. So, an application dealing with these actions (e.g. a general authenticator for EOSIO transactions) will need to be prepared to support the serialization of WebAuthn public keys appearing in a place where a `public_key` ABI type is expected. Another example is how the activation of the `WTMSIG_BLOCK_SIGNATURES` protocol feature causes the `new_producers` field of a block header to always remain empty, even when a proposed producer schedule gets promoted to pending; upon activation of the `WTMSIG_BLOCK_SIGNATURES` protocol feature, the pending schedule data is instead stored (when present) within the `header_extensions` of the block header. So, block explorers expecting to show these pending producer schedules to users will need to update their code accordingly. As usual, test networks provide a great environment to try existing contracts, applications, services, etc. with the changes of the above protocol features to determine what breaks and what needs to be updated.
-
-For more details on the `WEBAUTH_KEY` protocol feature, see the section titled [WebAuthn Support](#webauthn-support-7421). For more details on the `WTMSIG_BLOCK_SIGNATURES` protocol feature, see the section titled [Weighted Threshold Multi-signature (WTMsig) Block Signing Authorities](#weighted-threshold-multi-signature-block-signing-authorities-7403).
-
-### WebAuthn Support ([#7421](https://github.com/EOSIO/eos/pull/7421))
-WebAuthn support within EOSIO is now available for developers to begin testing WebAuthn based transaction signing in their EOSIO applications. Private EOSIO chains can [start](https://github.com/EOSIO/eosio-webauthn-example-app) using WebAuthn based signatures with this release. We also anticipate releasing additional demos which will attempt to outline how Dapp authors can leverage WebAuthn for contract actions meriting higher levels of security as a second factor authorization mechanism.
-
-### Weighted Threshold Multi-Signature Block Signing Authorities ([#7403](https://github.com/EOSIO/eos/issues/7403))
-Block producers must be able to provide high availability for their core service of running the blockchain (aka producing blocks). A common approach to achieve this is redundant infrastructure that efficiently maintains block production, in the event of a hardware malfunction or networking issues. Weighted Threshold Multi-Signature Block Production is the first of many features that seek to provide block producers with a complete high availability solution.
-
-Current consensus rules require exactly one cryptographic block signing key per block producer. This key, whether stored on disk and loaded via software or protected with a hardware wallet, represents a single-point-of-failure for the operations of a block producer. If that key is lost or access to the hardware module that contains it is temporarily unavailable, the block producer has no choice but to drop blocks, impacting the whole network’s throughput.
-
-To improve the security and scalability of block production, weighted threshold multi-signature (WTMsig) block signing authorities provides a permission layer that allows for multiple block signing keys in a flexible scheme that will enable redundant block signing infrastructure to exist without sharing any sensitive data.
-
-An updated version of the system contract is required to enable block producers to use WTMsig block signing authorities. Version [v1.9.0-rc1](https://github.com/EOSIO/eosio.contracts/releases/tag/v1.9.0-rc1) of eosio.contracts adds a new `regproducer2` action to the eosio.system contract which enables a block producer candidate to register a WTMsig block signing authority. (That version of the system contract can only be deployed on an EOSIO chain that has activated the `WTMSIG_BLOCK_SIGNATURES` protocol feature.) More details are available at: [#7404](https://github.com/EOSIO/eos/pull/7404), [#8002](https://github.com/EOSIO/eos/pull/8002), [#8021](https://github.com/EOSIO/eos/pull/8021).
-
-## Upgrading from previous versions of EOSIO
-
-EOSIO v2.0.x has made changes to the state database that prevent it from working with existing state databases in v1.8.x and earlier. So upgrading from earlier versions of EOSIO requires importing the state from a portable snapshot.
-
-Furthermore, the changes to the state database necessitate a version bump in the portable snapshots generated by EOSIO v2.0.x from v2 to v3. However, unlike the upgrade of portable snapshot versions in EOSIO v1.8.x from v1 to v2, EOSIO v2.0.x is able to import v2 portable snapshots. This means that it is not necessary to replay the blockchain from genesis to upgrade from EOSIO v1.8.x to v2.0.x. (One exception is if the operator of the node is using the deprecated history_plugin and wishes to preserve that history.)
-
-Finally, EOSIO v2.0.x has also upgraded the version of the irreversible blocks log to v3. However, older versions of the blocks log are still supported, so there is no need to do anything special to handle existing blocks log files.
-
-### Upgrading from v1.8.x
-
-If the node uses the deprecated history_plugin (and the operator of the node wishes to preserve this history), the only option to upgrade is to replay the blockchain from genesis.
-
-Users of the state_history_plugin (SHiP) do not need to replay from genesis because the state history logs are portable and contain versioned data structures within. However, upgrading a node that uses state history without a full replay means that the state history log will contain a mix of versions for any upgrade types. For example, the changes in v2.0.x modify the `global_property_object` in the database state and so the state history log could contain a `global_property_object_v0` type (for the part of the history before the local node upgrade) and a `global_property_object_v1` type (for the part of the history after the local node upgrade). This should not cause problems for any history fillers that have been updated to support both versions of the type. However, operators should be aware that this can lead to the log file contents being slightly different across different nodes even if they all start and stop at the same blocks and have not enabled `trace-history-debug-mode`. (Replaying a v2.0.x node with state_history_plugin enabled from genesis would guarantee that the state history logs do not contain the `global_property_object_v0` type.)
-
-The following instructions should be followed to upgrade nodeos from v1.8.x to v2.0.x without a full replay (after making appropriate backup copies):
-1. Obtain a compatible portable snapshot of the state. A v2 or v3 portable snapshot can be downloaded from a trusted source. Alternatively, one can use an existing v1.8.x node to generate a v2 portable snapshot by launching nodeos with `--read-mode=irreversible --plugin=eosio::producer_api_plugin` command-line options and then using the `/v1/producer/create_snapshot` RPC endpoint to generate a portable snapshot (e.g. run the command `curl -X POST http:/127.0.0.1:8888/v1/producer/create_snapshot -d '{}' | jq`).
-2. Shut down nodeos and delete the `blocks/reversible` and `state` sub-directories within the data directory.
-3. Launch nodeos v2.0.x from the generated snapshot using the `--snapshot` command line option and give it time to import the snapshot while starting up (this could take several minutes). (Subsequent launches of nodeos should not use the `--snapshot` option.)
-
-### Upgrading from v2.0.0-rc1, v2.0.0-rc2, or v2.0.0-rc3
-
-Node operators should consider upgrading v2.0.0-rc1, v2.0.0-rc2, and v2.0.0-rc3 nodes to v2.0.0 as soon as possible. They can follow normal upgrade procedures for the upgrade. There should be no need to do a replay or import from a snapshot.
diff --git a/docs/20_upgrade-guide/81_1.8-upgrade-guide.md b/docs/20_upgrade-guides/1.8-upgrade-guide.md
similarity index 94%
rename from docs/20_upgrade-guide/81_1.8-upgrade-guide.md
rename to docs/20_upgrade-guides/1.8-upgrade-guide.md
index 33a24e6ee08..a5936f472ca 100644
--- a/docs/20_upgrade-guide/81_1.8-upgrade-guide.md
+++ b/docs/20_upgrade-guides/1.8-upgrade-guide.md
@@ -1,5 +1,5 @@
---
-content_title: EOSIO 1.8 Consensus Protocol Upgrade Process
+content_title: EOSIO 1.8+ Consensus Protocol Upgrade Process
---
This guide is intended to instruct node operators on the steps needed to successfully transition an EOSIO network through a consensus protocol upgrade (also known as a "hard fork") with minimal disruption to users.
@@ -121,7 +121,7 @@ Once the `PREACTIVATE_FEATURE` protocol feature has been activated, the [new sys
Block explorers, exchanges, and applications building on the blockchain can all follow the four-step processes described above to upgrade their nodes in time and ensure their services continue when the first protocol upgrade is activated. However, they should also be aware that certain protocol features change the behavior of existing operations on the blockchain, and in some cases also slightly change the structure of blocks and transactions.
-**First**, v1.8 changes the structure of transaction traces, even prior to the activation of any protocol features. Clients consuming transaction and action traces made available through [`history_plugin`](../03_plugins/history_plugin/index.md), [`mongo_db_plugin`](../03_plugins/mongo_db_plugin/index.md), or [`state_history_plugin`](../03_plugins/state_history_plugin/index.md) should be aware of the changes made to the trace structure (see details at [#7044](https://github.com/EOSIO/eos/pull/7044) and [#7108](https://github.com/EOSIO/eos/pull/7108)). Clients consuming the trace output of the `push_transaction` RPC from the chain API should not need to do anything since the output of that RPC should be backwards compatible. However, they are encouraged to replace usage of `push_transaction` with the new RPC [`send_transaction`](https://developers.eos.io/eosio-nodeos/reference#send_transaction) which uses the new flat structure to store the action traces.
+**First**, v1.8 changes the structure of transaction traces, even prior to the activation of any protocol features. Clients consuming transaction and action traces made available through [`history_plugin`](../03_plugins/history_plugin/index.md), `mongo_db_plugin`, or [`state_history_plugin`](../03_plugins/state_history_plugin/index.md) should be aware of the changes made to the trace structure (see details at [#7044](https://github.com/EOSIO/eos/pull/7044) and [#7108](https://github.com/EOSIO/eos/pull/7108)). Clients consuming the trace output of the `push_transaction` RPC from the chain API should not need to do anything since the output of that RPC should be backwards compatible. However, they are encouraged to replace usage of `push_transaction` with the new RPC [`send_transaction`](https://developers.eos.io/eosio-nodeos/reference#send_transaction) which uses the new flat structure to store the action traces.
The [`state_history_plugin`](../03_plugins/state_history_plugin/index.md) has also changed its API and the structure of the files it stores on disk in a backwards incompatible way in v1.8. These changes reflect, among other things, the transaction trace structural changes and the data structure changes made within the chain state database to support the new protocol features. Consumers of the [`state_history_plugin`](../03_plugins/state_history_plugin/index.md) will need to be updated to work with the new changes in v1.8.
diff --git a/docs/20_upgrade-guides/index.md b/docs/20_upgrade-guides/index.md
new file mode 100644
index 00000000000..1013692a810
--- /dev/null
+++ b/docs/20_upgrade-guides/index.md
@@ -0,0 +1,7 @@
+---
+content_title: EOSIO Upgrade Guides
+---
+
+This section contains important instructions for node operators and other EOSIO stakeholders to transition an EOSIO network successfully through an EOSIO version or protocol upgrade.
+
+* [1.8 Upgrade Guide](1.8-upgrade-guide.md)
diff --git a/docs/30_release-notes/89_v2.0.10.md b/docs/30_release-notes/89_v2.0.10.md
deleted file mode 100644
index 5ddad16cc70..00000000000
--- a/docs/30_release-notes/89_v2.0.10.md
+++ /dev/null
@@ -1,41 +0,0 @@
----
-content_title: EOSIO v2.0.10 Release Notes
-link_text: v2.0.10
----
-
-This release contains security, stability, and miscellaneous fixes.
-
-## Security bug fixes
-
-### Consolidated Security Fixes for v2.0.10 ([#10091](https://github.com/EOSIO/eos/pull/10091))
-- Fix issue with account query db that could result in incorrect data or hung processes
-- Implement a Subjective CPU billing system that helps P2P and API nodes better respond to extreme network congestion
-
-Note: These security fixes are relevant to all nodes on EOSIO blockchain networks.
-
-### Notes on Subjective CPU Billing
-
-This system consists of two primary features: a subjective (node local) view of spent CPU resources that are not yet accounted for by the blockchain that allows individual nodes to predict what resource consumption will be and, a subjective penalty system to offset work done in service of erroneous or malicious transactions.
-
-The subjective view of CPU resources will synchronize with the resources present in the blockchain as it discovers the true CPU billing for transactions it has already accounted for.
-
-The system will also accumulate CPU resources spent on failing transactions that will not be relayed in a decaying "subjective penalty" which can protect the individual nodes from abusive actors while remaining tolerant to occasional mistakes.
-
-Subjective billing defaults to active and can be disabled with the `disable-subjective-billing` configuration in `config.ini` or on the command line.
-
-## Stability bug fixes
-- ([#9985](https://github.com/EOSIO/eos/pull/9985)) EPE-389 net_plugin stall during head catchup - merge release/2.0.x
-
-## Other changes
-- ([#9894](https://github.com/EOSIO/eos/pull/9894)) EOS VM OC: Support LLVM 11 - 2.0
-- ([#9911](https://github.com/EOSIO/eos/pull/9911)) add step to the pipeline to build and push to dockerhub on release br…
-- ([#9944](https://github.com/EOSIO/eos/pull/9944)) Create eosio-debug-build Pipeline
-- ([#9969](https://github.com/EOSIO/eos/pull/9969)) Updating name for the new Docker hub repo EOSIO instead EOS
-- ([#9971](https://github.com/EOSIO/eos/pull/9971)) Fix pinned builds error due to obsolete LLVM repo
-- ([#10015](https://github.com/EOSIO/eos/pull/10015)) [release 2.0.x] Fix LRT triggers
-- ([#10026](https://github.com/EOSIO/eos/pull/10026)) EPE-165: Improve logic for unlinkable blocks while sync'ing
-- ([#10047](https://github.com/EOSIO/eos/pull/10047)) Reduce Docker Hub Manifest Queries
-- ([#10088](https://github.com/EOSIO/eos/pull/10088)) [release 2.0.x] Specify boost version for unpinned MacOS 10.14 builds
-
-## Documentation
-- ([#10011](https://github.com/EOSIO/eos/pull/10011)) [docs] Update various cleos how-tos and fix index - 2.0
diff --git a/docs/30_release-notes/90_v2.0.9.md b/docs/30_release-notes/90_v2.0.9.md
deleted file mode 100644
index f3c27400392..00000000000
--- a/docs/30_release-notes/90_v2.0.9.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-content_title: EOSIO v2.0.9 Release Notes
-link_text: v2.0.9
----
-
-This release contains security and miscellaneous fixes.
-
-## Security bug fixes
-
-### Consolidated Security Fixes for 2.0.9 ([#9841](https://github.com/EOSIO/eos/pull/9841))
-- Fixes to packed_transaction cache
-- Transaction account fail limit refactor
-
-Note: These security fixes are relevant to all nodes on EOSIO blockchain networks.
-
-## Other Changes
-- ([#9803](https://github.com/EOSIO/eos/pull/9803)) Fix stdout console logging: Merge back #9582 to 2.0.x
diff --git a/docs/30_release-notes/91_v2.0.8.md b/docs/30_release-notes/91_v2.0.8.md
deleted file mode 100644
index ecf5bad0b07..00000000000
--- a/docs/30_release-notes/91_v2.0.8.md
+++ /dev/null
@@ -1,59 +0,0 @@
----
-content_title: EOSIO v2.0.8 Release Notes
-link_text: v2.0.8
----
-
-This release contains security, stability, and miscellaneous fixes.
-
-## Security bug fixes
-
-### Consolidated Security Fixes for 2.0.8 ([#9745](https://github.com/EOSIO/eos/pull/9745))
-
-- Adjust eos-vm-oc string intrinsic to perform as intended.
-- Adjust CPU validation logic for unapplied transactions.
-
-Note: These security fixes are relevant to all nodes on EOSIO blockchain networks.
-
-## Stability bug fixes
-- ([#9370](https://github.com/EOSIO/eos/pull/9370)) set medium priority for process signed block - 2.0.x
-- ([#9382](https://github.com/EOSIO/eos/pull/9382)) Handle case newaccount in Account Query DB
-- ([#9412](https://github.com/EOSIO/eos/pull/9412)) port the fix of flight bytes bug into release/2.0.x
-- ([#9423](https://github.com/EOSIO/eos/pull/9423)) Update to fc with variant blob fix - 2.0
-- ([#9441](https://github.com/EOSIO/eos/pull/9441)) Fix app() shutdown - 2.0
-- ([#9516](https://github.com/EOSIO/eos/pull/9516)) Keep http_plugin_impl alive while connection objects are alive - 2.0
-- ([#9624](https://github.com/EOSIO/eos/pull/9624)) Fixing typos on injected params for `producer_plugin::log_failed_tran…
-
-## Other Changes
-- ([#9304](https://github.com/EOSIO/eos/pull/9304)) relaxing the on_notify constraint to *
-- ([#9311](https://github.com/EOSIO/eos/pull/9311)) Track Source Files Excluded from Code Coverage Reports
-- ([#9314](https://github.com/EOSIO/eos/pull/9314)) Prevent an older version of g++ to build eosio
-- ([#9334](https://github.com/EOSIO/eos/pull/9334)) Add missing comma in loggers array
-- ([#9399](https://github.com/EOSIO/eos/pull/9399)) [2.0.x] Fix docker tags when building forked PRs
-- ([#9638](https://github.com/EOSIO/eos/pull/9638)) Migrate CI from Docker Hub to Amazon ECR
-- ([#9657](https://github.com/EOSIO/eos/pull/9657)) CI: Fix Serial Test Bug + Simplification + UX
-- ([#9665](https://github.com/EOSIO/eos/pull/9665)) Add "Testing Changes" Section to Pull Request Template
-
-## Documentation
-- ([#9323](https://github.com/EOSIO/eos/pull/9323)) [docs] Remove unneeded options for nodeos replays - 2.0
-- ([#9322](https://github.com/EOSIO/eos/pull/9322)) [docs] Remove redundant nodeos replay example - 2.0
-- ([#9373](https://github.com/EOSIO/eos/pull/9373)) [docs] Fix broken link in Wallet API plugin - 2.0
-- ([#9464](https://github.com/EOSIO/eos/pull/9464)) [docs] Create nodeos concepts folder and rearrange folders - 2.0
-- ([#9479](https://github.com/EOSIO/eos/pull/9479)) [docs] Add explainers on CFD, eosio utilities, eosio-blocklog - 2.0
-- ([#9487](https://github.com/EOSIO/eos/pull/9487)) [docs] Minor edits on CFD explainer and eosio-blocklog reference - 2.0
-- ([#9488](https://github.com/EOSIO/eos/pull/9488)) [docs] Fix how-tos for delegating cpu/net with cleos - 2.0
-- ([#9491](https://github.com/EOSIO/eos/pull/9491)) [docs] Add EOSIO upgrade guide 2.0 to dev portal
-- ([#9492](https://github.com/EOSIO/eos/pull/9492)) Add explicit left nav link for eosio 2.0 upgrade guide - 2.0
-- ([#9496](https://github.com/EOSIO/eos/pull/9496)) [docs] Add eosio 2.0 release notes to dev portal - 2.0
-- ([#9498](https://github.com/EOSIO/eos/pull/9498)) [docs] Add trace_api_util reference to eosio utilities docs - 2.0
-- ([#9503](https://github.com/EOSIO/eos/pull/9503)) [docs] Add slices, trace log, clog format explainers to Trace API plugin - 2.0
-- ([#9584](https://github.com/EOSIO/eos/pull/9584)) [docs] Update cleos get table reference - 2.0
-- ([#9592](https://github.com/EOSIO/eos/pull/9592)) [docs] Various additions/fixes to cleos reference - 2.0
-- ([#9602](https://github.com/EOSIO/eos/pull/9602)) [docs] Fix broken anchor link on MacOS build from source - 2.0
-- ([#9627](https://github.com/EOSIO/eos/pull/9627)) [docs] Update get_table_* reference in Chain API - 2.0
-- ([#9753](https://github.com/EOSIO/eos/pull/9753)) [docs] Update URL in net_api_plugin description - 2.0
-- ([#9754](https://github.com/EOSIO/eos/pull/9754)) [docs] Update some chain_api_plugin descriptions - 2.0
-- ([#9756](https://github.com/EOSIO/eos/pull/9756)) [docs] Remove sudo command from install/uninstall script instructions - 2.0
-
-## Thanks!
-Special thanks to the community contributors that submitted patches for this release:
-- @nsjames
diff --git a/docs/30_release-notes/92_v2.0.7.md b/docs/30_release-notes/92_v2.0.7.md
deleted file mode 100644
index b92acb66f11..00000000000
--- a/docs/30_release-notes/92_v2.0.7.md
+++ /dev/null
@@ -1,30 +0,0 @@
----
-content_title: EOSIO v2.0.7 Release Notes
-link_text: v2.0.7
----
-
-This release contains stability and miscellaneous fixes.
-
-## Stability bug fixes
-- ([#9223](https://github.com/EOSIO/eos/pull/9223)) Fix log of pending block producer - 2.0
-
-## Changes
-
-### The following logger has been added: `transaction_failure_tracing`. ([#9252](https://github.com/EOSIO/eos/pull/9252))
-
-A detailed log that emits failed verdicts from relay nodes on the P2P network. In addition, it adds a logging statement for a failed signature condition.
-
-### New config file option: `max-nonprivileged-inline-action-size`. ([#9262](https://github.com/EOSIO/eos/pull/9262))
-
-This option is the cap for the size of an inline action above which a transaction will subjectively fail; the default value is 4KB.
-
-## Other Changes
-- ([#9170](https://github.com/EOSIO/eos/pull/9170)) Fix onblock trace tracking - 2.0
-- ([#9201](https://github.com/EOSIO/eos/pull/9201)) [2.0.x] Anka version bump
-- ([#9265](https://github.com/EOSIO/eos/pull/9265)) Remove Concurrency Groups for Scheduled Builds
-
-## Documentation
-- ([#9124](https://github.com/EOSIO/eos/pull/9124)) Update the authority example
-- ([#9275](https://github.com/EOSIO/eos/pull/9275)) [docs] New threshold for non privileged inline actions - 2.0
-- ([#9288](https://github.com/EOSIO/eos/pull/9288)) [docs] Fix character formatting in nodeos CLI option - 2.0
-- ([#9290](https://github.com/EOSIO/eos/pull/9290)) [docs] Correct Producer API title in RPC reference - 2.0
diff --git a/docs/30_release-notes/93_v2.0.6.md b/docs/30_release-notes/93_v2.0.6.md
deleted file mode 100644
index 97815d56bf9..00000000000
--- a/docs/30_release-notes/93_v2.0.6.md
+++ /dev/null
@@ -1,74 +0,0 @@
----
-content_title: EOSIO v2.0.6 Release Notes
-link_text: v2.0.6
----
-
-This release contains security, stability, and miscellaneous fixes.
-
-## Security bug fixes
-
-- ([#9172](https://github.com/EOSIO/eos/pull/9172)) Escape Unicode C1 control code points.
-
-Note: These security fixes are relevant to API nodes on EOSIO blockchain networks.
-
-## Stability bug fixes
-
-- ([#9065](https://github.com/EOSIO/eos/pull/9065)) Fix for cleos and keosd race condition - 2.0
-- ([#9089](https://github.com/EOSIO/eos/pull/9089)) make ship WA key serialization match expected serialization - 2.0
-- ([#9095](https://github.com/EOSIO/eos/pull/9095)) fix gcc10 build due to libyubihsm problem - 2.0
-- ([#9127](https://github.com/EOSIO/eos/pull/9127)) Fix onblock handling in trace_api_plugin - 2.0
-- ([#9129](https://github.com/EOSIO/eos/pull/9129)) GCC 8.3 on CentOS 7 compiler workaround - 2.0
-- ([#9128](https://github.com/EOSIO/eos/pull/9128)) Restore abi_serializer backward compatibility - 2.0
-
-## Changes
-
-### Add more information in trace-api-plugin responses for better usage. ([#9005](https://github.com/EOSIO/eos/pull/9005))
-
-Adds `transaction_mroot`, `action_mroot` and `schedule_version` in block trace. Also adds `status`, `cpu_usage_us`, `net_usage_words`, `signatures`, and `transaction_header` in transaction trace.
-
-### New RPC endpoint **`get_accounts_by_authorizers`** ([#8899](https://github.com/EOSIO/eos/pull/8899))
-
-New optional RPC endpoint **`POST /v1/chain/get_accounts_by_authorizers`** added to `chain_api_plugin` that provides a super-set of the deprecated `history_api_plugin`'s `get_key_accounts` and `get_controlled_accounts` RPC methods.
-
-Flag to enable endpoint (default false): **`--enable-account-queries`**
-
-## Other Changes
-
-- ([#8975](https://github.com/EOSIO/eos/pull/8975)) failing nodeos_run_test when core symbol is not SYS - 2.0
-- ([#9002](https://github.com/EOSIO/eos/pull/9002)) Support Triggering a Build that Runs ALL Tests in One Build
-- ([#9007](https://github.com/EOSIO/eos/pull/9007)) Improved reporting in nodeos_forked_chain_lr_test - 2.0.x
-- ([#9013](https://github.com/EOSIO/eos/pull/9013)) Bugfix for uninitialized variable in cleos - 2.0
-- ([#9009](https://github.com/EOSIO/eos/pull/9009)) Upgrade CLI11 to 1.9.0 - 2.0
-- ([#9028](https://github.com/EOSIO/eos/pull/9028)) Fix keosd auto-launching after CLI11 upgrade - 2.0
-- ([#9035](https://github.com/EOSIO/eos/pull/9035)) For Release 2.0 - Updated the priority of the APIs in producer_api_plugin and net_api_plugin to MEDIUM_HIGH
-- ([#9049](https://github.com/EOSIO/eos/pull/9049)) add rapidjson license to install - 2.0
-- ([#9052](https://github.com/EOSIO/eos/pull/9052)) Print stderr if keosd_auto_launch_test.py fails - 2.0
-- ([#9060](https://github.com/EOSIO/eos/pull/9060)) Fix uninitialized struct members used as CLI flags - 2.0
-- ([#9062](https://github.com/EOSIO/eos/pull/9062)) Fix timedelta and strftime usage - 2.0
-- ([#9078](https://github.com/EOSIO/eos/pull/9078)) Update date in LICENSE - 2.0
-- ([#9063](https://github.com/EOSIO/eos/pull/9063)) add help text to wasm-runtime - 2.0.x
-- ([#9084](https://github.com/EOSIO/eos/pull/9084)) Add support for specifing a logging.json to keosd - 2.0
-- ([#9082](https://github.com/EOSIO/eos/pull/9082)) Add change type to pull request template - 2.0
-- ([#8899](https://github.com/EOSIO/eos/pull/8899)) Account Query DB : Proposal to maintain get_(key|controlled)_accounts [2.0]
-- ([#9103](https://github.com/EOSIO/eos/pull/9103)) Add default contract name clarifier in how to deploy smart contract - 2.0
-- ([#9109](https://github.com/EOSIO/eos/pull/9109)) [2.0.x] Bump Anka plugin version and timeouts.
-- ([#9115](https://github.com/EOSIO/eos/pull/9115)) Simplify create_snapshot POST request - 2.0
-- ([#9110](https://github.com/EOSIO/eos/pull/9110)) Update algorithm for determining number of parallel jobs - 2.0
-
-## Documentation
-
-- ([#8980](https://github.com/EOSIO/eos/pull/8980)) Add nodeos RPC API index, improve nodeos implementation doc, fix link - 2.0
-- ([#8995](https://github.com/EOSIO/eos/pull/8995)) Update example logging.json - 2.0
-- ([#9102](https://github.com/EOSIO/eos/pull/9102)) Fix inaccurate nodeos reference in wallet_api_plugin - 2.0
-- ([#9116](https://github.com/EOSIO/eos/pull/9116)) Replace inaccurate wording in how to replay from snapshot - 2.0
-- ([#9113](https://github.com/EOSIO/eos/pull/9113)) Add trace_api logger to docs - 2.0
-- ([#9142](https://github.com/EOSIO/eos/pull/9142)) Add missing reference to RPC API index [docs] - 2.0
-- ([#9141](https://github.com/EOSIO/eos/pull/9141)) Fix Trace API reference request/response inaccuracies [docs] - 2.0
-- ([#9144](https://github.com/EOSIO/eos/pull/9144)) Fix title case issue in keosd how-to [docs] - 2.0
-- ([#9145](https://github.com/EOSIO/eos/pull/9145)) Add conditional step in state history plugin how-to [docs] - 2.0
-
-## Thanks!
-
-Special thanks to the community contributors that submitted patches for this release:
-- @cc32d9
-- @oldcold
diff --git a/docs/30_release-notes/94_v2.0.5.md b/docs/30_release-notes/94_v2.0.5.md
deleted file mode 100644
index 2a912715ad1..00000000000
--- a/docs/30_release-notes/94_v2.0.5.md
+++ /dev/null
@@ -1,65 +0,0 @@
----
-content_title: EOSIO v2.0.5 Release Notes
-link_text: v2.0.5
----
-
-This release contains security, stability, and miscellaneous fixes.
-
-## Security bug fixes
-
-### Consolidated Security Fixes for 2.0.5 ([#8983](https://github.com/EOSIO/eos/pull/8983))
-
-- EOS-VM security fixes
-
-Note: These security fixes are relevant to all nodes on EOSIO blockchain networks.
-
-## Stability bug fixes
-
-- ([#8826](https://github.com/EOSIO/eos/pull/8826)) trace_api_plugin yield timeout - 2.0
-- ([#8836](https://github.com/EOSIO/eos/pull/8836)) fix potential leak in OC's wrapped_fd move assignment op - 2.0
-
-## Changes
-
-### Trace API Compressed Data Log Support ([#8826](https://github.com/EOSIO/eos/pull/8826), [#8837](https://github.com/EOSIO/eos/pull/8837), [#8881](https://github.com/EOSIO/eos/pull/8881))
-
-Compressed file support was added to `trace_api_plugin`. See ([#8837](https://github.com/EOSIO/eos/pull/8837)) for more details.
-
-The RPC call `v1/trace_api/get_block` now has "async" http support. Therefore, executing `get_block` no longer runs on the main application thread but on the configurable `http-threads` thread pool.
-
-Additionally, `trace_api_plugin` now respects `http-max-response-time-ms` for limiting response time of RPC call `v1/trace_api/get_block`. It is very likely that the default value of `http-max-response-time-ms` will not be appropriate for large blocks and will need to be increased.
-
-## Other Changes
-
-- ([#8822](https://github.com/EOSIO/eos/pull/8822)) Merge minimize logging changes to 2.0.x
-- ([#8823](https://github.com/EOSIO/eos/pull/8823)) yield_function for abi_serializer - 2.0
-- ([#8855](https://github.com/EOSIO/eos/pull/8855)) Improve too many bytes in flight error info - 2.0
-- ([#8861](https://github.com/EOSIO/eos/pull/8861)) HTTP Plugin async APIs [2.0]
-- ([#8873](https://github.com/EOSIO/eos/pull/8873)) Fix spurious HTTP related test failure [2.0] (round 3)
-- ([#8883](https://github.com/EOSIO/eos/pull/8883)) wabt: don't search for python because we don't run tests - 2.0
-- ([#8884](https://github.com/EOSIO/eos/pull/8884)) Correctly Sanitize git Branch and Tag Names
-- ([#8894](https://github.com/EOSIO/eos/pull/8894)) Increase get info priority to medium high
-- ([#8889](https://github.com/EOSIO/eos/pull/8889)) Sync from snapshot - 2.0
-- ([#8906](https://github.com/EOSIO/eos/pull/8906)) Remove assert check for error code 400 - release 2.0.x
-- ([#8944](https://github.com/EOSIO/eos/pull/8944)) noop change to macos-10.14-unpinned.sh to regen CI image, 2.0
-- ([#8941](https://github.com/EOSIO/eos/pull/8941)) replace boost::bind with std::bind, fixing boost 1.73beta builds - 2.0
-- ([#8954](https://github.com/EOSIO/eos/pull/8954)) llvm 10 support for EOS VM OC - 2.0
-- ([#8949](https://github.com/EOSIO/eos/pull/8949)) Replace bc with shell arithmetic - 2.0
-- ([#8962](https://github.com/EOSIO/eos/pull/8962)) tests/get_table_tests.cpp: incorrect use of CORE_SYM_STR - 2.0
-- ([#8963](https://github.com/EOSIO/eos/pull/8963)) Make /bin/df ignore $BLOCKSIZE - 2.0
-- ([#8952](https://github.com/EOSIO/eos/pull/8952)) Fix SHIP block delay - 2.0
-- ([#8972](https://github.com/EOSIO/eos/pull/8972)) Add possibility to run .cicd scripts from different environments (2.0.x Backport)
-- ([#8968](https://github.com/EOSIO/eos/pull/8968)) Support Running ALL Tests in One Build
-
-## Documentation changes
-
-- ([#8825](https://github.com/EOSIO/eos/pull/8825)) remove leading $ chars from shell codeblocks in README.md - 2.0
-- ([#8835](https://github.com/EOSIO/eos/pull/8835)) Trace API documentation update - 2.0
-- ([#8843](https://github.com/EOSIO/eos/pull/8843)) Fix double titles for release 2.0.x
-- ([#8845](https://github.com/EOSIO/eos/pull/8845)) [docs] trace api reference api correction - 2.0
-- ([#8918](https://github.com/EOSIO/eos/pull/8918)) Updates to manual build instructions - 2.0
-
-## Thanks!
-
-Special thanks to the community contributors that submitted patches for this release:
-- @cc32d9
-- @maoueh
diff --git a/docs/30_release-notes/95_v2.0.4.md b/docs/30_release-notes/95_v2.0.4.md
deleted file mode 100644
index 6906b87069b..00000000000
--- a/docs/30_release-notes/95_v2.0.4.md
+++ /dev/null
@@ -1,88 +0,0 @@
----
-content_title: EOSIO v2.0.4 Release Notes
-link_text: v2.0.4
----
-
-This release contains stability and miscellaneous fixes.
-
-## Deprecation Notices
-
-The `read-only` option for the `read-mode` parameter in `nodeos` has been deprecated. It is possible to achieve the same behavior with `read-mode = head`, `p2p-accept-transactions = false`, and `api-accept-transactions = false`. See the sub-section "Accept transactions options" below for more details.
-
-Please refer to the [Consolidated EOSIO Deprecations List](https://github.com/EOSIO/eos/issues/7597) for the currently active set of deprecation notices.
-
-## Stability bug fixes
-
-- ([#8684](https://github.com/EOSIO/eos/pull/8684)) Net plugin sync priority - 2.0
-- ([#8729](https://github.com/EOSIO/eos/pull/8729)) Get info priority - 2.0
-
-## Changes
-
-### Trace API Plugin ([#8800](https://github.com/EOSIO/eos/pull/8800))
-
-This release contains the first official release of the Trace API Plugin. This plugin is an optional addition to `nodeos` that stores a tailored view of the transactions and actions that execute on the chain retrievable at a block level. The Trace API focuses on operational maintainability storing data on the filesystem instead of in RAM like the deprecated `history-plugin` and organizing that data such that operators can easily prune old data without disrupting operations.
-
-For more information, see the PR notes and the official documentation.
-
-### Exit transaction early when there is insufficient account CPU ([#8638](https://github.com/EOSIO/eos/pull/8638))
-
-`nodeos` no longer considers a transaction for inclusion in a block in the process of being produced if the billed account(s) do not have sufficient CPU available to cover the previously estimated CPU usage of the transaction (only if a previous estimate for CPU usage is available).
-
-### Produce block immediately if resource limits are exhausted ([#8651](https://github.com/EOSIO/eos/pull/8651), [#8673](https://github.com/EOSIO/eos/pull/8673))
-
-`nodeos` now immediately produces a block if either the CPU or NET usage thresholds are exceeded. This change includes a fix for dropping late blocks starting 50ms earlier than the block production window.
-
-New options:
-* `max-block-cpu-usage-threshold-us`:
-Threshold (in microseconds) of CPU block production to consider block full; when accumulated CPU usage within a block is less than `max-block-cpu-usage-threshold-us` away from `max-block-cpu-usage`, the block can be produced immediately. Default value is 5000.
-* `max-block-net-usage-threshold-bytes`:
-Threshold (in bytes) of NET block production to consider block full; when accumulated NET usage within a block is less than `max-block-net-usage-threshold-us` away from `max-block-net-usage`, the block can be produced immediately. Default value is 1024.
-
-### Accept transactions options ([#8702](https://github.com/EOSIO/eos/pull/8702))
-
-New options:
-* `p2p-accept-transactions`: Allow transactions received over p2p
-network to be evaluated and relayed if valid. Default is true.
-* `api-accept-transactions`: Allow API transactions to be evaluated
-and relayed if valid. Default is true.
-
-Provides ability to have a `read-mode = head` with `p2p-accept-transactions = false` and `api-accept-transactions = true`. This combination creates an efficient API node that is not burdened with processing P2P transactions.
-
-The same behavior of the now deprecated `read-mode = read-only` can be achieved with `read-mode = head` by setting `p2p-accept-transactions = false` and `api-accept-transactions = false`.
-
-**WARNING:** Use of `read-mode = irreversible` now requires setting `p2p-accept-transactions = false` and `api-accept-transactions = false` to avoid assertion at startup.
-
-### Relay block early ([#8701](https://github.com/EOSIO/eos/pull/8701))
-
-Improve block relaying performance when a block is from a trusted producer or if `nodeos` is running in light validation mode. This is achieved by relaying the block as soon as block header validation is complete (but before full block application/validation).
-
-## Other Changes
-
-- ([#8654](https://github.com/EOSIO/eos/pull/8654)) Fix format message. - 2.0
-- ([#8668](https://github.com/EOSIO/eos/pull/8668)) Add troubleshooting item for PREACTIVATE_FEATURE protocol
-- ([#8689](https://github.com/EOSIO/eos/pull/8689)) incoming-defer-ratio description - 2.0
-- ([#8695](https://github.com/EOSIO/eos/pull/8695)) [2.0.x] Community PR tweaks.
-- ([#8700](https://github.com/EOSIO/eos/pull/8700)) [2.0.x] Base images pipeline.
-- ([#8714](https://github.com/EOSIO/eos/pull/8714)) [2.0.x] Actions rerun fixes.
-- ([#8710](https://github.com/EOSIO/eos/pull/8710)) Add block producing explainer doc - 2.0
-- ([#8721](https://github.com/EOSIO/eos/pull/8721)) Fix multiple version protocol test intermittent failure - 2.0
-- ([#8727](https://github.com/EOSIO/eos/pull/8727)) Update the getting started link [merge 2]
-- ([#8752](https://github.com/EOSIO/eos/pull/8752)) chain_api_plugin swagger file - 2.0
-- ([#8756](https://github.com/EOSIO/eos/pull/8756)) Fixes #8600 clean up nodeos options section
-- ([#8757](https://github.com/EOSIO/eos/pull/8757)) link cleos net status reference doc with the peer network protocol doc
-- ([#8590](https://github.com/EOSIO/eos/pull/8590)) db_size_api_plugin swagger file - 2.0
-- ([#8591](https://github.com/EOSIO/eos/pull/8591)) net_api_plugin swagger file - 2.0
-- ([#8592](https://github.com/EOSIO/eos/pull/8592)) producer_api_plugin swagger file - 2.0
-- ([#8593](https://github.com/EOSIO/eos/pull/8593)) test_control_api_plugin swagger file - 2.0
-- ([#8754](https://github.com/EOSIO/eos/pull/8754)) swagger configuration for docs - 2.0
-- ([#8762](https://github.com/EOSIO/eos/pull/8762)) Fix broken link in producer plugin docs - 2.0
-- ([#8763](https://github.com/EOSIO/eos/pull/8763)) Fix wasm-runtime option parameters - 2.0
-- ([#8765](https://github.com/EOSIO/eos/pull/8765)) Add Incoming-defer-ratio description - 2.0
-- ([#8767](https://github.com/EOSIO/eos/pull/8767)) Fix other blocks.log callout - 2.0
-- ([#8768](https://github.com/EOSIO/eos/pull/8768)) Improve create account description - 2.0
-- ([#8782](https://github.com/EOSIO/eos/pull/8782)) link to librt when using posix timers - 2.0
-- ([#8781](https://github.com/EOSIO/eos/pull/8781)) free unknown EOS VM OC codegen versions from the code cache - 2.0
-- ([#8794](https://github.com/EOSIO/eos/pull/8794)) disable EOS VM on non-x86 platforms - 2.0
-- ([#8803](https://github.com/EOSIO/eos/pull/8803)) Expire blacklisted scheduled transactions by LIB time - 2.0
-- ([#8811](https://github.com/EOSIO/eos/pull/8811)) Add initial Trace API plugin docs to nodeos - 2.0
-- ([#8814](https://github.com/EOSIO/eos/pull/8814)) Add RPC Trace API plugin reference to nodeos - 2.0
diff --git a/docs/30_release-notes/96_v2.0.3.md b/docs/30_release-notes/96_v2.0.3.md
deleted file mode 100644
index 1ba0a6ffb22..00000000000
--- a/docs/30_release-notes/96_v2.0.3.md
+++ /dev/null
@@ -1,29 +0,0 @@
----
-content_title: EOSIO v2.0.3 Release Notes
-link_text: v2.0.3
----
-
-This release contains security, stability, and miscellaneous fixes.
-
-## Security bug fixes
-
-### Consolidated Security Fixes for 2.0.3 ([#8643](https://github.com/EOSIO/eos/pull/8643))
-
-- Add deadline to base58 encoding.
-
-Note: These security fixes are relevant to all nodes on EOSIO blockchain networks.
-
-## Stability bug fixes
-
-- ([#8617](https://github.com/EOSIO/eos/pull/8617)) Init net_plugin member variables - 2.0
-
-## Other Changes
-
-- ([#8606](https://github.com/EOSIO/eos/pull/8606)) Skip sync from genesis and resume from state test on tagged builds
-- ([#8612](https://github.com/EOSIO/eos/pull/8612)) [2.0.x] Actions for community PRs.
-- ([#8633](https://github.com/EOSIO/eos/pull/8633)) remove brew's python@2 install - 2.0
-- ([#8636](https://github.com/EOSIO/eos/pull/8636)) bump script's macos version check to 10.14 - 2.0
-
-## Deprecation notice reminder
-
-Please refer to the [Consolidated EOSIO Deprecations List](https://github.com/EOSIO/eos/issues/7597) for the currently active set of deprecation notices.
diff --git a/docs/30_release-notes/97_v2.0.2.md b/docs/30_release-notes/97_v2.0.2.md
deleted file mode 100644
index c9707f171cc..00000000000
--- a/docs/30_release-notes/97_v2.0.2.md
+++ /dev/null
@@ -1,46 +0,0 @@
----
-content_title: EOSIO v2.0.2 Release Notes
-link_text: v2.0.2
----
-
-This release contains security, stability, and miscellaneous fixes.
-
-## Security bug fixes
-
-### Consolidated Security Fixes for 2.0.2 ([#8595](https://github.com/EOSIO/eos/pull/8595))
-
-- Restrict allowed block signature types.
-
-Note: These security fixes are relevant to all nodes on EOSIO blockchain networks.
-
-## Stability bug fixes
-
-- ([#8526](https://github.com/EOSIO/eos/pull/8526)) Handle socket close before async callback - 2.0
-- ([#8546](https://github.com/EOSIO/eos/pull/8546)) Net plugin dispatch - 2.0
-- ([#8552](https://github.com/EOSIO/eos/pull/8552)) Net plugin unlinkable blocks - 2.0
-- ([#8560](https://github.com/EOSIO/eos/pull/8560)) Backport of 8056 to 2.0
-- ([#8561](https://github.com/EOSIO/eos/pull/8561)) Net plugin post - 2.0
-- ([#8564](https://github.com/EOSIO/eos/pull/8564)) Delayed production time - 2.0
-
-## Changes
-
-### Limit block production window ([#8571](https://github.com/EOSIO/eos/pull/8571), [#8578](https://github.com/EOSIO/eos/pull/8578))
-
-The new options `cpu-effort-percent` and `last-block-cpu-effort-percent` now provide a mechanism to restrict the amount of time a producer is processing transactions for inclusion into a block. It also controls the time a producer will finalize/produce and transmit a block. Block construction now always begins at whole or half seconds for the next block.
-
-### Stricter signature parsing
-
-Versions of EOSIO prior to v2.0.x accept keys and signatures containing extra data at the end. In EOSIO v2.0.x, the Base58 string parser performs additional sanity checks on keys and signatures to make sure they do not contain more data than necessary. These stricter checks cause nodes to reject signatures generated by some transaction signing libraries; eosjs v20 is known to generate proper signatures. For more information see issue [#8534](https://github.com/EOSIO/eos/issues/8534).
-
-## Other Changes
-
-- ([#8555](https://github.com/EOSIO/eos/pull/8555)) Drop late check - 2.0
-- ([#8557](https://github.com/EOSIO/eos/pull/8557)) Read-only with drop-late-block - 2.0
-- ([#8568](https://github.com/EOSIO/eos/pull/8568)) Timestamp watermark slot - 2.0.x
-- ([#8577](https://github.com/EOSIO/eos/pull/8577)) [release 2.0.x] Documentation patch 1 update
-- ([#8583](https://github.com/EOSIO/eos/pull/8583)) P2p read only - 2.0
-- ([#8589](https://github.com/EOSIO/eos/pull/8589)) Producer plugin log - 2.0
-
-## Deprecation notice reminder
-
-Please refer to the [Consolidated EOSIO Deprecations List](https://github.com/EOSIO/eos/issues/7597) for the currently active set of deprecation notices.
diff --git a/docs/30_release-notes/88_v2.0.11.md b/docs/30_release-notes/97_v2.1.0-rc3.md
similarity index 65%
rename from docs/30_release-notes/88_v2.0.11.md
rename to docs/30_release-notes/97_v2.1.0-rc3.md
index 0bbd3fa7f99..64fe6c43c04 100644
--- a/docs/30_release-notes/88_v2.0.11.md
+++ b/docs/30_release-notes/97_v2.1.0-rc3.md
@@ -1,4 +1,4 @@
---
link: /30_release-notes/index.md
-link_text: v2.0.11
+link_text: v2.1.0-rc3
---
diff --git a/docs/30_release-notes/98_v2.0.1.md b/docs/30_release-notes/98_v2.0.1.md
deleted file mode 100644
index 755ef919c3c..00000000000
--- a/docs/30_release-notes/98_v2.0.1.md
+++ /dev/null
@@ -1,37 +0,0 @@
----
-content_title: EOSIO v2.0.1 Release Notes
-link_text: v2.0.1
----
-
-This release contains security, stability, and miscellaneous fixes.
-
-## Security bug fixes
-
-### Consolidated Security Fixes for 2.0.1 ([#8514](https://github.com/EOSIO/eos/pull/8514))
-
-- Earlier block validation for greater security.
-- Improved handling of deferred transactions during block production.
-- Reduce net plugin logging and handshake size limits.
-
-Note: These security fixes are relevant to all nodes on EOSIO blockchain networks.
-
-## Stability bug fixes
-
-- ([#8471](https://github.com/EOSIO/eos/pull/8471)) Remove new block id notify feature - 2.0
-- ([#8472](https://github.com/EOSIO/eos/pull/8472)) Report block header diff when digests do not match - 2.0
-- ([#8496](https://github.com/EOSIO/eos/pull/8496)) Drop late blocks - 2.0
-- ([#8510](https://github.com/EOSIO/eos/pull/8510)) http_plugin shutdown - 2.0
-
-## Other Changes
-
-- ([#8430](https://github.com/EOSIO/eos/pull/8430)) Update fc to fix crash in logging
-- ([#8435](https://github.com/EOSIO/eos/pull/8435)) [release/2.0.x] Update README.md and hotfix documentation links
-- ([#8452](https://github.com/EOSIO/eos/pull/8452)) [2.0.x] [CI/CD] Boost will not install without SDKROOT
-- ([#8457](https://github.com/EOSIO/eos/pull/8457)) [2.0.x] reverting fc
-- ([#8458](https://github.com/EOSIO/eos/pull/8458)) [2.0.x] Pipeline file for testing the build script
-- ([#8467](https://github.com/EOSIO/eos/pull/8467)) [2.0.x] Switching to using the EOSIO fork of anka-buildkite-plugin for security reasons
-- ([#8515](https://github.com/EOSIO/eos/pull/8515)) [2.0.x] Don't trigger LRT a second time
-
-## Deprecation notice reminder
-
-Please refer to the [Consolidated EOSIO Deprecations List](https://github.com/EOSIO/eos/issues/7597) for the currently active set of deprecation notices.
diff --git a/docs/30_release-notes/98_v2.1.0-rc2.md b/docs/30_release-notes/98_v2.1.0-rc2.md
new file mode 100644
index 00000000000..fcbd145c71d
--- /dev/null
+++ b/docs/30_release-notes/98_v2.1.0-rc2.md
@@ -0,0 +1,31 @@
+---
+content_title: EOSIO v2.1.0-rc2 Release Notes
+link_text: v2.1.0-rc2
+---
+
+This is a ***RELEASE CANDIDATE*** for version 2.1.0.
+
+This release contains security, stability, and miscellaneous fixes.
+
+## Security bug fixes
+- ([#9828](https://github.com/EOSIO/eos/pull/9828)) Fix packed transaction version conversion -- Release 2.1.x
+
+Note: This security fix is relevant to all nodes on EOSIO blockchain networks.
+
+## Stability bug fixes
+- ([#9811](https://github.com/EOSIO/eos/pull/9811)) Fix the truncate bug in Ship - 2.1
+- ([#9812](https://github.com/EOSIO/eos/pull/9812)) Fix snapshot test_compatible_versions failure and reenable it - release/2.1.x
+- ([#9813](https://github.com/EOSIO/eos/pull/9813)) fix balance transfer issue - release/2.1.x
+- ([#9829](https://github.com/EOSIO/eos/pull/9829)) Fix ship truncate problem with stride
+- ([#9835](https://github.com/EOSIO/eos/pull/9835)) Fix Ship backward compatibility issue
+- ([#9838](https://github.com/EOSIO/eos/pull/9838)) fix populating some information for get account
+
+## Other changes
+- ([#9801](https://github.com/EOSIO/eos/pull/9801)) Fix build script problem with older version of cmake
+- ([#9802](https://github.com/EOSIO/eos/pull/9802)) Add CentOS 8 Package Builder Step
+- ([#9820](https://github.com/EOSIO/eos/pull/9820)) Reduce logging for failed http plugin calls - 2.1
+
+## Documentation
+- ([#9818](https://github.com/EOSIO/eos/pull/9818)) [docs] Fix blockvault plugin explainer and C++ reference links - 2.1
+- ([#9806](https://github.com/EOSIO/eos/pull/9806)) [docs] Corrections to nodeos storage and read modes - 2.1
+- ([#9808](https://github.com/EOSIO/eos/pull/9808)) [docs] 2.1.x update link to chain plug-in to be relative
diff --git a/docs/30_release-notes/99_v2.0.0.md b/docs/30_release-notes/99_v2.0.0.md
deleted file mode 100644
index 6462f86fad7..00000000000
--- a/docs/30_release-notes/99_v2.0.0.md
+++ /dev/null
@@ -1,377 +0,0 @@
----
-content_title: EOSIO v2.0.0 Release Notes
-link_text: v2.0.0
----
-
-This release contains security, stability, and miscellaneous fixes.
-
-This release also includes an EOSIO consensus upgrade. Please see the "Consensus Protocol Upgrades" section below for details. These protocol upgrades necessitate a change to the state database structure which requires a nodeos upgrade process that involves more steps than in the case of most minor release upgrades. For details on the upgrade process, see the "Upgrading from previous versions of EOSIO" section below.
-
-## Security bug fixes
-
-### Consolidated Security Fixes for 2.0.0 ([#8420](https://github.com/EOSIO/eos/pull/8420))
-
-- Limit size of response to API requests
-- EOS VM fixes
-
-Note: These security fixes are relevant to all nodes on EOSIO blockchain networks.
-
-The above is in addition to the other security fixes that were introduced in prior release candidates for 2.0.0:
-
-- ([#8195](https://github.com/EOSIO/eos/pull/8195)) Consolidated Security Fixes for 2.0.0-rc2
-- ([#8344](https://github.com/EOSIO/eos/pull/8344)) Consolidated Security Fixes for 2.0.0-rc3
-
-## Stability bug fixes
-
-- ([#8399](https://github.com/EOSIO/eos/pull/8399)) Net plugin sync check - 2.0
-
-This above is in addition to the other stability fixes that were introduced in prior release candidates for 2.0.0:
-
-- ([#8084](https://github.com/EOSIO/eos/pull/8084)) Net plugin remove read delays - 2.0
-- ([#8099](https://github.com/EOSIO/eos/pull/8099)) net_plugin remove sync w/peer check - 2.0
-- ([#8120](https://github.com/EOSIO/eos/pull/8120)) Net plugin sync fix - 2.0
-- ([#8229](https://github.com/EOSIO/eos/pull/8229)) Net plugin sync
-- ([#8285](https://github.com/EOSIO/eos/pull/8285)) Net plugin handshake
-- ([#8298](https://github.com/EOSIO/eos/pull/8298)) net_plugin lib sync
-- ([#8303](https://github.com/EOSIO/eos/pull/8303)) net_plugin boost asio error handling
-- ([#8305](https://github.com/EOSIO/eos/pull/8305)) net_plugin thread protection peer logging variables
-- ([#8311](https://github.com/EOSIO/eos/pull/8311)) Fix race in fc::message_buffer and move message_buffer_tests to fc.
-- ([#8307](https://github.com/EOSIO/eos/pull/8307)) reset the new handler
-
-## Changes
-
-### EOS VM: New High Performance WASM Runtimes ([#7974](https://github.com/EOSIO/eos/pull/7974), [#7975](https://github.com/EOSIO/eos/pull/7975))
-Three new WASM runtimes are available in this release: EOS VM Interpreter, EOS VM Just In Time Compiler (JIT), and EOS VM Optimized Compiler.
-
-EOS VM Interpreter is a low latency interpreter and is included to enable future support for smart contract debuggers. EOS VM JIT is a low latency single pass compiler for x86_64 platforms. To use EOS VM Interpreter or EOS VM JIT, set the `wasm-runtime` to either `eos-vm` or `eos-vm-jit` respectively
-
-EOS VM Optimized Compiler is a high performance WASM _tier-up_ runtime available on the x86_64 Linux platform that works in conjunction with the configured baseline runtime (such as EOS VM JIT). When enabled via `eos-vm-oc-enable`, actions on a contract are initially dispatched to the baseline runtime while EOS VM Optimized Compiler does an optimized compilation in the background. Up to the configured `eos-vm-oc-compile-threads` compilations can be ongoing simultaneously. Once the background compilation is complete, actions on that contract will then be run with the optimized compiled code from then on. This optimized compile can take a handful of seconds but since it is performed in the background it does not cause delays. Optimized compilations are also saved to a new data file (`code_cache.bin` in the data directory) so when restarting nodeos there is no need to recompile previously compiled contracts.
-
-None of the EOS VM runtimes require a replay nor activation of any consensus protocol upgrades. They can be switched between (including enabling and disabling EOS VM Optimized Compiler) at will.
-
-At this time, **block producers should consider all running EOS VM JIT as the WASM runtime on their block producing nodes**. Other non-producing nodes should feel free to use the faster EOS VM Optimized Compiler runtime instead.
-
-### Consensus Protocol Upgrades
-
-Refer to this section on the [Upgrade Guide: Consensus Protocol Upgrades](../20_upgrade-guide/index.md#consensus-protocol-upgrades).
-
-### Multi-threaded net_plugin
-We have added multi-threading support to net_plugin. Almost all processing in the net_plugin (block propagation, transaction processing, block/transaction packing/unpacking etc.) are now handled by separate threads distinct from the main application thread. This significantly improves transaction processing and block processing performance on multi-producer EOSIO networks. The `net-threads` arg (defaults to 2) controls the number of worker threads in net_plugin thread pool.([#6845](https://github.com/EOSIO/eos/pull/6845), [#7598](https://github.com/EOSIO/eos/pull/7598), [#7392](https://github.com/EOSIO/eos/pull/7392), [#7786](https://github.com/EOSIO/eos/pull/7786) and related optimizations are available in: [#7686](https://github.com/EOSIO/eos/pull/7686), [#7785](https://github.com/EOSIO/eos/pull/7785), [#7721](https://github.com/EOSIO/eos/pull/7721), [#7825](https://github.com/EOSIO/eos/pull/7825), and [#7756](https://github.com/EOSIO/eos/pull/7756)).
-
-### Chain API Enhancements ([#7530](https://github.com/EOSIO/eos/pull/7530))
-The `uint128` and `int128` ABI types are now represented as decimal numbers rather than the old little-endian hexadecimal representation. This means that the JSON representation of table rows returned by the `get_table_rows` RPC will represent fields using this type differently than in prior versions. It also means that the `lower_bound` and `upper_bound` fields for `get_table_rows` RPC requests that search using a `uint128` secondary index will need to use the new decimal representation. This change makes the ABI serialization for `uint128` and `int128` ABI types consistent with [eosjs](https://github.com/EOSIO/eosjs) and [abieos](http://github.com/EOSIO/abieos).
-
-The `get_table_rows` RPC when used with secondary index types like `sha256`, `i256`, and `ripemd160` had bugs that scrambled the bytes in the `lower_bound` and `upper_bound` input field. This release now fixes these issues allowing clients to properly search for tables rows using these index types.
-
-A new field `next_key` has been added to the response of the `get_table_rows` RPC which represents the key of the next row (in the same format as `lower_bound` and `upper_bound`) that was not able to be returned in the response due to timeout limitations or the user-specified limit. The value of the `next_key` can be used as the `lower_bound` input for subsequent requests in order to retrieve a range of a large number of rows that could not be retrieved within just a single request.
-
-## Upgrading from previous versions of EOSIO
-
-Refer to this section on the [Upgrade Guide: Upgrading from previous versions of EOSIO](../20_upgrade-guide/index.md#upgrading-from-previous-versions-of-eosio).
-
-## Deprecation and Removal Notices
-
-### WAVM removed ([#8407](https://github.com/EOSIO/eos/pull/8407))
-
-The WAVM WebAssembly runtime was deprecated several months ago with the release of [EOSIO v2.0.0-rc1](https://github.com/EOSIO/eos/releases/tag/v2.0.0-rc1) which introduced EOS VM. Now with the release of a stable version 2.0.0, EOS VM (JIT or Optimized Compiler variants) can be used instead of WAVM. So WAVM has now been removed as a WASM runtime option from nodeos.
-
-### Deprecation notice reminder
-
-Please refer to the [Consolidated EOSIO Deprecations List](https://github.com/EOSIO/eos/issues/7597) for the currently active set of deprecation notices.
-
-## Other Changes
-
-- ([#7247](https://github.com/EOSIO/eos/pull/7247)) Change default log level from debug to info. - develop
-- ([#7238](https://github.com/EOSIO/eos/pull/7238)) Remove unused cpack bits; these are not being used
-- ([#7248](https://github.com/EOSIO/eos/pull/7248)) Pass env to build script installs
-- ([#6913](https://github.com/EOSIO/eos/pull/6913)) Block log util#6884
-- ([#7249](https://github.com/EOSIO/eos/pull/7249)) Http configurable logging
-- ([#7255](https://github.com/EOSIO/eos/pull/7255)) Move Test Metrics Code to Agent
-- ([#7217](https://github.com/EOSIO/eos/pull/7217)) Created Universal Pipeline Configuration File
-- ([#7264](https://github.com/EOSIO/eos/pull/7264)) use protocol-features-sync-nodes branch for LRT pipeline - develop
-- ([#7207](https://github.com/EOSIO/eos/pull/7207)) Optimize mongodb plugin
-- ([#7276](https://github.com/EOSIO/eos/pull/7276)) correct net_plugin's win32 check
-- ([#7279](https://github.com/EOSIO/eos/pull/7279)) build unittests in c++17, not c++14
-- ([#7282](https://github.com/EOSIO/eos/pull/7282)) Fix cleos REX help - develop
-- ([#7284](https://github.com/EOSIO/eos/pull/7284)) remove boost asio string_view workaround
-- ([#7286](https://github.com/EOSIO/eos/pull/7286)) chainbase uniqueness violation fixes
-- ([#7287](https://github.com/EOSIO/eos/pull/7287)) restrict range of error codes that contracts are allowed to emit
-- ([#7278](https://github.com/EOSIO/eos/pull/7278)) simplify openssl setup in cmakelists
-- ([#7288](https://github.com/EOSIO/eos/pull/7288)) Changes for Boost 1_70_0
-- ([#7285](https://github.com/EOSIO/eos/pull/7285)) Use of Mac Anka Fleet instead of iMac fleet
-- ([#7293](https://github.com/EOSIO/eos/pull/7293)) Update EosioTester.cmake.in (develop)
-- ([#7290](https://github.com/EOSIO/eos/pull/7290)) Block log util test
-- ([#6845](https://github.com/EOSIO/eos/pull/6845)) Net plugin multithread
-- ([#7295](https://github.com/EOSIO/eos/pull/7295)) Modify the pipeline control file for triggered builds
-- ([#7305](https://github.com/EOSIO/eos/pull/7305)) Eliminating trigger to allow for community PR jobs to run again
-- ([#7306](https://github.com/EOSIO/eos/pull/7306)) when unable to find mongo driver stop cmake
-- ([#7309](https://github.com/EOSIO/eos/pull/7309)) add debug_mode to state history plugin - develop
-- ([#7310](https://github.com/EOSIO/eos/pull/7310)) Switched to git checkout of commit + supporting forked repo
-- ([#7291](https://github.com/EOSIO/eos/pull/7291)) add DB guard check for nodeos_under_min_avail_ram.py
-- ([#7240](https://github.com/EOSIO/eos/pull/7240)) add signal tests
-- ([#7315](https://github.com/EOSIO/eos/pull/7315)) Add REX balance info to cleos get account command
-- ([#7304](https://github.com/EOSIO/eos/pull/7304)) transaction_metadata thread safety
-- ([#7321](https://github.com/EOSIO/eos/pull/7321)) Only call init if system contract is loaded
-- ([#7275](https://github.com/EOSIO/eos/pull/7275)) remove win32 from CMakeLists.txt
-- ([#7322](https://github.com/EOSIO/eos/pull/7322)) Fix under min avail ram test
-- ([#7327](https://github.com/EOSIO/eos/pull/7327)) fix block serialization order in fork_database::close - develop
-- ([#7331](https://github.com/EOSIO/eos/pull/7331)) Use debug level logging for --verbose
-- ([#7325](https://github.com/EOSIO/eos/pull/7325)) Look in both lib and lib64 for CMake modules when building EOSIO Tester
-- ([#7337](https://github.com/EOSIO/eos/pull/7337)) correct signed mismatch warning in http_plugin
-- ([#7348](https://github.com/EOSIO/eos/pull/7348)) Anka develop fix
-- ([#7320](https://github.com/EOSIO/eos/pull/7320)) Add test for various chainbase objects which contain fields that require dynamic allocation
-- ([#7350](https://github.com/EOSIO/eos/pull/7350)) correct signed mismatch warning in chain controller
-- ([#7356](https://github.com/EOSIO/eos/pull/7356)) Fixes for Boost 1.70 to compile with our current CMake
-- ([#7359](https://github.com/EOSIO/eos/pull/7359)) update to use boost 1.70
-- ([#7341](https://github.com/EOSIO/eos/pull/7341)) Add Version Check for Package Builder
-- ([#7367](https://github.com/EOSIO/eos/pull/7367)) Fix exception #
-- ([#7342](https://github.com/EOSIO/eos/pull/7342)) Update to appbase max priority on main thread
-- ([#7336](https://github.com/EOSIO/eos/pull/7336)) (softfloat sync) clean up strict-aliasing rules warnings
-- ([#7371](https://github.com/EOSIO/eos/pull/7371)) Adds configuration for replay test pipeline
-- ([#7370](https://github.com/EOSIO/eos/pull/7370)) Fix `-b` flag for `cleos get table` subcommand
-- ([#7369](https://github.com/EOSIO/eos/pull/7369)) Add `boost/asio/io_context.hpp` header to `transaction_metadata.hpp` for branch `develop`
-- ([#7385](https://github.com/EOSIO/eos/pull/7385)) Ship: port #7383 and #7384 to develop
-- ([#7377](https://github.com/EOSIO/eos/pull/7377)) Allow aliases of variants in ABI
-- ([#7316](https://github.com/EOSIO/eos/pull/7316)) Explicit name
-- ([#7389](https://github.com/EOSIO/eos/pull/7389)) Fix develop merge
-- ([#7379](https://github.com/EOSIO/eos/pull/7379)) transaction deadline cleanup
-- ([#7380](https://github.com/EOSIO/eos/pull/7380)) Producer incoming-transaction-queue-size-mb
-- ([#7391](https://github.com/EOSIO/eos/pull/7391)) Allow for EOS clone to be a submodule
-- ([#7390](https://github.com/EOSIO/eos/pull/7390)) port db_modes_test to python
-- ([#7399](https://github.com/EOSIO/eos/pull/7399)) throw error if trying to create non R1 key on SE or YubiHSM wallet
-- ([#7394](https://github.com/EOSIO/eos/pull/7394)) (fc sync) static_variant improvements & fix certificate trust when trust settings is empty
-- ([#7405](https://github.com/EOSIO/eos/pull/7405)) Centralize EOSIO Pipeline
-- ([#7401](https://github.com/EOSIO/eos/pull/7401)) state database versioning
-- ([#7392](https://github.com/EOSIO/eos/pull/7392)) Trx blk connections
-- ([#7433](https://github.com/EOSIO/eos/pull/7433)) use imported targets for boost & cleanup fc/appbase/chainbase standalone usage
-- ([#7434](https://github.com/EOSIO/eos/pull/7434)) (chainbase) don’t keep file mapping active when in heap/locked mode
-- ([#7432](https://github.com/EOSIO/eos/pull/7432)) No need to start keosd for cleos command which doesn't need keosd
-- ([#7430](https://github.com/EOSIO/eos/pull/7430)) Add option for cleos sign subcommand to ask keosd for signing
-- ([#7425](https://github.com/EOSIO/eos/pull/7425)) txn json to file
-- ([#7440](https://github.com/EOSIO/eos/pull/7440)) Fix #7436 SIGSEGV - develop
-- ([#7461](https://github.com/EOSIO/eos/pull/7461)) Name txn_test_gen threads
-- ([#7442](https://github.com/EOSIO/eos/pull/7442)) Enhance cleos error message when parsing JSON argument
-- ([#7451](https://github.com/EOSIO/eos/pull/7451)) set initial costs for expensive parallel unit tests
-- ([#7366](https://github.com/EOSIO/eos/pull/7366)) BATS bash tests for build scripts + various other improvements and fixes
-- ([#7467](https://github.com/EOSIO/eos/pull/7467)) Pipeline Configuration File Update
-- ([#7476](https://github.com/EOSIO/eos/pull/7476)) Various improvements from pull/7458
-- ([#7488](https://github.com/EOSIO/eos/pull/7488)) Various BATS fixes to fix CI/CD
-- ([#7489](https://github.com/EOSIO/eos/pull/7489)) Fix Incorrectly Resolved and Untested Merge Conflicts in Pipeline Configuration File
-- ([#7474](https://github.com/EOSIO/eos/pull/7474)) fix copy_bin() for win32 builds
-- ([#7478](https://github.com/EOSIO/eos/pull/7478)) remove stray SIGUSR1
-- ([#7475](https://github.com/EOSIO/eos/pull/7475)) guard unix socket support in http_plugin depending on platform support
-- ([#7492](https://github.com/EOSIO/eos/pull/7492)) Enabled helpers for unpinned builds.
-- ([#7482](https://github.com/EOSIO/eos/pull/7482)) Let delete-all-blocks option to only remove the contents instead of the directory itself
-- ([#7502](https://github.com/EOSIO/eos/pull/7502)) [develop] Versioned images (prep for hashing)
-- ([#7507](https://github.com/EOSIO/eos/pull/7507)) use create_directories in initialize_protocol_features - develop
-- ([#7484](https://github.com/EOSIO/eos/pull/7484)) return zero exit status for nodeos version, help, fixed reversible, and extracted genesis
-- ([#7468](https://github.com/EOSIO/eos/pull/7468)) Versioning library
-- ([#7486](https://github.com/EOSIO/eos/pull/7486)) [develop] Ensure we're in repo root
-- ([#7515](https://github.com/EOSIO/eos/pull/7515)) Custom path support for eosio installation.
-- ([#7516](https://github.com/EOSIO/eos/pull/7516)) on supported platforms build with system clang by default
-- ([#7519](https://github.com/EOSIO/eos/pull/7519)) [develop] Removed lrt from pipeline.jsonc
-- ([#7525](https://github.com/EOSIO/eos/pull/7525)) [develop] Readlink quick fix and BATS test fixes
-- ([#7532](https://github.com/EOSIO/eos/pull/7532)) [develop] BASE IMAGE Fixes
-- ([#7535](https://github.com/EOSIO/eos/pull/7535)) Add -j option to print JSON format for cleos get currency balance.
-- ([#7537](https://github.com/EOSIO/eos/pull/7537)) connection via listen needs to start in connecting mode
-- ([#7497](https://github.com/EOSIO/eos/pull/7497)) properly add single quotes for parameter with spaces in logs output
-- ([#7544](https://github.com/EOSIO/eos/pull/7544)) restore usage of devtoolset-8 on centos7
-- ([#7547](https://github.com/EOSIO/eos/pull/7547)) Sighup logging
-- ([#7421](https://github.com/EOSIO/eos/pull/7421)) WebAuthn key and signature support
-- ([#7572](https://github.com/EOSIO/eos/pull/7572)) [develop] Don't create mongo folders unless ENABLE_MONGO is true
-- ([#7576](https://github.com/EOSIO/eos/pull/7576)) [develop] Better found/not found messages for clarity
-- ([#7545](https://github.com/EOSIO/eos/pull/7545)) add nodiscard attribute to tester's push_action
-- ([#7581](https://github.com/EOSIO/eos/pull/7581)) Update to fc with logger fix
-- ([#7558](https://github.com/EOSIO/eos/pull/7558)) [develop] Ability to set *_DIR on CLI
-- ([#7553](https://github.com/EOSIO/eos/pull/7553)) [develop] CMAKE version check before dependencies are installed
-- ([#7584](https://github.com/EOSIO/eos/pull/7584)) fix hash<>::result_type deprecation spam
-- ([#7588](https://github.com/EOSIO/eos/pull/7588)) [develop] Various BATS test fixes
-- ([#7578](https://github.com/EOSIO/eos/pull/7578)) [develop] -i support for relative paths
-- ([#7449](https://github.com/EOSIO/eos/pull/7449)) add accurate checktime timer for macOS
-- ([#7591](https://github.com/EOSIO/eos/pull/7591)) [develop] SUDO_COMMAND -> NEW_SUDO_COMMAND (base fixed)
-- ([#7594](https://github.com/EOSIO/eos/pull/7594)) [develop] Install location fix
-- ([#7586](https://github.com/EOSIO/eos/pull/7586)) Modify transaction_ack to process bcast_transaction and rejected_transaction correctly
-- ([#7585](https://github.com/EOSIO/eos/pull/7585)) Enhance cleos to enable new RPC send_transaction
-- ([#7599](https://github.com/EOSIO/eos/pull/7599)) Use updated sync nodes for sync tests
-- ([#7608](https://github.com/EOSIO/eos/pull/7608)) indicate in brew bottle mojave is required
-- ([#7615](https://github.com/EOSIO/eos/pull/7615)) Change hardcoded currency symbol in testnet.template into a variable
-- ([#7610](https://github.com/EOSIO/eos/pull/7610)) use explicit billing for unapplied and deferred transactions in tester - develop
-- ([#7621](https://github.com/EOSIO/eos/pull/7621)) Call resolve on connection strand
-- ([#7623](https://github.com/EOSIO/eos/pull/7623)) additional wasm unittests around max depth
-- ([#7607](https://github.com/EOSIO/eos/pull/7607)) Improve nodeos make-index speeds
-- ([#7598](https://github.com/EOSIO/eos/pull/7598)) Net plugin block id notification
-- ([#7624](https://github.com/EOSIO/eos/pull/7624)) bios-boot-tutorial.py: bugfix, SYS hardcoded instead of using command…
-- ([#7632](https://github.com/EOSIO/eos/pull/7632)) [develop] issues/7627: Install script missing !
-- ([#7634](https://github.com/EOSIO/eos/pull/7634)) fix fc::temp_directory usage in tester
-- ([#7642](https://github.com/EOSIO/eos/pull/7642)) remove stale warning about dirty metadata
-- ([#7640](https://github.com/EOSIO/eos/pull/7640)) fix win32 build of eosio-blocklog
-- ([#7643](https://github.com/EOSIO/eos/pull/7643)) remove unused dlfcn.h include; troublesome for win32
-- ([#7645](https://github.com/EOSIO/eos/pull/7645)) add eosio-blocklog to base install component
-- ([#7651](https://github.com/EOSIO/eos/pull/7651)) Port #7619 to develop
-- ([#7652](https://github.com/EOSIO/eos/pull/7652)) remove raise() in keosd in favor of simple appbase quit (de-posix it)
-- ([#7453](https://github.com/EOSIO/eos/pull/7453)) Refactor unapplied transaction queue
-- ([#7657](https://github.com/EOSIO/eos/pull/7657)) (chainbase sync) print name of DB causing failure condition & win32 fixes
-- ([#7663](https://github.com/EOSIO/eos/pull/7663)) Fix path error in cleos set code/abi
-- ([#7633](https://github.com/EOSIO/eos/pull/7633)) Small optimization to move more trx processing off application thread
-- ([#7662](https://github.com/EOSIO/eos/pull/7662)) fix fork resolve in special case
-- ([#7667](https://github.com/EOSIO/eos/pull/7667)) fix 7600 double confirm after changing sign key
-- ([#7625](https://github.com/EOSIO/eos/pull/7625)) Fix flaky tests - mainly net_plugin fixes
-- ([#7672](https://github.com/EOSIO/eos/pull/7672)) Fix memory leak
-- ([#7676](https://github.com/EOSIO/eos/pull/7676)) Remove unused code
-- ([#7677](https://github.com/EOSIO/eos/pull/7677)) Commas go outside the quotes...
-- ([#7675](https://github.com/EOSIO/eos/pull/7675)) wasm unit test with an imported function as start function
-- ([#7678](https://github.com/EOSIO/eos/pull/7678)) Issue 3516 fix
-- ([#7404](https://github.com/EOSIO/eos/pull/7404)) wtmsig block production
-- ([#7686](https://github.com/EOSIO/eos/pull/7686)) Unapplied transaction queue performance
-- ([#7685](https://github.com/EOSIO/eos/pull/7685)) Integration Test descriptions and timeout fix
-- ([#7691](https://github.com/EOSIO/eos/pull/7691)) Fix nodeos 1.8.x to > 1.7.x peering issue (allowed-connection not equal to "any")
-- ([#7250](https://github.com/EOSIO/eos/pull/7250)) wabt: reduce redundant memset
-- ([#7702](https://github.com/EOSIO/eos/pull/7702)) fix producer_plugin watermark tracking - develop
-- ([#7477](https://github.com/EOSIO/eos/pull/7477)) Fix abi_serializer to encode optional non-built_in types
-- ([#7703](https://github.com/EOSIO/eos/pull/7703)) return flat_multimap from transaction::validate_and_extract_extensions
-- ([#7720](https://github.com/EOSIO/eos/pull/7720)) Fix bug to make sed -i work properly on Mac
-- ([#7716](https://github.com/EOSIO/eos/pull/7716)) [TRAVIS POC] develop Support passing in JOBS for docker/kube multi-tenancy
-- ([#7707](https://github.com/EOSIO/eos/pull/7707)) add softfloat only injection mode
-- ([#7725](https://github.com/EOSIO/eos/pull/7725)) Fix increment in test
-- ([#7729](https://github.com/EOSIO/eos/pull/7729)) Fix db_modes_test
-- ([#7734](https://github.com/EOSIO/eos/pull/7734)) Fix db exhaustion
-- ([#7487](https://github.com/EOSIO/eos/pull/7487)) Enable extended_asset to be encoded from array
-- ([#7736](https://github.com/EOSIO/eos/pull/7736)) unit test ensuring that OOB table init allowed on set code; fails on action
-- ([#7744](https://github.com/EOSIO/eos/pull/7744)) (appbase) update to get non-option fix & unique_ptr tweak
-- ([#7746](https://github.com/EOSIO/eos/pull/7746)) (chainbase sync) fix build with boost 1.71
-- ([#7721](https://github.com/EOSIO/eos/pull/7721)) Improve signature recovery
-- ([#7757](https://github.com/EOSIO/eos/pull/7757)) remove stale license headers
-- ([#7756](https://github.com/EOSIO/eos/pull/7756)) block_log performance improvement, and misc.
-- ([#7654](https://github.com/EOSIO/eos/pull/7654)) exclusively use timer for checktime
-- ([#7763](https://github.com/EOSIO/eos/pull/7763)) Use fc::cfile instead of std::fstream for state_history
-- ([#7770](https://github.com/EOSIO/eos/pull/7770)) Net plugin sync fix
-- ([#7717](https://github.com/EOSIO/eos/pull/7717)) Support for v2 snapshots with pending producer schedules
-- ([#7795](https://github.com/EOSIO/eos/pull/7795)) Hardcode initial eosio ABI: #7794
-- ([#7792](https://github.com/EOSIO/eos/pull/7792)) Restore default logging if logging.json is removed when SIGHUP.
-- ([#7791](https://github.com/EOSIO/eos/pull/7791)) Producer plugin
-- ([#7786](https://github.com/EOSIO/eos/pull/7786)) Remove redundant work from net plugin
-- ([#7785](https://github.com/EOSIO/eos/pull/7785)) Optimize block log usage
-- ([#7812](https://github.com/EOSIO/eos/pull/7812)) Add IMPORTANT file and update README - develop
-- ([#7820](https://github.com/EOSIO/eos/pull/7820)) rename IMPORTANT to IMPORTANT.md - develop
-- ([#7809](https://github.com/EOSIO/eos/pull/7809)) Correct cpu_usage calculation when more than one signature
-- ([#7803](https://github.com/EOSIO/eos/pull/7803)) callback support for checktime timer expiry
-- ([#7838](https://github.com/EOSIO/eos/pull/7838)) Bandwidth - develop
-- ([#7845](https://github.com/EOSIO/eos/pull/7845)) Deprecate network version match - develop
-- ([#7700](https://github.com/EOSIO/eos/pull/7700)) [develop] Travis CI + Buildkite 3.0
-- ([#7825](https://github.com/EOSIO/eos/pull/7825)) apply_block optimization
-- ([#7849](https://github.com/EOSIO/eos/pull/7849)) Increase Contracts Builder Timeout + Fix $SKIP_MAC
-- ([#7854](https://github.com/EOSIO/eos/pull/7854)) Net plugin sync
-- ([#7860](https://github.com/EOSIO/eos/pull/7860)) [develop] Ensure release flag is added to all builds.
-- ([#7873](https://github.com/EOSIO/eos/pull/7873)) [develop] Mac Builder Boost Fix
-- ([#7868](https://github.com/EOSIO/eos/pull/7868)) cleos get actions
-- ([#7774](https://github.com/EOSIO/eos/pull/7774)) update WAVM to be compatible with LLVM 7 through 9
-- ([#7864](https://github.com/EOSIO/eos/pull/7864)) Add output of build info on nodeos startup
-- ([#7881](https://github.com/EOSIO/eos/pull/7881)) [develop] Ensure Artfacts Upload on Failed Tests
-- ([#7886](https://github.com/EOSIO/eos/pull/7886)) promote read-only disablement log from net_plugin to warn level
-- ([#7887](https://github.com/EOSIO/eos/pull/7887)) print unix socket path when there is an error starting unix socket server
-- ([#7889](https://github.com/EOSIO/eos/pull/7889)) Update docker builder tag
-- ([#7891](https://github.com/EOSIO/eos/pull/7891)) Fix exit crash - develop
-- ([#7877](https://github.com/EOSIO/eos/pull/7877)) Create Release Build Test
-- ([#7883](https://github.com/EOSIO/eos/pull/7883)) Add Support for eosio-test-stability Pipeline
-- ([#7903](https://github.com/EOSIO/eos/pull/7903)) adds support for builder priority queues
-- ([#7853](https://github.com/EOSIO/eos/pull/7853)) change behavior of recover_key to better support variable length keys
-- ([#7901](https://github.com/EOSIO/eos/pull/7901)) [develop] Add Trigger for LRTs and Multiversion Tests Post PR
-- ([#7914](https://github.com/EOSIO/eos/pull/7914)) [Develop] Forked PR fix
-- ([#7923](https://github.com/EOSIO/eos/pull/7923)) return error when attempting to remove key from YubiHSM wallet
-- ([#7910](https://github.com/EOSIO/eos/pull/7910)) [Develop] Updated anka plugin, added failover for registries, and added sleep fix for git clone/networking bug
-- ([#7926](https://github.com/EOSIO/eos/pull/7926)) Better error check in test
-- ([#7919](https://github.com/EOSIO/eos/pull/7919)) decouple wavm runtime from being required & initial support for platform specific wasm runtimes
-- ([#7927](https://github.com/EOSIO/eos/pull/7927)) Fix Release Build Type for macOS on Travis CI
-- ([#7931](https://github.com/EOSIO/eos/pull/7931)) Fix intermittent crash on exit when port already in use - develop
-- ([#7930](https://github.com/EOSIO/eos/pull/7930)) use -fdiagnostics-color=always even for clang
-- ([#7933](https://github.com/EOSIO/eos/pull/7933)) [Develop] Support all BK/Travis cases in Submodule Regression Script
-- ([#7943](https://github.com/EOSIO/eos/pull/7943)) Change eosio-launcher enable-gelf-logging argument default to false.
-- ([#7946](https://github.com/EOSIO/eos/pull/7946)) Forked chain test error statement - develop
-- ([#7948](https://github.com/EOSIO/eos/pull/7948)) net_plugin correctly handle unknown_block_exception - develop
-- ([#7954](https://github.com/EOSIO/eos/pull/7954)) remove bad semicolon (in unused but compiled code)
-- ([#7952](https://github.com/EOSIO/eos/pull/7952)) Unable to Create Block Log Index #7865
-- ([#7953](https://github.com/EOSIO/eos/pull/7953)) Refactor producer plugin start_block - develop
-- ([#7841](https://github.com/EOSIO/eos/pull/7841)) 7646 chain id in blog
-- ([#7958](https://github.com/EOSIO/eos/pull/7958)) [develop] Fix Mac builds on Travis
-- ([#7962](https://github.com/EOSIO/eos/pull/7962)) set immutable chain_id during construction of controller
-- ([#7957](https://github.com/EOSIO/eos/pull/7957)) Upgrade to Boost 1.71.0
-- ([#7971](https://github.com/EOSIO/eos/pull/7971)) Net plugin unexpected block - develop
-- ([#7967](https://github.com/EOSIO/eos/pull/7967)) support unix socket HTTP server for nodeos
-- ([#7947](https://github.com/EOSIO/eos/pull/7947)) Function body code size test
-- ([#7955](https://github.com/EOSIO/eos/pull/7955)) EOSIO WASM Spec tests
-- ([#7978](https://github.com/EOSIO/eos/pull/7978)) use the LLVM 7 library provided by SCL on CentOS7
-- ([#7983](https://github.com/EOSIO/eos/pull/7983)) port consolidated security fixes for 1.8.4 to develop; add unit tests associated with consolidated security fixes for 1.8.1
-- ([#7986](https://github.com/EOSIO/eos/pull/7986)) Remove unnecessary comment
-- ([#7985](https://github.com/EOSIO/eos/pull/7985)) more bug fixes with chain_id in state changes
-- ([#7974](https://github.com/EOSIO/eos/pull/7974)) Experimental/wb2 jit
-- ([#7989](https://github.com/EOSIO/eos/pull/7989)) Correct designator order for field of get_table_rows_params
-- ([#7992](https://github.com/EOSIO/eos/pull/7992)) move wasm_allocator from wasm_interface to controller
-- ([#7995](https://github.com/EOSIO/eos/pull/7995)) new timeout to handle when two jobs on the same host are maxing their…
-- ([#7993](https://github.com/EOSIO/eos/pull/7993)) update eos-vm to latest develop, fix issues with instantiation limit …
-- ([#7991](https://github.com/EOSIO/eos/pull/7991)) missing block log chain id unit tests
-- ([#8001](https://github.com/EOSIO/eos/pull/8001)) Net plugin trx progress - develop
-- ([#8003](https://github.com/EOSIO/eos/pull/8003)) update eos-vm ref
-- ([#7988](https://github.com/EOSIO/eos/pull/7988)) Net plugin version match
-- ([#8004](https://github.com/EOSIO/eos/pull/8004)) bump version
-- ([#7975](https://github.com/EOSIO/eos/pull/7975)) EOS-VM Optimized Compiler
-- ([#8007](https://github.com/EOSIO/eos/pull/8007)) disallow WAVM with EOS-VM OC
-- ([#8010](https://github.com/EOSIO/eos/pull/8010)) Change log level of index write
-- ([#8009](https://github.com/EOSIO/eos/pull/8009)) pending incoming order on subjective failure
-- ([#8013](https://github.com/EOSIO/eos/pull/8013)) ensure eos-vm-oc headers get installed
-- ([#8008](https://github.com/EOSIO/eos/pull/8008)) Increase stability of nodeos_under_min_avail_ram.py - develop
-- ([#8015](https://github.com/EOSIO/eos/pull/8015)) two fixes for eosio tester cmake modules
-- ([#8019](https://github.com/EOSIO/eos/pull/8019)) [Develop] Change submodule script to see stderr for git commands
-- ([#8014](https://github.com/EOSIO/eos/pull/8014)) Retain persisted trx until expired on speculative nodes
-- ([#8024](https://github.com/EOSIO/eos/pull/8024)) Add optional ability to disable WASM Spec Tests
-- ([#8023](https://github.com/EOSIO/eos/pull/8023)) Make subjective_cpu_leeway a config option
-- ([#8025](https://github.com/EOSIO/eos/pull/8025)) Fix build script LLVM symlinking
-- ([#8026](https://github.com/EOSIO/eos/pull/8026)) update EOS VM Optimized Compiler naming convention
-- ([#8012](https://github.com/EOSIO/eos/pull/8012)) 7939 trim block log v3 support
-- ([#8029](https://github.com/EOSIO/eos/pull/8029)) update eos-vm ref and install eos-vm license
-- ([#8033](https://github.com/EOSIO/eos/pull/8033)) net_plugin better error for unknown block
-- ([#8034](https://github.com/EOSIO/eos/pull/8034)) EOS VM OC license updates
-- ([#8042](https://github.com/EOSIO/eos/pull/8042)) [2.0.x] dockerhub | eosio/producer -> eosio/ci
-- ([#8050](https://github.com/EOSIO/eos/pull/8050)) Add greylist limit - v2.0.x
-- ([#8060](https://github.com/EOSIO/eos/pull/8060)) #8054: fix commas in ship abi
-- ([#8072](https://github.com/EOSIO/eos/pull/8072)) nodeos & keosd version reporting - 2.0
-- ([#8071](https://github.com/EOSIO/eos/pull/8071)) Update cleos to support new producer schedule - 2.0
-- ([#8070](https://github.com/EOSIO/eos/pull/8070)) don't rebuild llvm unnecessarily during pinned builds - 2.0
-- ([#8074](https://github.com/EOSIO/eos/pull/8074)) [2.0.x] Upgrade mac anka template to 10.14.6
-- ([#8076](https://github.com/EOSIO/eos/pull/8076)) Handle cases where version_* not specified in CMakeLists.txt - 2.0
-- ([#8088](https://github.com/EOSIO/eos/pull/8088)) [2.0.x] Linux build fleet update
-- ([#8091](https://github.com/EOSIO/eos/pull/8091)) report block extensions_type contents in RPC and eosio-blocklog tool - 2.0
-- ([#8105](https://github.com/EOSIO/eos/pull/8105)) Modify --print-default-config to exit with success - 2.0
-- ([#8113](https://github.com/EOSIO/eos/pull/8113)) [2.0.x] WASM Spec Test Step in CI
-- ([#8114](https://github.com/EOSIO/eos/pull/8114)) [2.0.x] Mac OSX steps need a min of 1 hour
-- ([#8127](https://github.com/EOSIO/eos/pull/8127)) [2.0.x] Move the ensure step into the build step, eliminating the need for templaters
-- ([#8144](https://github.com/EOSIO/eos/pull/8144)) fix pinned builds on fresh macOS install - 2.0
-- ([#8149](https://github.com/EOSIO/eos/pull/8149)) [2.0.x] CI platform directories
-- ([#8155](https://github.com/EOSIO/eos/pull/8155)) Post State history callback as medium priority - 2.0
-- ([#8173](https://github.com/EOSIO/eos/pull/8173)) ensure GMP is always dynamically linked - 2.0
-- ([#8175](https://github.com/EOSIO/eos/pull/8175)) [2.0.x] Unpinned and WASM test fixes
-- ([#8168](https://github.com/EOSIO/eos/pull/8168)) add harden flags to cicd & pinned builds - 2.0
-- ([#8180](https://github.com/EOSIO/eos/pull/8180)) [2.0.x] 10 second sleep to address heavy usage wait-network bug in Anka
-- ([#8192](https://github.com/EOSIO/eos/pull/8192)) Reduce logging - 2.0
-- ([#8367](https://github.com/EOSIO/eos/pull/8367)) Add Sync from Genesis Test
-- ([#8363](https://github.com/EOSIO/eos/pull/8363)) Fix linking OpenSSL (branch `release/2.0.x`)
-- ([#8383](https://github.com/EOSIO/eos/pull/8383)) Escape BUILDKITE_COMMIT to generate tag properly
-- ([#8385](https://github.com/EOSIO/eos/pull/8385)) Propagate exceptions out push_block - 2.0
-- ([#8391](https://github.com/EOSIO/eos/pull/8391)) Add eosio-resume-from-state Test
-- ([#8393](https://github.com/EOSIO/eos/pull/8393)) Make multiversion protocol test conditional.
-- ([#8402](https://github.com/EOSIO/eos/pull/8402)) fix EOS VM OC monitor thread name - 2.0
-- ([#8406](https://github.com/EOSIO/eos/pull/8406)) [2.0.x] Modified Amazon and Centos to use yum install ccache
-- ([#8414](https://github.com/EOSIO/eos/pull/8414)) Add better logging of exceptions in emit - 2.0
-- ([#8328](https://github.com/EOSIO/eos/pull/8328)) Fix bios boot python script due to 2.0.x changes
-- ([#8293](https://github.com/EOSIO/eos/pull/8293)) Add nodeos/cleos/keosd docs from develop, update README
-- ([#8425](https://github.com/EOSIO/eos/pull/8425)) fix discovery of openssl in tester cmake when OPENSSL_ROOT_DIR not set - 2.0
-
-## Thanks!
-
-Special thanks to the community contributors that submitted patches for this release:
-- @UMU618
-- @conr2d
-- @YordanPavlov
-- @baegjae
-- @olexiybuyanskyy
-- @spartucus
-- @rdewilder
diff --git a/docs/30_release-notes/99_v2.1.0-rc1.md b/docs/30_release-notes/99_v2.1.0-rc1.md
new file mode 100644
index 00000000000..65c40eca818
--- /dev/null
+++ b/docs/30_release-notes/99_v2.1.0-rc1.md
@@ -0,0 +1,607 @@
+---
+content_title: EOSIO v2.1.0-rc1 Release Notes
+link_text: v2.1.0-rc1
+---
+
+This is a ***RELEASE CANDIDATE*** for version 2.1.0.
+
+While EOSIO has always been innovative and highly-performant, this release focuses on making it easier to build large-scale applications on the platform, and to maintain them once they’re deployed. It is a reflection of our commitment to abstract away some of the complexities of blockchain development and make it approachable to a broader audience.
+
+EOSIO 2.1.0-rc1 marks the first time we’re releasing a feature that is specifically intended for private blockchains only, with the the ability to remove Context-Free Data. This feature will provide a way for private blockchain administrators to delete a specifically designated section of data, without compromising the integrity of the chain.
+
+The EOSIO 2.1.0-rc1 also includes additional features that optimize blockchain data storage, simplify table management, and provide clustering options for system administrators.
+
+We encourage developers to test the additional features in the EOSIO 2.1.0-rc1, and provide us with feedback. If you would like to offer feedback on the release candidate of EOSIO 2.1.0 and work more closely with our team to improve EOSIO for developers, you can contact our developer relations team at developers@block.one.
+
+## Changes
+
+### Action Return Values ([#8327](https://github.com/EOSIO/eos/pull/8327))
+New protocol feature: `ACTION_RETURN_VALUE`. When activated, this feature provides a way to get return values which are strongly committed to in block headers from actions into external processes without having to rely on get_table or using the debug console via print statements. This allows smart contract developers to be able to process the return value from an action directly; further streamlining the smart contract development process. An example can be seen [here.](https://github.com/EOSIO/return-values-example-app)
+
+### Configurable WASM Limits ([#8360](https://github.com/EOSIO/eos/pull/8360))
+New protocol feature: `CONFIGURABLE_WASM_LIMITS`. When activated, this feature allows privileged contracts to set the constraints on WebAssembly code.
+
+### Extensible Blockchain Parameters ([#9402](https://github.com/EOSIO/eos/pull/9402))
+The basic means of manipulating consensus parameters for an EOSIO blockchain has been a pair of intrinsic functions: `get_blockchain_parameters_packed` and `set_blockchain_parameters_packed`. These intrinsics are tied to a specific and inflexible definition of blockchain parameters and include no convenient means to _version_ the set of parameters; which is an inconvenience to add/remove/modify in future consensus upgrades.
+
+To alleviate this, Nodeos now has a new protocol feature: `BLOCKCHAIN_PARAMETERS`. When activated, this protocol feature is intended to eventually supplant the existing intrinsics and provide greater flexibility for future consensus upgrades. When activated it will allow contracts to link to the new intrinsics.
+
+### Health Logging For Nodeos running The State History Plugin ([#9208](https://github.com/EOSIO/eos/pull/9208)) ([#9239](https://github.com/EOSIO/eos/pull/9239)) ([#9277](https://github.com/EOSIO/eos/pull/9277))
+Nodeos now has added support for a separate logger to the state history plugin and add some additional logging messages for receiving requests and sending replies. In addition, the trace and chain state log can now be split in the state history plugin as well.
+
+### Instrumentation Support for Nodeos ([#9631](https://github.com/EOSIO/eos/pull/9631))
+Nodeos now supports integration with Zipkin, an open source distributed tracing system. This will enable system administrators to optimize Nodeos execution for performance-critical applications.
+
+### Key Value Tables ([#8223](https://github.com/EOSIO/eos/pull/8223), [#9298](https://github.com/EOSIO/eos/pull/9298))
+New protocol feature: `KV_DATABASE`. When activated, this feature provides a Key Value API. This new API is a more flexible, simplified way for developers to create and search on-chain tables. Developers can also modify the table structure after it has been created, which is currently impossible with multi-index tables.
+
+Developers will also be able to split up tables they have already written. An example of this is in the case where the developer has a table that stores a user’s first and last name along with other information. The developer could now decide to split the original table into two separate tables, one containing the first names and one containing the last names.
+
+As with the existing db api, contracts can flexibly specify which authorizing account provides the RAM resources for this data.
+
+An example can be seen [here.](https://github.com/EOSIO/key-value-example-app) You can follow the instructions [here](https://github.com/EOSIO/eos/tree/develop/contracts/enable-kv) to quickly create a test chain with Key Value support.
+
+### Prune Context-Free Data ([#9061](https://github.com/EOSIO/eos/pull/9061))
+From inception, EOSIO has supported the concept of Context-Free Data, or data that may be removed without affecting the integrity of the chain. This release enables administrators to designate specific data as Context-Free and subsequently remove, or prune, that data from the blockchain while maintaining system stability.
+
+Once this data has been pruned, full validation is no longer possible, only light validation, which requires implicit trust in the block producers. Due to this factor, the Prune Context-Free Data feature is only suitable for a private blockchain as part a larger privacy, security, or regulatory compliance solution.
+
+### Support For Ubuntu 20.04, CentOS 7.x, and CentOS 8 ([#9332](https://github.com/EOSIO/eos/pull/9332)) ([#9475](https://github.com/EOSIO/eos/pull/9475))
+EOSIO now supports Ubuntu 20.04, CentOS 7.x, and CentOS 8, in addition to previous releases supporting Amazon Linux 2, CentOS 7, Ubuntu 16.04, Ubuntu 18.04 and MacOS 10.14 (Mojave).
+
+### Reimplement Chainbase Using Intrusive Instead of multi_index ([#58](https://github.com/EOSIO/chainbase/pull/58))
+Nodoes now features an upgraded version of chainbase using intrusive instead of multi_index. This makes chainbase more performant and features per container memory pools, full exception safety, lighter weight representation of the undo stack, and avl trees instead of rb trees.
+
+### [Developer Preview] Blockvault ([#9705](https://github.com/EOSIO/eos/pull/9705))
+Nodeos now supports clustering for the block producer node, enabling blockchain administrators to implement industry standard disaster recovery architectures. Two or more nodes may be deployed as a single logical producer. If the primary node goes down, a system properly configured to leverage this solution can attain similar data recovery guarantees to that of industry leading database and cloud services, with minimal service disruption.
+
+While this feature increases resiliency for block production on public networks, it also provides particular value for private chains running with a single logical producer. Single-producer chains can use it to provide immediate finality with tools to mitigate the risk of a single point of failure.
+
+To use this feature, `nodeos` must be configured as a producer with the appropriate `--block-vault-backend` option specified. For example:
+
+```
+nodeos --plugin eosio::producer_plugin --producer-name myproducera --plugin eosio::blockvault_client_plugin --block-vault-backend postgresql://user:password@mycompany.com
+```
+
+For more information on using this feature please see the `README.md` file in directory `~/eos/plugins/blockvault_client_plugin/README.md`.
+
+This feature is being released as a "developer preview" and is not yet ready for production usage. We look forward to community feedback to further develop and harden this feature.
+
+### [Developer Preview] RocksDB Storage for DB and Key Value APIs ([#9340](https://github.com/EOSIO/eos/pull/9340)) ([#9529](https://github.com/EOSIO/eos/pull/9529))
+RocksDB is now supported as a storage option behind either the DB or Key Value APIs. This gives blockchain system administrators the flexibility to choose between RAM or RocksDB to optimize Nodeos performance for their workloads.
+
+To use this feature, `nodeos` must specify which backing store to use by passing the flag `--backing-store=rocksdb`.
+
+For more information on using this feature please see the `10_how-to-configure-state-storage.md` file in directory `~/eos/docs/01_nodeos/02_usage/60_how-to-guides/10_how-to-configure-state-storage.md`.
+
+This feature is being released as a "developer preview" and is not yet ready for production usage. We look forward to community feedback to further develop and harden this feature.
+
+## Known Issues
+A known issue exists with accessing the right version of libpq.so on Centos 7.x, Amazon Linux 2, and Ubuntu 16.04 when running with the prebuilt binaries attached to the v2.1.0-rc1 release notes in Github (binaries located at the bottom of this page). On those platforms please build EOSIO from source using the provided `~/eos/scripts/eosio_build.sh` script using the instructions provided [here](https://developers.eos.io/manuals/eos/latest/install/build-from-source/shell-scripts/index) to overcome the issue (you will need to perform a `git checkout v2.1.0-rc1` followed by a `git submodule update --init --recursive` before running the script)
+
+## Deprecation and Removal Notices
+- ([#8498](https://github.com/EOSIO/eos/pull/8498)) Remove new block id notify feature - develop
+- ([#9014](https://github.com/EOSIO/eos/pull/9014)) Remove mongo_db_plugin
+- ([#9701](https://github.com/EOSIO/eos/pull/9701)) remove long disabled faucet_testnet_plugin
+
+## Upgrading From previous versions of EOSIO
+
+### Upgrading From v2.0.x
+
+Node operators running version v2.0.x should be able to upgrade to v2.1.0-rc1 using a snapshot. In addition, moving from a chainbase-backed node to a RocksDB-backed node or the reverse will also require a snapshot to migrate.
+
+## Other Changes
+- ([#7973](https://github.com/EOSIO/eos/pull/7973)) Add a unit test for the write order for aliased intrinsic arguments.
+- ([#8039](https://github.com/EOSIO/eos/pull/8039)) [Develop] dockerhub | eosio/producer -> eosio/ci
+- ([#8043](https://github.com/EOSIO/eos/pull/8043)) Refactor incoming trx handling
+- ([#8044](https://github.com/EOSIO/eos/pull/8044)) Add greylist limit - develop
+- ([#8046](https://github.com/EOSIO/eos/pull/8046)) #7658: modified code to handle new db_runtime_exception
+- ([#8047](https://github.com/EOSIO/eos/pull/8047)) remove WAVM runtime
+- ([#8049](https://github.com/EOSIO/eos/pull/8049)) Update cleos to support new producer schedule - develop
+- ([#8053](https://github.com/EOSIO/eos/pull/8053)) don't rebuild llvm unnecessarily during pinned builds
+- ([#8056](https://github.com/EOSIO/eos/pull/8056)) #7671 added checks for irreversible mode
+- ([#8057](https://github.com/EOSIO/eos/pull/8057)) [Develop] Upgrade mac anka template to 10.14.6
+- ([#8062](https://github.com/EOSIO/eos/pull/8062)) nodeos & keosd version reporting
+- ([#8073](https://github.com/EOSIO/eos/pull/8073)) disable terminfo usage on pinned llvm builds
+- ([#8075](https://github.com/EOSIO/eos/pull/8075)) Handle cases where version_* not specified in CMakeLists.txt - develop
+- ([#8077](https://github.com/EOSIO/eos/pull/8077)) Use BOOST_CHECK_EQUAL instead of BOOST_REQUIRE_EQUAL.
+- ([#8082](https://github.com/EOSIO/eos/pull/8082)) report block extensions_type contents in RPC and eosio-blocklog tool - develop
+- ([#8085](https://github.com/EOSIO/eos/pull/8085)) Net plugin remove read delays - develop
+- ([#8089](https://github.com/EOSIO/eos/pull/8089)) [develop] Linux build fleet update
+- ([#8094](https://github.com/EOSIO/eos/pull/8094)) net_plugin remove sync w/peer check - develop
+- ([#8104](https://github.com/EOSIO/eos/pull/8104)) Modify --print-default-config to exit with success - develop
+- ([#8106](https://github.com/EOSIO/eos/pull/8106)) Port PR #8060 to develop: fix commas in ship ABI
+- ([#8107](https://github.com/EOSIO/eos/pull/8107)) [develop] WASM Spec Test Step in CI
+- ([#8109](https://github.com/EOSIO/eos/pull/8109)) [Develop] Mac OSX steps need a min of 1 hour
+- ([#8115](https://github.com/EOSIO/eos/pull/8115)) remove lingering wavm runtime file that escaped the first purge
+- ([#8118](https://github.com/EOSIO/eos/pull/8118)) remove gettext/libintl dependency
+- ([#8119](https://github.com/EOSIO/eos/pull/8119)) Net plugin sync fix - develop
+- ([#8121](https://github.com/EOSIO/eos/pull/8121)) [Develop] Move the ensure step into the build step, eliminating the need for templaters
+- ([#8130](https://github.com/EOSIO/eos/pull/8130)) #8129 - Fix spelling error in cleos/main.cpp
+- ([#8131](https://github.com/EOSIO/eos/pull/8131)) Normalized capitalization in cleos/main.cpp
+- ([#8132](https://github.com/EOSIO/eos/pull/8132)) [Develop] CI/CD support for Catalina
+- ([#8135](https://github.com/EOSIO/eos/pull/8135)) [develop] CI platform directories
+- ([#8136](https://github.com/EOSIO/eos/pull/8136)) explicitly link to zlib when compiling executables using the add_eosio_test_executable macro
+- ([#8140](https://github.com/EOSIO/eos/pull/8140)) Post State history callback as medium priority - develop
+- ([#8142](https://github.com/EOSIO/eos/pull/8142)) Net plugin sync priority
+- ([#8143](https://github.com/EOSIO/eos/pull/8143)) fix pinned builds on fresh macOS install
+- ([#8146](https://github.com/EOSIO/eos/pull/8146)) Update fc
+- ([#8147](https://github.com/EOSIO/eos/pull/8147)) Optimize push_transaction
+- ([#8151](https://github.com/EOSIO/eos/pull/8151)) Debian Package: Make sure root is owner/group when building dpkg.
+- ([#8158](https://github.com/EOSIO/eos/pull/8158)) transactions in progress
+- ([#8165](https://github.com/EOSIO/eos/pull/8165)) [Develop] Prevent buildkite clone to speedup pipeline
+- ([#8166](https://github.com/EOSIO/eos/pull/8166)) Remove references to smart_ref.
+- ([#8167](https://github.com/EOSIO/eos/pull/8167)) add harden flags to cicd & pinned builds
+- ([#8172](https://github.com/EOSIO/eos/pull/8172)) [develop] Unpinned and WASM test fixes
+- ([#8177](https://github.com/EOSIO/eos/pull/8177)) sync fc to pick up gmp fix & boost deque support
+- ([#8178](https://github.com/EOSIO/eos/pull/8178)) [Develop] 10 second sleep to address heavy usage wait-network bug in Anka
+- ([#8184](https://github.com/EOSIO/eos/pull/8184)) make DISABLE_WASM_SPEC_TESTS an option so it's visible from the GUI
+- ([#8186](https://github.com/EOSIO/eos/pull/8186)) Update fc for EOSIO/fc#121 and EOSIO/fc#123
+- ([#8193](https://github.com/EOSIO/eos/pull/8193)) Reduce logging - develop
+- ([#8194](https://github.com/EOSIO/eos/pull/8194)) Fixed under min available test to not count failed attempts as actual sends
+- ([#8196](https://github.com/EOSIO/eos/pull/8196)) Consolidated Fixes for develop
+- ([#8198](https://github.com/EOSIO/eos/pull/8198)) State History Plugin Integration Test
+- ([#8208](https://github.com/EOSIO/eos/pull/8208)) eliminate gperftools copy paste
+- ([#8209](https://github.com/EOSIO/eos/pull/8209)) stop setting CXX_FLAGS with both C & CXX flags
+- ([#8217](https://github.com/EOSIO/eos/pull/8217)) Update chainbase to support Boost 1.67.
+- ([#8218](https://github.com/EOSIO/eos/pull/8218)) Add option to provide transaction signature keys to cleos
+- ([#8220](https://github.com/EOSIO/eos/pull/8220)) Add terminate-at-block option to nodeos.
+- ([#8222](https://github.com/EOSIO/eos/pull/8222)) Many Transaction Long Running Test
+- ([#8223](https://github.com/EOSIO/eos/pull/8223)) kv database
+- ([#8231](https://github.com/EOSIO/eos/pull/8231)) return more from producer_plugin's get_runtime_options()
+- ([#8232](https://github.com/EOSIO/eos/pull/8232)) Create integration test for sending copies of the same transaction into the network
+- ([#8234](https://github.com/EOSIO/eos/pull/8234)) chainbase sync to pick up DB shrink fix while in heap mode
+- ([#8245](https://github.com/EOSIO/eos/pull/8245)) [Develop] explictly use openssl 1.1 via brew on macos
+- ([#8250](https://github.com/EOSIO/eos/pull/8250)) Spelling correction
+- ([#8251](https://github.com/EOSIO/eos/pull/8251)) debug level logging for launcher service
+- ([#8254](https://github.com/EOSIO/eos/pull/8254)) Replace hard coding system_account_name
+- ([#8269](https://github.com/EOSIO/eos/pull/8269)) Remove Unused Variable
+- ([#8274](https://github.com/EOSIO/eos/pull/8274)) [develop] Update CentOS version for CI.
+- ([#8276](https://github.com/EOSIO/eos/pull/8276)) Net plugin sync - develop
+- ([#8277](https://github.com/EOSIO/eos/pull/8277)) [develop] Travis updates.
+- ([#8281](https://github.com/EOSIO/eos/pull/8281)) Net plugin handshake
+- ([#8291](https://github.com/EOSIO/eos/pull/8291)) Exit irreversible mode test when failure occurrs
+- ([#8299](https://github.com/EOSIO/eos/pull/8299)) net_plugin boost asio error handling
+- ([#8300](https://github.com/EOSIO/eos/pull/8300)) net_plugin lib sync - develop
+- ([#8304](https://github.com/EOSIO/eos/pull/8304)) net_plugin thread protection peer logging variables - develop
+- ([#8306](https://github.com/EOSIO/eos/pull/8306)) Extend shutdown allowed time in under min available resources test
+- ([#8312](https://github.com/EOSIO/eos/pull/8312)) Fix race in message_buffer and move message_buffer_tests to fc. - develop
+- ([#8313](https://github.com/EOSIO/eos/pull/8313)) reset the new handler (develop)
+- ([#8317](https://github.com/EOSIO/eos/pull/8317)) net_plugin speed up shutdown
+- ([#8321](https://github.com/EOSIO/eos/pull/8321)) [develop] Retries and Contract Builders for Tags
+- ([#8336](https://github.com/EOSIO/eos/pull/8336)) increase tester state size - develop
+- ([#8339](https://github.com/EOSIO/eos/pull/8339)) Removing BATS tests
+- ([#8340](https://github.com/EOSIO/eos/pull/8340)) [develop] Modification to trigger LRTs and Multiver on any protected branch that is not a scheduled run
+- ([#8345](https://github.com/EOSIO/eos/pull/8345)) Remove superfluous quotes from default agent name string.
+- ([#8349](https://github.com/EOSIO/eos/pull/8349)) Consolidated Security Fixes for Develop
+- ([#8358](https://github.com/EOSIO/eos/pull/8358)) Add Sync from Genesis Test
+- ([#8361](https://github.com/EOSIO/eos/pull/8361)) Make multiversion protocol test conditional.
+- ([#8364](https://github.com/EOSIO/eos/pull/8364)) Fix linking OpenSSL (branch `develop`)
+- ([#8374](https://github.com/EOSIO/eos/pull/8374)) CMAKE 3.16.2
+- ([#8382](https://github.com/EOSIO/eos/pull/8382)) Fix for NVM install
+- ([#8387](https://github.com/EOSIO/eos/pull/8387)) Propagate exceptions out push_block - develop
+- ([#8390](https://github.com/EOSIO/eos/pull/8390)) Add eosio-resume-from-state Test
+- ([#8398](https://github.com/EOSIO/eos/pull/8398)) Net plugin sync check - develop
+- ([#8401](https://github.com/EOSIO/eos/pull/8401)) fix EOS VM OC monitor thread name
+- ([#8404](https://github.com/EOSIO/eos/pull/8404)) Revert: Debian Package: Make sure root is owner/group when building dpkg
+- ([#8405](https://github.com/EOSIO/eos/pull/8405)) [develop] Modified Amazon and Centos to use yum install ccache
+- ([#8408](https://github.com/EOSIO/eos/pull/8408)) scripts/generate_deb.sh: call fakeroot if available.
+- ([#8409](https://github.com/EOSIO/eos/pull/8409)) Reflection validation script
+- ([#8411](https://github.com/EOSIO/eos/pull/8411)) [develop] Github Actions for Community PRs
+- ([#8413](https://github.com/EOSIO/eos/pull/8413)) Add better logging of exceptions in emit - develop
+- ([#8424](https://github.com/EOSIO/eos/pull/8424)) fix discovery of openssl in tester cmake when OPENSSL_ROOT_DIR not set
+- ([#8428](https://github.com/EOSIO/eos/pull/8428)) [develop] Fixing travis' source ~/.bash_profile problem
+- ([#8433](https://github.com/EOSIO/eos/pull/8433)) [develop] Fix installation location of header file `eosio.version.hpp`
+- ([#8437](https://github.com/EOSIO/eos/pull/8437)) abi serialization enhancements - develop
+- ([#8444](https://github.com/EOSIO/eos/pull/8444)) resolve action return value hash & state history serialization discrepancy
+- ([#8448](https://github.com/EOSIO/eos/pull/8448)) [Develop] Pipeline file for testing the build script
+- ([#8453](https://github.com/EOSIO/eos/pull/8453)) [Develop] Added better sleep pre-execute for Anka commands + boost fix
+- ([#8465](https://github.com/EOSIO/eos/pull/8465)) llvm 10 support for EOS VM OC
+- ([#8466](https://github.com/EOSIO/eos/pull/8466)) [Develop] Switching to using the EOSIO fork of anka-buildkite-plugin for security reasons
+- ([#8478](https://github.com/EOSIO/eos/pull/8478)) Update eos-vm
+- ([#8484](https://github.com/EOSIO/eos/pull/8484)) [Develop] Fixes for Submodule Regression Checker Script
+- ([#8486](https://github.com/EOSIO/eos/pull/8486)) [develop] Multiversion test migration
+- ([#8489](https://github.com/EOSIO/eos/pull/8489)) Change link signature from state_history to state_history_plugin
+- ([#8490](https://github.com/EOSIO/eos/pull/8490)) [develop] Preemptively create the wallet directory to prevent exception
+- ([#8491](https://github.com/EOSIO/eos/pull/8491)) [develop] Docker name collision fix
+- ([#8497](https://github.com/EOSIO/eos/pull/8497)) Drop late blocks - develop
+- ([#8500](https://github.com/EOSIO/eos/pull/8500)) remove old WAVM Platform files and WAVM intrinsics
+- ([#8501](https://github.com/EOSIO/eos/pull/8501)) [develop] Removed unnecessary sleep option from Anka plugin
+- ([#8503](https://github.com/EOSIO/eos/pull/8503)) use sh instead of bash for cmake unittests magic
+- ([#8505](https://github.com/EOSIO/eos/pull/8505)) Remove hash in link
+- ([#8511](https://github.com/EOSIO/eos/pull/8511)) http_plugin shutdown - develop
+- ([#8513](https://github.com/EOSIO/eos/pull/8513)) [develop] Don't trigger LRT a second time
+- ([#8524](https://github.com/EOSIO/eos/pull/8524)) 2.0.1 security omnibus - develop
+- ([#8527](https://github.com/EOSIO/eos/pull/8527)) Handle socket close before async callback - develop
+- ([#8540](https://github.com/EOSIO/eos/pull/8540)) Added comparison operators for extended_symbol type
+- ([#8548](https://github.com/EOSIO/eos/pull/8548)) Net plugin dispatch - develop
+- ([#8550](https://github.com/EOSIO/eos/pull/8550)) Fix typo
+- ([#8553](https://github.com/EOSIO/eos/pull/8553)) Net plugin unlinkable blocks - develop
+- ([#8556](https://github.com/EOSIO/eos/pull/8556)) Drop late check - develop
+- ([#8559](https://github.com/EOSIO/eos/pull/8559)) Read-only with drop-late-block - develop
+- ([#8563](https://github.com/EOSIO/eos/pull/8563)) Net plugin post - develop
+- ([#8565](https://github.com/EOSIO/eos/pull/8565)) Delayed production time - develop
+- ([#8567](https://github.com/EOSIO/eos/pull/8567)) Timestamp watermark slot
+- ([#8570](https://github.com/EOSIO/eos/pull/8570)) Eliminate use of boost deprecated query object.
+- ([#8573](https://github.com/EOSIO/eos/pull/8573)) Anka / CICD 10.15.1 -> 10.15.3
+- ([#8579](https://github.com/EOSIO/eos/pull/8579)) CPU block effort - develop
+- ([#8585](https://github.com/EOSIO/eos/pull/8585)) cpu effort last block - develop
+- ([#8587](https://github.com/EOSIO/eos/pull/8587)) P2p read only - develop
+- ([#8596](https://github.com/EOSIO/eos/pull/8596)) Consolidated Security Fixes for develop
+- ([#8597](https://github.com/EOSIO/eos/pull/8597)) Producer plugin log - develop
+- ([#8601](https://github.com/EOSIO/eos/pull/8601)) Improve create account description
+- ([#8603](https://github.com/EOSIO/eos/pull/8603)) Skip sync from genesis and resume from state test on tagged builds
+- ([#8609](https://github.com/EOSIO/eos/pull/8609)) Add a way to query nodeos reversible db size - added an api endpoint …
+- ([#8613](https://github.com/EOSIO/eos/pull/8613)) [develop] Fixes for Actions.
+- ([#8618](https://github.com/EOSIO/eos/pull/8618)) Init net_plugin member variables - develop
+- ([#8623](https://github.com/EOSIO/eos/pull/8623)) abi 1.2: action_results
+- ([#8635](https://github.com/EOSIO/eos/pull/8635)) bump script's macos version check to 10.14
+- ([#8637](https://github.com/EOSIO/eos/pull/8637)) remove brew's python@2 install
+- ([#8646](https://github.com/EOSIO/eos/pull/8646)) Consolidated Security Fixes for develop.
+- ([#8652](https://github.com/EOSIO/eos/pull/8652)) Fix format message.
+- ([#8657](https://github.com/EOSIO/eos/pull/8657)) Fix wasm-runtime option parameters
+- ([#8663](https://github.com/EOSIO/eos/pull/8663)) ship: add chain_id to get_status_result_v0
+- ([#8665](https://github.com/EOSIO/eos/pull/8665)) Fix other blocks.log callout
+- ([#8669](https://github.com/EOSIO/eos/pull/8669)) Add troubleshooting item for PREACTIVATE_FEATURE protocol
+- ([#8670](https://github.com/EOSIO/eos/pull/8670)) Using get raw abi in cleos
+- ([#8671](https://github.com/EOSIO/eos/pull/8671)) Fix for cleos and keosd race condition
+- ([#8674](https://github.com/EOSIO/eos/pull/8674)) [develop] Disable skip checkouts for EKS builder/tester fleet.
+- ([#8676](https://github.com/EOSIO/eos/pull/8676)) unpack data when forming transaction, useful for …
+- ([#8677](https://github.com/EOSIO/eos/pull/8677)) Allow Boost.Test to report the last checkpoint location when an excep…
+- ([#8679](https://github.com/EOSIO/eos/pull/8679)) Exit transaction early when insufficient account cpu - develop
+- ([#8681](https://github.com/EOSIO/eos/pull/8681)) Produce block immediately if exhausted - develop
+- ([#8683](https://github.com/EOSIO/eos/pull/8683)) Produce time - develop
+- ([#8687](https://github.com/EOSIO/eos/pull/8687)) Add Incoming-defer-ratio description
+- ([#8688](https://github.com/EOSIO/eos/pull/8688)) Fixes #8600 clean up nodeos options section
+- ([#8691](https://github.com/EOSIO/eos/pull/8691)) incoming-defer-ratio description - develop
+- ([#8692](https://github.com/EOSIO/eos/pull/8692)) [develop] Community PR tweaks.
+- ([#8699](https://github.com/EOSIO/eos/pull/8699)) [develop] Base images pipeline.
+- ([#8704](https://github.com/EOSIO/eos/pull/8704)) add get_block_info
+- ([#8706](https://github.com/EOSIO/eos/pull/8706)) Update the getting started link [merge 1]
+- ([#8709](https://github.com/EOSIO/eos/pull/8709)) Relay block on accepted header - develop
+- ([#8713](https://github.com/EOSIO/eos/pull/8713)) [develop] Actions rerun fixes.
+- ([#8717](https://github.com/EOSIO/eos/pull/8717)) Fix mutliple version protocol test intermittent failure
+- ([#8718](https://github.com/EOSIO/eos/pull/8718)) link cleos net status reference doc with the peer network protocol doc
+- ([#8719](https://github.com/EOSIO/eos/pull/8719)) Add tests for multi_index iterator cache across notifies.
+- ([#8720](https://github.com/EOSIO/eos/pull/8720)) Add unit test to verify that the description digests of protocol feat…
+- ([#8728](https://github.com/EOSIO/eos/pull/8728)) remove the redundant html markup
+- ([#8730](https://github.com/EOSIO/eos/pull/8730)) Add integrated Secure Enclave block signing for nodeos
+- ([#8731](https://github.com/EOSIO/eos/pull/8731)) Get info priority - develop
+- ([#8737](https://github.com/EOSIO/eos/pull/8737)) Fix/action results
+- ([#8738](https://github.com/EOSIO/eos/pull/8738)) Add additional CPU/NET usage data to get_account results
+- ([#8743](https://github.com/EOSIO/eos/pull/8743)) New options for api nodes - develop
+- ([#8749](https://github.com/EOSIO/eos/pull/8749)) [CI/CD] -S to curl in generate-tag script so we can see why it's failing on EKS
+- ([#8750](https://github.com/EOSIO/eos/pull/8750)) Move parts of state-history-plugin to libraries/state_history
+- ([#8751](https://github.com/EOSIO/eos/pull/8751)) upgrade pinned builds to clang 10 & boost 1.72
+- ([#8755](https://github.com/EOSIO/eos/pull/8755)) add block producing explainer doc
+- ([#8771](https://github.com/EOSIO/eos/pull/8771)) free unknown EOS VM OC codegen versions from the code cache
+- ([#8779](https://github.com/EOSIO/eos/pull/8779)) disable EOS VM on non-x86 platforms
+- ([#8780](https://github.com/EOSIO/eos/pull/8780)) link to librt when using posix timers
+- ([#8788](https://github.com/EOSIO/eos/pull/8788)) dfuse Deep Mind changes
+- ([#8801](https://github.com/EOSIO/eos/pull/8801)) Expire blacklisted scheduled transactions by LIB time - develop
+- ([#8802](https://github.com/EOSIO/eos/pull/8802)) Trace API Plugin - develop
+- ([#8812](https://github.com/EOSIO/eos/pull/8812)) disable temporarily snapshot creation
+- ([#8818](https://github.com/EOSIO/eos/pull/8818)) Add test cases for changes of logging with minimize flag is true,
+- ([#8820](https://github.com/EOSIO/eos/pull/8820)) yield_function for abi_serializer
+- ([#8824](https://github.com/EOSIO/eos/pull/8824)) remove leading $ chars from shell codeblocks in README.md
+- ([#8829](https://github.com/EOSIO/eos/pull/8829)) fix potential leak in OC's wrapped_fd move assignment op
+- ([#8833](https://github.com/EOSIO/eos/pull/8833)) Add RPC Trace API plugin reference to nodeos
+- ([#8834](https://github.com/EOSIO/eos/pull/8834)) trace_api_plugin yield timeout - develop
+- ([#8838](https://github.com/EOSIO/eos/pull/8838)) set_action_return_value prohibited for context free actions
+- ([#8842](https://github.com/EOSIO/eos/pull/8842)) Fix double titles in plugins
+- ([#8846](https://github.com/EOSIO/eos/pull/8846)) skip context free actions during light validation
+- ([#8847](https://github.com/EOSIO/eos/pull/8847)) add block replay test
+- ([#8848](https://github.com/EOSIO/eos/pull/8848)) Skip checks
+- ([#8851](https://github.com/EOSIO/eos/pull/8851)) add light validation sync test
+- ([#8852](https://github.com/EOSIO/eos/pull/8852)) [develop] Trace API Compressed data log Support
+- ([#8853](https://github.com/EOSIO/eos/pull/8853)) CFD: Initial support for pruned_block
+- ([#8854](https://github.com/EOSIO/eos/pull/8854)) Improve too many bytes in flight error info - develop
+- ([#8856](https://github.com/EOSIO/eos/pull/8856)) Use NET bill in transaction receipt during light validation mode
+- ([#8864](https://github.com/EOSIO/eos/pull/8864)) wabt: don't search for python because we don't run tests
+- ([#8865](https://github.com/EOSIO/eos/pull/8865)) Add possibility to run .cicd scripts from different environments
+- ([#8868](https://github.com/EOSIO/eos/pull/8868)) Feature/new host function system
+- ([#8874](https://github.com/EOSIO/eos/pull/8874)) Fix spurious HTTP related test failure [develop] (round 3)
+- ([#8879](https://github.com/EOSIO/eos/pull/8879)) HTTP Plugin async APIs [develop]
+- ([#8880](https://github.com/EOSIO/eos/pull/8880)) add pruned_block to signed_block conversion
+- ([#8882](https://github.com/EOSIO/eos/pull/8882)) Correctly Sanitize git Branch and Tag Names
+- ([#8886](https://github.com/EOSIO/eos/pull/8886)) use http async api support for Trace API get_block [develop]
+- ([#8896](https://github.com/EOSIO/eos/pull/8896)) Increase get info priority to medium high - develop
+- ([#8897](https://github.com/EOSIO/eos/pull/8897)) Sync from snapshot - develop
+- ([#8898](https://github.com/EOSIO/eos/pull/8898)) Remove the assertion check for error code (400) in cleos
+- ([#8905](https://github.com/EOSIO/eos/pull/8905)) Update eos-vm
+- ([#8917](https://github.com/EOSIO/eos/pull/8917)) Updates to manual build instructions
+- ([#8922](https://github.com/EOSIO/eos/pull/8922)) remove left over support patch for previous clang 8 pinned compiler
+- ([#8924](https://github.com/EOSIO/eos/pull/8924)) Add unwrapped chainlib
+- ([#8925](https://github.com/EOSIO/eos/pull/8925)) remove llvm@7 from macos build as it isn't used at the moment
+- ([#8927](https://github.com/EOSIO/eos/pull/8927)) Fix SHIP block delay - develop
+- ([#8928](https://github.com/EOSIO/eos/pull/8928)) replace boost::bind with std::bind, fixing boost 1.73beta builds
+- ([#8929](https://github.com/EOSIO/eos/pull/8929)) Chainlib support for replacing keys
+- ([#8930](https://github.com/EOSIO/eos/pull/8930)) fix boost URL in mojave cicd script
+- ([#8931](https://github.com/EOSIO/eos/pull/8931)) Fix unpack data for signing transaction
+- ([#8932](https://github.com/EOSIO/eos/pull/8932)) Rename action_id type for GCC - develop
+- ([#8937](https://github.com/EOSIO/eos/pull/8937)) Fix broken Docker build of C7 pinned image.
+- ([#8958](https://github.com/EOSIO/eos/pull/8958)) Replace bc with shell arithmetic - develop
+- ([#8959](https://github.com/EOSIO/eos/pull/8959)) Make /bin/df ignore $BLOCKSIZE - develop
+- ([#8960](https://github.com/EOSIO/eos/pull/8960)) Upgrade CLI11 to 1.9.0 - develop
+- ([#8961](https://github.com/EOSIO/eos/pull/8961)) Support Running ALL Tests in One Build
+- ([#8964](https://github.com/EOSIO/eos/pull/8964)) unit-test for replace keys
+- ([#8966](https://github.com/EOSIO/eos/pull/8966)) [develop] Bump Catalina version.
+- ([#8967](https://github.com/EOSIO/eos/pull/8967)) tests/get_table_tests.cpp: incorrect use of CORE_SYM_STR - develop
+- ([#8979](https://github.com/EOSIO/eos/pull/8979)) Add nodeos RPC API index, improve nodeos implementation doc, fix link
+- ([#8991](https://github.com/EOSIO/eos/pull/8991)) Avoid legacy for set_action_return_value intrinsic
+- ([#8994](https://github.com/EOSIO/eos/pull/8994)) Update example logging.json - develop
+- ([#8998](https://github.com/EOSIO/eos/pull/8998)) Better error handling for push/send_transaction - develop
+- ([#8999](https://github.com/EOSIO/eos/pull/8999)) Fixed failing nodeos_run_test when core symbol is not SYS - develop
+- ([#9000](https://github.com/EOSIO/eos/pull/9000)) Improved reporting in nodeos_forked_chain_lr_test
+- ([#9001](https://github.com/EOSIO/eos/pull/9001)) Support Triggering a Build that Runs ALL Tests in One Build
+- ([#9011](https://github.com/EOSIO/eos/pull/9011)) Revert "Upgrade CLI11 to 1.9.0 - develop"
+- ([#9012](https://github.com/EOSIO/eos/pull/9012)) Bugfix for uninitialized variable in cleos - develop
+- ([#9015](https://github.com/EOSIO/eos/pull/9015)) Bump version to 2.1.0-alpha1
+- ([#9016](https://github.com/EOSIO/eos/pull/9016)) Bring back CLI11 1.9.0 - develop
+- ([#9018](https://github.com/EOSIO/eos/pull/9018)) rodeos and eosio-tester
+- ([#9019](https://github.com/EOSIO/eos/pull/9019)) refactor block log
+- ([#9020](https://github.com/EOSIO/eos/pull/9020)) add help text to wasm-runtime - develop
+- ([#9021](https://github.com/EOSIO/eos/pull/9021)) Add authority structure to cleos system newaccount
+- ([#9025](https://github.com/EOSIO/eos/pull/9025)) Fix keosd auto-launching after CLI11 upgrade - develop
+- ([#9029](https://github.com/EOSIO/eos/pull/9029)) Rodeos with Streaming Plugin
+- ([#9033](https://github.com/EOSIO/eos/pull/9033)) Adding message body check (400) for http calls
+- ([#9034](https://github.com/EOSIO/eos/pull/9034)) sync fc up to master bringing 3 PRs in
+- ([#9039](https://github.com/EOSIO/eos/pull/9039)) For develop - Updated the priority of the APIs in producer_api_plugin and net_api_plugin to MEDIUM_HIGH
+- ([#9041](https://github.com/EOSIO/eos/pull/9041)) move minimum boost from 1.67->1.70; gcc 7->8
+- ([#9043](https://github.com/EOSIO/eos/pull/9043)) Remove copy of result - develop
+- ([#9044](https://github.com/EOSIO/eos/pull/9044)) Replace submodules
+- ([#9046](https://github.com/EOSIO/eos/pull/9046)) Remove outcome
+- ([#9047](https://github.com/EOSIO/eos/pull/9047)) [develop]Add more info in trace-api-plugin
+- ([#9048](https://github.com/EOSIO/eos/pull/9048)) add rapidjson license to install - develop
+- ([#9050](https://github.com/EOSIO/eos/pull/9050)) Add cleos --compression option for transactions
+- ([#9051](https://github.com/EOSIO/eos/pull/9051)) removed unused cmake modules from fc
+- ([#9053](https://github.com/EOSIO/eos/pull/9053)) Print stderr if keosd_auto_launch_test.py fails - develop
+- ([#9054](https://github.com/EOSIO/eos/pull/9054)) add options for not using GMP and for static linking GMP
+- ([#9057](https://github.com/EOSIO/eos/pull/9057)) Fix timedelta and strftime usage - develop
+- ([#9059](https://github.com/EOSIO/eos/pull/9059)) Fix uninitialized struct members used as CLI flags - develop
+- ([#9061](https://github.com/EOSIO/eos/pull/9061)) Merge prune-cfd-stage-1 branch
+- ([#9066](https://github.com/EOSIO/eos/pull/9066)) separate out signature provider from producer plugin
+- ([#9068](https://github.com/EOSIO/eos/pull/9068)) add cleos validate signatures
+- ([#9069](https://github.com/EOSIO/eos/pull/9069)) Use `signed_block_v0` binary format for SHiP
+- ([#9070](https://github.com/EOSIO/eos/pull/9070)) fix two range-loop-construct warnings from clang10
+- ([#9072](https://github.com/EOSIO/eos/pull/9072)) CFD pruning integration test
+- ([#9074](https://github.com/EOSIO/eos/pull/9074)) Add change type to pull request template
+- ([#9077](https://github.com/EOSIO/eos/pull/9077)) Update date in LICENSE
+- ([#9079](https://github.com/EOSIO/eos/pull/9079)) Fix setting of keosd-provider-timeout
+- ([#9080](https://github.com/EOSIO/eos/pull/9080)) Add support for specifying a logging.json to keosd - develop
+- ([#9081](https://github.com/EOSIO/eos/pull/9081)) ship v0 fix
+- ([#9085](https://github.com/EOSIO/eos/pull/9085)) trim-blocklog improvement (removing bad blocks and making blocks.log …
+- ([#9086](https://github.com/EOSIO/eos/pull/9086)) Add back transaction de-duplication check in net_plugin
+- ([#9088](https://github.com/EOSIO/eos/pull/9088)) make ship WA key serialization match expected serialization
+- ([#9092](https://github.com/EOSIO/eos/pull/9092)) Fix narrowing conversion error in `fc/src/log/console_appender.cpp`
+- ([#9094](https://github.com/EOSIO/eos/pull/9094)) fix gcc10 build due to libyubihsm problem
+- ([#9104](https://github.com/EOSIO/eos/pull/9104)) Ship v1
+- ([#9108](https://github.com/EOSIO/eos/pull/9108)) [develop] Bump MacOS version and timeouts.
+- ([#9111](https://github.com/EOSIO/eos/pull/9111)) Update algorithm for determining number of parallel jobs - develop
+- ([#9114](https://github.com/EOSIO/eos/pull/9114)) [develop] Epe 37 fix test contracts build
+- ([#9117](https://github.com/EOSIO/eos/pull/9117)) Exit on rodeos filter wasm error
+- ([#9119](https://github.com/EOSIO/eos/pull/9119)) fixes amqp heartbeat idle connection
+- ([#9123](https://github.com/EOSIO/eos/pull/9123)) Update the authority example JSON
+- ([#9125](https://github.com/EOSIO/eos/pull/9125)) Add unity build support for some targets
+- ([#9126](https://github.com/EOSIO/eos/pull/9126)) Fix onblock handling in trace_api_plugin - develop
+- ([#9132](https://github.com/EOSIO/eos/pull/9132)) Rodeos streamer exchanges
+- ([#9133](https://github.com/EOSIO/eos/pull/9133)) Restore abi_serializer backward compatibility - develop
+- ([#9134](https://github.com/EOSIO/eos/pull/9134)) Test framework archiving
+- ([#9137](https://github.com/EOSIO/eos/pull/9137)) Fix api notification of applied trx
+- ([#9143](https://github.com/EOSIO/eos/pull/9143)) Prune data integration test fix
+- ([#9147](https://github.com/EOSIO/eos/pull/9147)) two comment fixes to transaction.hpp
+- ([#9149](https://github.com/EOSIO/eos/pull/9149)) Fix for empty ("") appbase config default value
+- ([#9160](https://github.com/EOSIO/eos/pull/9160)) fix build when build path has spaces
+- ([#9164](https://github.com/EOSIO/eos/pull/9164)) Fix for connection cycle not being in sync with test startup.
+- ([#9165](https://github.com/EOSIO/eos/pull/9165)) fix helper for CLANG 10 detection
+- ([#9167](https://github.com/EOSIO/eos/pull/9167)) stop rocksdb's CMakeLists from force overriding CMAKE_INSTALL_PREFIX
+- ([#9169](https://github.com/EOSIO/eos/pull/9169)) Fix onblock trace tracking - develop
+- ([#9175](https://github.com/EOSIO/eos/pull/9175)) Ship delay error fix
+- ([#9179](https://github.com/EOSIO/eos/pull/9179)) Add a sign intrinsic to the tester.
+- ([#9180](https://github.com/EOSIO/eos/pull/9180)) eosio.contracts unit tests fail to compile with develop branch due to controller change
+- ([#9182](https://github.com/EOSIO/eos/pull/9182)) Bump to alpha2
+- ([#9184](https://github.com/EOSIO/eos/pull/9184)) Add support for block log splitting
+- ([#9186](https://github.com/EOSIO/eos/pull/9186)) struct name fix check #8971
+- ([#9187](https://github.com/EOSIO/eos/pull/9187)) Fixed relaunch calls that still passed in nodeId.
+- ([#9194](https://github.com/EOSIO/eos/pull/9194)) Add trace plugin API test
+- ([#9196](https://github.com/EOSIO/eos/pull/9196)) Resource monitor plugin -- develop branch
+- ([#9198](https://github.com/EOSIO/eos/pull/9198)) Reenable OC and update it to the new intrinsic wrappers.
+- ([#9199](https://github.com/EOSIO/eos/pull/9199)) [develop] Anka/Catalina version bump
+- ([#9204](https://github.com/EOSIO/eos/pull/9204)) Support unity build for unittests
+- ([#9207](https://github.com/EOSIO/eos/pull/9207)) call boost program option notifiers before plugin initialize
+- ([#9209](https://github.com/EOSIO/eos/pull/9209)) add empty content http request handling
+- ([#9210](https://github.com/EOSIO/eos/pull/9210)) Fix eosio-blocklog trim front
+- ([#9211](https://github.com/EOSIO/eos/pull/9211)) Loosen production round requirement
+- ([#9212](https://github.com/EOSIO/eos/pull/9212)) Apply 400 check to db_size
+- ([#9213](https://github.com/EOSIO/eos/pull/9213)) Replace fc::optional with std::optional
+- ([#9217](https://github.com/EOSIO/eos/pull/9217)) Improve parsing of RabbitMQ-related command line arguments in rodeos - develop
+- ([#9218](https://github.com/EOSIO/eos/pull/9218)) EPE-145: unapplied_transaction_queue incorrectly caches incoming_count
+- ([#9221](https://github.com/EOSIO/eos/pull/9221)) Fix unity build for unittests
+- ([#9222](https://github.com/EOSIO/eos/pull/9222)) Fix log of pending block producer - develop
+- ([#9226](https://github.com/EOSIO/eos/pull/9226)) call q.begin and q.end, instead of q.unapplied_begin and q.unapplied_end, in unit tests
+- ([#9231](https://github.com/EOSIO/eos/pull/9231)) Comment clean up
+- ([#9233](https://github.com/EOSIO/eos/pull/9233)) Changed code to ensure --http-max-response-time-ms is always passed in the extraNodeosArgs
+- ([#9235](https://github.com/EOSIO/eos/pull/9235)) Migrate fc::static_variant to std::variant
+- ([#9239](https://github.com/EOSIO/eos/pull/9239)) split transaction logging
+- ([#9244](https://github.com/EOSIO/eos/pull/9244)) relaxing the on_notify constraint to *
+- ([#9245](https://github.com/EOSIO/eos/pull/9245)) added a new option fix-irreversible-blocks
+- ([#9248](https://github.com/EOSIO/eos/pull/9248)) add test case to restart chain without blocks.log
+- ([#9253](https://github.com/EOSIO/eos/pull/9253)) Additional ShIP unit tests
+- ([#9254](https://github.com/EOSIO/eos/pull/9254)) const correctness fix
+- ([#9257](https://github.com/EOSIO/eos/pull/9257)) add new loggers to logging.json
+- ([#9263](https://github.com/EOSIO/eos/pull/9263)) Remove Concurrency Groups for Scheduled Builds
+- ([#9277](https://github.com/EOSIO/eos/pull/9277)) Support state history log splitting
+- ([#9277](https://github.com/EOSIO/eos/pull/9277)) Support state history log splitting
+- ([#9281](https://github.com/EOSIO/eos/pull/9281)) Refactor to use std::unique_ptr instead of naked pointers
+- ([#9289](https://github.com/EOSIO/eos/pull/9289)) add covert_to_type for name
+- ([#9308](https://github.com/EOSIO/eos/pull/9308)) Track Source Files Excluded from Code Coverage Reports
+- ([#9310](https://github.com/EOSIO/eos/pull/9310)) Add action result to abi serializer
+- ([#9317](https://github.com/EOSIO/eos/pull/9317)) fix UB with rvalue reference
+- ([#9328](https://github.com/EOSIO/eos/pull/9328)) Fix core dump on logging when no this_block set
+- ([#9332](https://github.com/EOSIO/eos/pull/9332)) updated scripts to support Ubuntu 20.04
+- ([#9333](https://github.com/EOSIO/eos/pull/9333)) Use fc::variant() instead of 0 to be clearer that value is not available
+- ([#9337](https://github.com/EOSIO/eos/pull/9337)) Make shutdown() private as it should only be called from quit()
+- ([#9342](https://github.com/EOSIO/eos/pull/9342)) Fix typo in pull request template
+- ([#9347](https://github.com/EOSIO/eos/pull/9347)) Update abieos submodule to point to eosio branch
+- ([#9351](https://github.com/EOSIO/eos/pull/9351)) Nonprivileged inline action subjective limit - develop
+- ([#9353](https://github.com/EOSIO/eos/pull/9353)) Update CLI11 to v1.9.1
+- ([#9354](https://github.com/EOSIO/eos/pull/9354)) Add overload to serializer for action_traces in order to deserialize action return values
+- ([#9362](https://github.com/EOSIO/eos/pull/9362)) Consolidated security fixes
+- ([#9364](https://github.com/EOSIO/eos/pull/9364)) Add Ubuntu 20.04 cicd dockerfiles/buildscripts-develop
+- ([#9368](https://github.com/EOSIO/eos/pull/9368)) Remove unnecessary strlen
+- ([#9369](https://github.com/EOSIO/eos/pull/9369)) set medium priority for process signed block - develop
+- ([#9371](https://github.com/EOSIO/eos/pull/9371)) Reenable snapshot tests
+- ([#9375](https://github.com/EOSIO/eos/pull/9375)) cleos to display pushed actions' return values
+- ([#9381](https://github.com/EOSIO/eos/pull/9381)) add std::list<> support to fc pack/unpack (develop)
+- ([#9383](https://github.com/EOSIO/eos/pull/9383)) Read transaction consensus fix
+- ([#9384](https://github.com/EOSIO/eos/pull/9384)) develop version of "Account Query DB : maintain get_(key|controlled)_accounts"
+- ([#9385](https://github.com/EOSIO/eos/pull/9385)) Remove deprecated functions in abi_serializer for EPE112
+- ([#9389](https://github.com/EOSIO/eos/pull/9389)) Remove fc::uint128_t typedef
+- ([#9390](https://github.com/EOSIO/eos/pull/9390)) test contracts fix
+- ([#9392](https://github.com/EOSIO/eos/pull/9392)) EPE-306 fix
+- ([#9393](https://github.com/EOSIO/eos/pull/9393)) fix macos build script on Big Sur
+- ([#9395](https://github.com/EOSIO/eos/pull/9395)) Enable the correct lrt for snapshot generation testing
+- ([#9398](https://github.com/EOSIO/eos/pull/9398)) [develop] Fix docker tags when building forked PRs
+- ([#9401](https://github.com/EOSIO/eos/pull/9401)) set max_irreversible_block_age to -1
+- ([#9403](https://github.com/EOSIO/eos/pull/9403)) Increse max_transaction_cpu_usage to 90k
+- ([#9405](https://github.com/EOSIO/eos/pull/9405)) added unit tests
+- ([#9410](https://github.com/EOSIO/eos/pull/9410)) Cleos http response handler develop
+- ([#9411](https://github.com/EOSIO/eos/pull/9411)) fix the bug that the flight bytes are cacculated incorrect
+- ([#9416](https://github.com/EOSIO/eos/pull/9416)) fix template instantiation for host function
+- ([#9420](https://github.com/EOSIO/eos/pull/9420)) Fix variant type blob unpack bug
+- ([#9427](https://github.com/EOSIO/eos/pull/9427)) Fix static initialization problem
+- ([#9429](https://github.com/EOSIO/eos/pull/9429)) Abi kv nodeos
+- ([#9431](https://github.com/EOSIO/eos/pull/9431)) Restrict the maximum number of open HTTP RPC requests
+- ([#9432](https://github.com/EOSIO/eos/pull/9432)) resolve inconsistent visibility warnings on mac
+- ([#9433](https://github.com/EOSIO/eos/pull/9433)) fix build problem for git absence
+- ([#9434](https://github.com/EOSIO/eos/pull/9434)) Fix unnecessary object copying
+- ([#9435](https://github.com/EOSIO/eos/pull/9435)) update abieos submodule
+- ([#9440](https://github.com/EOSIO/eos/pull/9440)) Fix app() shutdown - develop
+- ([#9444](https://github.com/EOSIO/eos/pull/9444)) remove unity build
+- ([#9445](https://github.com/EOSIO/eos/pull/9445)) move is_string_valid_name to cpp file
+- ([#9447](https://github.com/EOSIO/eos/pull/9447)) Replace N macro with operator ""_n - develop
+- ([#9448](https://github.com/EOSIO/eos/pull/9448)) Fix develop build
+- ([#9449](https://github.com/EOSIO/eos/pull/9449)) Support for storing kv and db intrinsics in Chainbase or RocksDB.
+- ([#9451](https://github.com/EOSIO/eos/pull/9451)) new chain_config param: action return value limit
+- ([#9453](https://github.com/EOSIO/eos/pull/9453)) Reverting some libs
+- ([#9460](https://github.com/EOSIO/eos/pull/9460)) rpc kv access implement get_kv_table_rows
+- ([#9461](https://github.com/EOSIO/eos/pull/9461)) fix slipped submod
+- ([#9468](https://github.com/EOSIO/eos/pull/9468)) added try catch
+- ([#9475](https://github.com/EOSIO/eos/pull/9475)) Add script support for CentOS 8 (redo of #9361)
+- ([#9477](https://github.com/EOSIO/eos/pull/9477)) Add first class support for converting ABIs themselves to/from json/bin/hex
+- ([#9486](https://github.com/EOSIO/eos/pull/9486)) Fix build - N macro was removed
+- ([#9494](https://github.com/EOSIO/eos/pull/9494)) add an integration of nodeos for crash when the nodes are killed
+- ([#9499](https://github.com/EOSIO/eos/pull/9499)) add accessor for controller's trusted producer list
+- ([#9512](https://github.com/EOSIO/eos/pull/9512)) Keep http_plugin_impl alive while connection objects are alive
+- ([#9514](https://github.com/EOSIO/eos/pull/9514)) Fix for broken Centos 8 build-scripts build
+- ([#9517](https://github.com/EOSIO/eos/pull/9517)) Update abieos with change of to_json may_not_exist fields
+- ([#9520](https://github.com/EOSIO/eos/pull/9520)) Add installation pkg to centos 7 build deps and centos script
+- ([#9524](https://github.com/EOSIO/eos/pull/9524)) fix centOS 8 test failures
+- ([#9533](https://github.com/EOSIO/eos/pull/9533)) Failure with building on Centos 7.x
+- ([#9536](https://github.com/EOSIO/eos/pull/9536)) kv support cleos
+- ([#9546](https://github.com/EOSIO/eos/pull/9546)) add combined_db kv_context
+- ([#9547](https://github.com/EOSIO/eos/pull/9547)) Trace API plugin - Add support for action return values
+- ([#9553](https://github.com/EOSIO/eos/pull/9553)) fix secondary index in get_kv_table_rows
+- ([#9566](https://github.com/EOSIO/eos/pull/9566)) Removing unused variable functionDefIndex
+- ([#9577](https://github.com/EOSIO/eos/pull/9577)) use huge pages via mmap() instead of hugetlbfs
+- ([#9582](https://github.com/EOSIO/eos/pull/9582)) Fix stdout console logging
+- ([#9593](https://github.com/EOSIO/eos/pull/9593)) Speculative validation optimizations
+- ([#9595](https://github.com/EOSIO/eos/pull/9595)) fixed cleos get_kv_table_rows bugs
+- ([#9596](https://github.com/EOSIO/eos/pull/9596)) restore dropped commit from fc resubmod: GMP options
+- ([#9600](https://github.com/EOSIO/eos/pull/9600)) Session optimizations
+- ([#9605](https://github.com/EOSIO/eos/pull/9605)) fix get_table_rows_by_seckey conversion
+- ([#9607](https://github.com/EOSIO/eos/pull/9607)) Fix test_pending_schedule_snapshot by using blocks.log approach to ma…
+- ([#9611](https://github.com/EOSIO/eos/pull/9611)) RocksDB temporary fix
+- ([#9614](https://github.com/EOSIO/eos/pull/9614)) updated appbase to fix print-default-config for wasm-runtime
+- ([#9615](https://github.com/EOSIO/eos/pull/9615)) only use '#pragma clang diagnostic' when compiling with clang
+- ([#9622](https://github.com/EOSIO/eos/pull/9622)) Making create_snapshot output more informative by adding more fields
+- ([#9623](https://github.com/EOSIO/eos/pull/9623)) Migrate CI from Docker Hub to Amazon ECR
+- ([#9625](https://github.com/EOSIO/eos/pull/9625)) Fixing typos on injected params
+- ([#9628](https://github.com/EOSIO/eos/pull/9628)) Misc tests
+- ([#9631](https://github.com/EOSIO/eos/pull/9631)) Zipkin - develop
+- ([#9632](https://github.com/EOSIO/eos/pull/9632)) Fixes for DB intrinsic replay logic
+- ([#9633](https://github.com/EOSIO/eos/pull/9633)) Allow HTTP-RPC with empty response
+- ([#9635](https://github.com/EOSIO/eos/pull/9635)) Update SHiP to work with RocksDB
+- ([#9646](https://github.com/EOSIO/eos/pull/9646)) fix get_kv_table_rows secondary index search
+- ([#9648](https://github.com/EOSIO/eos/pull/9648)) updated unit test kv_addr_book
+- ([#9656](https://github.com/EOSIO/eos/pull/9656)) CI: Fix Serial Test Bug + Simplification + UX
+- ([#9659](https://github.com/EOSIO/eos/pull/9659)) fix sprintf overrun
+- ([#9660](https://github.com/EOSIO/eos/pull/9660)) resolve some warnings w.r.t. copying from consts
+- ([#9662](https://github.com/EOSIO/eos/pull/9662)) Add "Testing Changes" Section to Pull Request Template
+- ([#9667](https://github.com/EOSIO/eos/pull/9667)) Add "Ubuntu 20.04 Package Builder" step to pipeline.yml
+- ([#9669](https://github.com/EOSIO/eos/pull/9669)) ship delta changes for issue 9255
+- ([#9670](https://github.com/EOSIO/eos/pull/9670)) disable building rodeos and eosio.tester
+- ([#9673](https://github.com/EOSIO/eos/pull/9673)) restore boost 1.67 as the minimum boost version required
+- ([#9674](https://github.com/EOSIO/eos/pull/9674)) Move chainbase calls out of try-CATCH_AND_EXIT_DB_FAILURE block
+- ([#9680](https://github.com/EOSIO/eos/pull/9680)) add fc change of add reason to copy
+- ([#9681](https://github.com/EOSIO/eos/pull/9681)) warning fix
+- ([#9685](https://github.com/EOSIO/eos/pull/9685)) Rocksdb rpc support
+- ([#9686](https://github.com/EOSIO/eos/pull/9686)) Pop back a delta with empty rows #9386
+- ([#9692](https://github.com/EOSIO/eos/pull/9692)) RocksDB - Renaming / creation of some parameters and change of default value for create_if_missing
+- ([#9694](https://github.com/EOSIO/eos/pull/9694)) net_plugin monitor heartbeat of peers
+- ([#9696](https://github.com/EOSIO/eos/pull/9696)) add fc support for boost 74 file copy
+- ([#9707](https://github.com/EOSIO/eos/pull/9707)) Updated unit tests for new SHiP delta present field semantics
+- ([#9712](https://github.com/EOSIO/eos/pull/9712)) Snapshot memory exhaustion
+- ([#9713](https://github.com/EOSIO/eos/pull/9713)) Updating abieos to the latest abieos on eosio branch
+- ([#9716](https://github.com/EOSIO/eos/pull/9716)) eosio-bios and eosio-boot contracts support for KV inside eosio
+
+## Documentation
+- ([#7758](https://github.com/EOSIO/eos/pull/7758)) [wip] Add cleos, keosd doc outline and content
+- ([#7963](https://github.com/EOSIO/eos/pull/7963)) Update README.md
+- ([#8369](https://github.com/EOSIO/eos/pull/8369)) Update EOSIO documentation (develop)
+- ([#8436](https://github.com/EOSIO/eos/pull/8436)) [develop] hotfix documentation links in README.md
+- ([#8494](https://github.com/EOSIO/eos/pull/8494)) chain_api_plugin swagger file - develop
+- ([#8576](https://github.com/EOSIO/eos/pull/8576)) [develop] Documentation patch 1 update
+- ([#8666](https://github.com/EOSIO/eos/pull/8666)) Fix broken link in producer plugin docs
+- ([#8809](https://github.com/EOSIO/eos/pull/8809)) Add initial Trace API plugin docs to nodeos
+- ([#8827](https://github.com/EOSIO/eos/pull/8827)) db_size_api_plugin swagger file
+- ([#8828](https://github.com/EOSIO/eos/pull/8828)) net_api_plugin swagger file
+- ([#8830](https://github.com/EOSIO/eos/pull/8830)) producer_api_plugin swagger file
+- ([#8831](https://github.com/EOSIO/eos/pull/8831)) test_control_api_plugin swagger
+- ([#8832](https://github.com/EOSIO/eos/pull/8832)) swagger configuration for docs
+- ([#8844](https://github.com/EOSIO/eos/pull/8844)) Trace API documentation update
+- ([#8921](https://github.com/EOSIO/eos/pull/8921)) [docs] trace api reference api correction
+- ([#9091](https://github.com/EOSIO/eos/pull/9091)) [docs] Add cleos validate signatures command reference
+- ([#9150](https://github.com/EOSIO/eos/pull/9150)) Fix inaccurate nodeos reference in wallet_api_plugin [docs]
+- ([#9151](https://github.com/EOSIO/eos/pull/9151)) Add default contract name clarifier in how to deploy smart contract [docs]
+- ([#9152](https://github.com/EOSIO/eos/pull/9152)) Add trace_api logger [docs]
+- ([#9153](https://github.com/EOSIO/eos/pull/9153)) Simplify create_snapshot POST request [docs]
+- ([#9154](https://github.com/EOSIO/eos/pull/9154)) Replace inaccurate wording in how to replay from snapshot [docs]
+- ([#9155](https://github.com/EOSIO/eos/pull/9155)) Fix Trace API reference request/response inaccuracies [docs]
+- ([#9156](https://github.com/EOSIO/eos/pull/9156)) Add missing reference to RPC API index [docs]
+- ([#9157](https://github.com/EOSIO/eos/pull/9157)) Fix title case issue in keosd how-to [docs]
+- ([#9158](https://github.com/EOSIO/eos/pull/9158)) Add conditional step in state history plugin how-to [docs]
+- ([#9208](https://github.com/EOSIO/eos/pull/9208)) add separate logging for state history plugin
+- ([#9270](https://github.com/EOSIO/eos/pull/9270)) New threshold for non privileged inline actions
+- ([#9279](https://github.com/EOSIO/eos/pull/9279)) [docs] Correct Producer API title in RPC reference
+- ([#9291](https://github.com/EOSIO/eos/pull/9291)) [docs] Fix character formatting in nodeos CLI option
+- ([#9320](https://github.com/EOSIO/eos/pull/9320)) [docs] Remove redundant nodeos replay example
+- ([#9321](https://github.com/EOSIO/eos/pull/9321)) [docs] Remove unneeded options for nodeos replays
+- ([#9339](https://github.com/EOSIO/eos/pull/9339)) [docs] Add chain plugin options that support SHiP logging
+- ([#9374](https://github.com/EOSIO/eos/pull/9374)) [docs] Fix broken link in Wallet API plugin
+- ([#9400](https://github.com/EOSIO/eos/pull/9400)) [docs] add return value from actions cleos output explanation and samples
+- ([#9465](https://github.com/EOSIO/eos/pull/9465)) [docs] Create nodeos concepts folder and rearrange folders
+- ([#9466](https://github.com/EOSIO/eos/pull/9466)) Fix missing whitespace in yaml chain_api_plugin swagger
+- ([#9470](https://github.com/EOSIO/eos/pull/9470)) [docs] Fix documentation how-to for delegating cpu with cleos
+- ([#9471](https://github.com/EOSIO/eos/pull/9471)) [docs] Fix documentation how-to for delegating net with cleos
+- ([#9504](https://github.com/EOSIO/eos/pull/9504)) [docs] Add prune CFD explainers, how-tos, utilities
+- ([#9506](https://github.com/EOSIO/eos/pull/9506)) [docs] Add slices, trace log, clog format explainers to Trace API plugin
+- ([#9508](https://github.com/EOSIO/eos/pull/9508)) [docs] Add WASM interface C++ reference documentation
+- ([#9509](https://github.com/EOSIO/eos/pull/9509)) [docs] Update supported OS platforms for EOSIO 2.1
+- ([#9557](https://github.com/EOSIO/eos/pull/9557)) [docs] Add get_block_info RPC reference and use 3.0 schemata links
+- ([#9561](https://github.com/EOSIO/eos/pull/9561)) Adding state store config docs
+- ([#9565](https://github.com/EOSIO/eos/pull/9565)) [docs] Add trace_api_util reference to eosio utilities docs
+- ([#9581](https://github.com/EOSIO/eos/pull/9581)) Make bios-boot-tutorial.py not rely on prior version of system contracts
+- ([#9583](https://github.com/EOSIO/eos/pull/9583)) [docs] Add cleos get kv_table reference documentation
+- ([#9590](https://github.com/EOSIO/eos/pull/9590)) [docs] Various additions/fixes to cleos reference
+- ([#9601](https://github.com/EOSIO/eos/pull/9601)) [docs] Fix broken anchor link on MacOS build from source
+- ([#9606](https://github.com/EOSIO/eos/pull/9606)) last_irreversible_block_time added to get_info API
+- ([#9618](https://github.com/EOSIO/eos/pull/9618)) [docs] Update cleos get kv_table reference
+- ([#9630](https://github.com/EOSIO/eos/pull/9630)) [docs] Update get_table_* reference in Chain API
+- ([#9687](https://github.com/EOSIO/eos/pull/9687)) [docs] adding third party logging and tracing integration documentation for
+
+## Thanks!
+Special thanks to the community contributors that submitted patches for this release:
+- @MrToph
+- @conr2d
+- @javierjmc
diff --git a/docs/30_release-notes/index.md b/docs/30_release-notes/index.md
index 067b03c515c..ab9e8592db3 100644
--- a/docs/30_release-notes/index.md
+++ b/docs/30_release-notes/index.md
@@ -1,20 +1,65 @@
---
-content_title: EOSIO v2.0.11 Release Notes
+content_title: EOSIO v2.1.0-rc3 Release Notes
---
-This release contains security and miscellaneous fixes.
+This is a ***RELEASE CANDIDATE*** for version 2.1.0.
+
+This release contains security, stability, and miscellaneous fixes.
## Security bug fixes
-### Consolidated Security Fixes for v2.0.11 ([#10147](https://github.com/EOSIO/eos/pull/10147))
-- Fix issue with account query db that could result in incorrect data or hung processes
+### Consolidated Security Fixes for v2.1.0-rc3 ([#9869](https://github.com/EOSIO/eos/pull/9869))
+- Fixes to packed_transaction cache
+- Transaction account fail limit refactor
Note: These security fixes are relevant to all nodes on EOSIO blockchain networks.
+## Stability bug fixes
+- ([#9864](https://github.com/EOSIO/eos/pull/9864)) fix incorrect transaction_extensions declaration
+- ([#9880](https://github.com/EOSIO/eos/pull/9880)) Fix ship big vector serialization
+- ([#9896](https://github.com/EOSIO/eos/pull/9896)) Fix state_history zlib_unpack bug
+- ([#9909](https://github.com/EOSIO/eos/pull/9909)) Fix state_history::length_writer
+- ([#9986](https://github.com/EOSIO/eos/pull/9986)) EPE-389 fix net_plugin stall during head_catchup - merge release/2.1.x
+- ([#9988](https://github.com/EOSIO/eos/pull/9988)) refactor kv get rows 2.1.x
+- ([#9989](https://github.com/EOSIO/eos/pull/9989)) Explicit ABI conversion of signed_transaction - merge 2.1.x
+- ([#10027](https://github.com/EOSIO/eos/pull/10027)) EPE-165: Improve logic for unlinkable blocks while sync'ing
+- ([#10028](https://github.com/EOSIO/eos/pull/10028)) use p2p address for duplicate connection resolution
+
## Other changes
-- ([#10063](https://github.com/EOSIO/eos/pull/10063)) [release 2.0.x] Fix docker steps on tagged builds.
-- ([#10135](https://github.com/EOSIO/eos/pull/10135)) Wlb/adding nodeos param tests 2.0.x
-- ([#10133](https://github.com/EOSIO/eos/pull/10133)) fix compiling with boost 1.76; add include in chainbase - 2.0
+- ([#9858](https://github.com/EOSIO/eos/pull/9858)) Fix problem when using ubuntu libpqxx package
+- ([#9863](https://github.com/EOSIO/eos/pull/9863)) chain_plugin db intrinsic table RPC calls incorrectly handling --lower and --upper in certain scenarios
+- ([#9882](https://github.com/EOSIO/eos/pull/9882)) merge back fix build problem on cmake3.10
+- ([#9884](https://github.com/EOSIO/eos/pull/9884)) Fix problem with libpqxx 7.3.0 upgrade
+- ([#9893](https://github.com/EOSIO/eos/pull/9893)) EOS VM OC: Support LLVM 11 - 2.1
+- ([#9900](https://github.com/EOSIO/eos/pull/9900)) Create Docker image with the eos binary and push to Dockerhub
+- ([#9906](https://github.com/EOSIO/eos/pull/9906)) Add log path for unsupported log version exception
+- ([#9930](https://github.com/EOSIO/eos/pull/9930)) Fix intermittent forked chain test failure
+- ([#9931](https://github.com/EOSIO/eos/pull/9931)) trace history log messages should print nicely in syslog
+- ([#9942](https://github.com/EOSIO/eos/pull/9942)) Fix "cleos net peers" command error
+- ([#9943](https://github.com/EOSIO/eos/pull/9943)) Create eosio-debug-build Pipeline
+- ([#9953](https://github.com/EOSIO/eos/pull/9953)) EPE-482 Fixed warning due to unreferenced label
+- ([#9956](https://github.com/EOSIO/eos/pull/9956)) PowerTools is now powertools in CentOS 8.3 - 2.1
+- ([#9958](https://github.com/EOSIO/eos/pull/9958)) merge back PR 9898 fix non-root build script for ensure-libpq...
+- ([#9959](https://github.com/EOSIO/eos/pull/9959)) merge back PR 9899, try using oob cmake so as to save building time
+- ([#9970](https://github.com/EOSIO/eos/pull/9970)) Updating to the new Docker hub repo EOSIO instead EOS
+- ([#9975](https://github.com/EOSIO/eos/pull/9975)) Release/2.1.x: Add additional contract to test_exhaustive_snapshot
+- ([#9983](https://github.com/EOSIO/eos/pull/9983)) Add warning interval option for resource monitor plugin
+- ([#9994](https://github.com/EOSIO/eos/pull/9994)) Add unit tests for new fields added for get account in PR#9838
+- ([#10014](https://github.com/EOSIO/eos/pull/10014)) [release 2.1.x] Fix LRT triggers
+- ([#10020](https://github.com/EOSIO/eos/pull/10020)) revert changes to empty string as present for lower_bound, upper_bound,or index_value
+- ([#10031](https://github.com/EOSIO/eos/pull/10031)) [release 2.1.x] Fix MacOS base image failures
+- ([#10042](https://github.com/EOSIO/eos/pull/10042)) [release 2.1.x] Updated Mojave libpqxx dependency
+- ([#10046](https://github.com/EOSIO/eos/pull/10046)) Reduce Docker Hub Manifest Queries
+- ([#10054](https://github.com/EOSIO/eos/pull/10054)) Fix multiversion test failure - merge 2.1.x
## Documentation
-- ([#10094](https://github.com/EOSIO/eos/pull/10094)) [docs] Add EOSIO 2.0.10 release notes to dev portal - 2.0
+- ([#9825](https://github.com/EOSIO/eos/pull/9825)) [docs] add how to: local testnet with consensus
+- ([#9908](https://github.com/EOSIO/eos/pull/9908)) Add MacOS 10.15 (Catalina) to list of supported OSs in README
+- ([#9914](https://github.com/EOSIO/eos/pull/9914)) [docs] add improvements based on code review
+- ([#9921](https://github.com/EOSIO/eos/pull/9921)) [docs] 2.1.x local testnet with consensus
+- ([#9925](https://github.com/EOSIO/eos/pull/9925)) [docs] cleos doc-a-thon feedback
+- ([#9933](https://github.com/EOSIO/eos/pull/9933)) [docs] cleos doc-a-thon feedback 2
+- ([#9934](https://github.com/EOSIO/eos/pull/9934)) [docs] cleos doc-a-thon feedback 3
+- ([#9938](https://github.com/EOSIO/eos/pull/9938)) [docs] cleos doc-a-thon feedback 4
+- ([#9952](https://github.com/EOSIO/eos/pull/9952)) [docs] 2.1.x - improve annotation for db_update_i64
+- ([#10009](https://github.com/EOSIO/eos/pull/10009)) [docs] Update various cleos how-tos and fix index - 2.1
diff --git a/docs/index.md b/docs/index.md
index 9cfcdb8292e..962eadf61a4 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -14,8 +14,7 @@ The basic relationship between these components is illustrated in the diagram be
Additional EOSIO Resources:
* [EOSIO Utilities](10_utilities/index.md) - Utilities that complement the EOSIO software.
-* [Upgrade Guide](20_upgrade-guide/index.md) - EOSIO version/protocol upgrade guide.
-* [Release Notes](30_release-notes/index.md) - All release notes for this EOSIO version.
+* [Upgrade Guides](20_upgrade-guides/index.md) - EOSIO version/protocol upgrade guides.
[[info | What's Next?]]
| [Install the EOSIO Software](00_install/index.md) before exploring the sections above.
diff --git a/eosio-wasm-spec-tests b/eosio-wasm-spec-tests
index 25c46086d69..22f7f62d545 160000
--- a/eosio-wasm-spec-tests
+++ b/eosio-wasm-spec-tests
@@ -1 +1 @@
-Subproject commit 25c46086d694f5973ae1123e6a8aaa6e7232a2d4
+Subproject commit 22f7f62d5451ee57f14b2c3b9f62e35da50560f1
diff --git a/libraries/CMakeLists.txt b/libraries/CMakeLists.txt
index d8b2168a2d7..59495bae32b 100644
--- a/libraries/CMakeLists.txt
+++ b/libraries/CMakeLists.txt
@@ -1,3 +1,18 @@
+option(PORTABLE CACHE ON) # rocksdb: don't use sse4.2
+option(WITH_GFLAGS CACHE OFF) # rocksdb: don't use gflags
+option(WITH_TESTS CACHE OFF) # rocksdb: don't build this
+option(WITH_TOOLS CACHE OFF) # rocksdb: don't build this
+option(WITH_BENCHMARK_TOOLS CACHE OFF) # rocksdb: don't build this
+option(FAIL_ON_WARNINGS CACHE OFF) # rocksdb: stop the madness: warnings change over time
+
+#on Linux, rocksdb will monkey with CMAKE_INSTALL_PREFIX is this is on
+set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OFF)
+# rocksdb disables USE_RTTI for release build, which breaks
+# exception handling on MacOS.
+if(APPLE)
+ set(USE_RTTI ON)
+endif()
+
add_subdirectory( fc )
add_subdirectory( builtins )
add_subdirectory( softfloat )
@@ -7,13 +22,11 @@ add_subdirectory( appbase )
add_subdirectory( chain )
add_subdirectory( testing )
add_subdirectory( version )
-
-#turn tools&tests off; not needed for library build
-set(BUILD_TESTS OFF CACHE BOOL "Build GTest-based tests")
-set(BUILD_TOOLS OFF CACHE BOOL "Build wabt tools")
-set(RUN_RE2C OFF CACHE BOOL "Run re2c")
-set(WITH_EXCEPTIONS ON CACHE BOOL "Build with exceptions enabled" FORCE)
-add_subdirectory( wabt )
+add_subdirectory( state_history )
+add_subdirectory( abieos )
+add_subdirectory( rocksdb )
+add_subdirectory( chain_kv )
+add_subdirectory( se-helpers )
set(USE_EXISTING_SOFTFLOAT ON CACHE BOOL "use pre-exisiting softfloat lib")
set(ENABLE_TOOLS OFF CACHE BOOL "Build tools")
@@ -38,3 +51,8 @@ set_property(GLOBAL PROPERTY CTEST_CUSTOM_TESTS_IGNORE
"change_authkey import_ed decrypt_ec decrypt_rsa ssh logs generate_rsa import_ec echo\
yubico_otp wrap_data wrap info import_rsa import_authkey generate_hmac generate_ec\
attest pbkdf2 parsing ${_CTEST_CUSTOM_TESTS_IGNORE}")
+
+find_package(OpenSSL REQUIRED)
+option(AMQP-CPP_LINUX_TCP CACHE ON)
+add_subdirectory( amqp-cpp EXCLUDE_FROM_ALL )
+target_include_directories(amqpcpp PRIVATE "${OPENSSL_INCLUDE_DIR}")
diff --git a/libraries/abieos b/libraries/abieos
new file mode 160000
index 00000000000..e5dad451c2b
--- /dev/null
+++ b/libraries/abieos
@@ -0,0 +1 @@
+Subproject commit e5dad451c2b1cb58b0d53573ab98e5a8ed8455a6
diff --git a/libraries/amqp-cpp b/libraries/amqp-cpp
new file mode 160000
index 00000000000..e7f76bc75d7
--- /dev/null
+++ b/libraries/amqp-cpp
@@ -0,0 +1 @@
+Subproject commit e7f76bc75d7855012450763a638092925d52f417
diff --git a/libraries/appbase b/libraries/appbase
index 26957646dda..144b2e239d6 160000
--- a/libraries/appbase
+++ b/libraries/appbase
@@ -1 +1 @@
-Subproject commit 26957646dda6245ad97e205dae878cc3c65141cf
+Subproject commit 144b2e239d6fd93a8336543bf9eda7c52ea8c77e
diff --git a/libraries/chain/CMakeLists.txt b/libraries/chain/CMakeLists.txt
index e5f9c9ef988..d4c1bbb6e43 100644
--- a/libraries/chain/CMakeLists.txt
+++ b/libraries/chain/CMakeLists.txt
@@ -18,23 +18,27 @@ else()
endif()
if("eos-vm-oc" IN_LIST EOSIO_WASM_RUNTIMES)
- set(CHAIN_EOSVMOC_SOURCES webassembly/eos-vm-oc/code_cache.cpp
- webassembly/eos-vm-oc/executor.cpp
- webassembly/eos-vm-oc/memory.cpp
- webassembly/eos-vm-oc/intrinsic.cpp
- webassembly/eos-vm-oc/LLVMJIT.cpp
- webassembly/eos-vm-oc/LLVMEmitIR.cpp
- webassembly/eos-vm-oc/compile_monitor.cpp
- webassembly/eos-vm-oc/compile_trampoline.cpp
- webassembly/eos-vm-oc/ipc_helpers.cpp
- webassembly/eos-vm-oc/gs_seg_helpers.c
- webassembly/eos-vm-oc.cpp)
+ enable_language(ASM)
+ set(CHAIN_EOSVMOC_SOURCES webassembly/runtimes/eos-vm-oc/code_cache.cpp
+ webassembly/runtimes/eos-vm-oc/executor.cpp
+ webassembly/runtimes/eos-vm-oc/memory.cpp
+ webassembly/runtimes/eos-vm-oc/intrinsic.cpp
+ webassembly/runtimes/eos-vm-oc/LLVMJIT.cpp
+ webassembly/runtimes/eos-vm-oc/LLVMEmitIR.cpp
+ webassembly/runtimes/eos-vm-oc/compile_monitor.cpp
+ webassembly/runtimes/eos-vm-oc/compile_trampoline.cpp
+ webassembly/runtimes/eos-vm-oc/ipc_helpers.cpp
+ webassembly/runtimes/eos-vm-oc/gs_seg_helpers.c
+ webassembly/runtimes/eos-vm-oc/stack.cpp
+ webassembly/runtimes/eos-vm-oc/switch_stack_linux.s
+ webassembly/runtimes/eos-vm-oc.cpp
+ webassembly/runtimes/eos-vm-oc/default_real_main.cpp)
if(LLVM_VERSION VERSION_LESS 7.1 AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
enable_language(ASM-LLVMWAR)
- list(APPEND CHAIN_EOSVMOC_SOURCES webassembly/eos-vm-oc/llvmWARshim.llvmwar)
+ list(APPEND CHAIN_EOSVMOC_SOURCES webassembly/runtimes/eos-vm-oc/llvmWARshim.llvmwar)
else()
- list(APPEND CHAIN_EOSVMOC_SOURCES webassembly/eos-vm-oc/llvmWARshim.cpp)
+ list(APPEND CHAIN_EOSVMOC_SOURCES webassembly/runtimes/eos-vm-oc/llvmWARshim.cpp)
endif()
llvm_map_components_to_libnames(LLVM_LIBS support core passes mcjit native orcjit)
@@ -45,10 +49,30 @@ if("eos-vm-oc" IN_LIST EOSIO_WASM_RUNTIMES)
endif()
if("eos-vm" IN_LIST EOSIO_WASM_RUNTIMES OR "eos-vm-jit" IN_LIST EOSIO_WASM_RUNTIMES)
- set(CHAIN_EOSVM_SOURCES "webassembly/eos-vm.cpp")
+ set(CHAIN_EOSVM_SOURCES "webassembly/runtimes/eos-vm.cpp")
set(CHAIN_EOSVM_LIBRARIES eos-vm)
endif()
+set(CHAIN_WEBASSEMBLY_SOURCES
+ webassembly/action.cpp
+ webassembly/authorization.cpp
+ webassembly/cf_system.cpp
+ webassembly/cf_transaction.cpp
+ webassembly/compiler_builtins.cpp
+ webassembly/context_free.cpp
+ webassembly/console.cpp
+ webassembly/crypto.cpp
+ webassembly/database.cpp
+ webassembly/kv_database.cpp
+ webassembly/memory.cpp
+ webassembly/permission.cpp
+ webassembly/privileged.cpp
+ webassembly/producer.cpp
+ webassembly/softfloat.cpp
+ webassembly/system.cpp
+ webassembly/transaction.cpp
+)
+
## SORT .cpp by most likely to change / break compile
add_library( eosio_chain
merkle.cpp
@@ -59,6 +83,7 @@ add_library( eosio_chain
block_header_state.cpp
block_state.cpp
fork_database.cpp
+ combined_database.cpp
controller.cpp
authorization_manager.cpp
resource_limits.cpp
@@ -72,25 +97,21 @@ add_library( eosio_chain
genesis_state.cpp
${CMAKE_CURRENT_BINARY_DIR}/genesis_state_root_key.cpp
-# chain_config.cpp
-# block_trace.cpp
wast_to_wasm.cpp
wasm_interface.cpp
wasm_eosio_validation.cpp
wasm_eosio_injection.cpp
+ wasm_config.cpp
apply_context.cpp
abi_serializer.cpp
asset.cpp
snapshot.cpp
- webassembly/wabt.cpp
${CHAIN_EOSVMOC_SOURCES}
${CHAIN_EOSVM_SOURCES}
+ ${CHAIN_WEBASSEMBLY_SOURCES}
-# get_config.cpp
-#
-# contracts/chain_initializer.cpp
-
+ authority.cpp
trace.cpp
transaction_metadata.cpp
protocol_state_object.cpp
@@ -101,23 +122,32 @@ add_library( eosio_chain
whitelisted_intrinsics.cpp
thread_utils.cpp
platform_timer_accuracy.cpp
+ backing_store/kv_context.cpp
+ backing_store/db_context.cpp
+ backing_store/db_context_chainbase.cpp
+ backing_store/db_context_rocksdb.cpp
+ backing_store/db_key_value_format.cpp
+ backing_store/db_key_value_any_lookup.cpp
${PLATFORM_TIMER_IMPL}
${HEADERS}
)
target_link_libraries( eosio_chain fc chainbase Logging IR WAST WASM Runtime
- softfloat builtins wabt ${CHAIN_EOSVM_LIBRARIES} ${LLVM_LIBS} ${CHAIN_RT_LINKAGE}
+ softfloat builtins rocksdb ${CHAIN_EOSVM_LIBRARIES} ${LLVM_LIBS} ${CHAIN_RT_LINKAGE}
)
target_include_directories( eosio_chain
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_BINARY_DIR}/include"
"${CMAKE_CURRENT_SOURCE_DIR}/../wasm-jit/Include"
"${CMAKE_CURRENT_SOURCE_DIR}/libraries/eos-vm/include"
- "${CMAKE_SOURCE_DIR}/libraries/wabt"
- "${CMAKE_BINARY_DIR}/libraries/wabt"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../rocksdb/include"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../chain_kv/include"
)
+add_library(eosio_chain_wrap INTERFACE )
+target_link_libraries(eosio_chain_wrap INTERFACE eosio_chain)
+
if("eos-vm-oc" IN_LIST EOSIO_WASM_RUNTIMES)
- target_link_libraries(eosio_chain "-Wl,-wrap=main")
+ target_link_libraries(eosio_chain_wrap INTERFACE "-Wl,-wrap=main")
endif()
foreach(RUNTIME ${EOSIO_WASM_RUNTIMES})
@@ -131,6 +161,8 @@ if(EOSVMOC_ENABLE_DEVELOPER_OPTIONS)
target_compile_definitions(eosio_chain PUBLIC EOSIO_EOS_VM_OC_DEVELOPER)
endif()
+add_subdirectory ( backing_store/tests )
+
install( TARGETS eosio_chain
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}
diff --git a/libraries/chain/abi_serializer.cpp b/libraries/chain/abi_serializer.cpp
index 7f72e0f66cb..04bcaa8871b 100644
--- a/libraries/chain/abi_serializer.cpp
+++ b/libraries/chain/abi_serializer.cpp
@@ -38,7 +38,7 @@ namespace eosio { namespace chain {
if( is_array )
fc::raw::pack( ds, var.as>() );
else if ( is_optional )
- fc::raw::pack( ds, var.as>() );
+ fc::raw::pack( ds, var.as>() );
else
fc::raw::pack( ds, var.as());
};
@@ -51,7 +51,7 @@ namespace eosio { namespace chain {
if( is_array )
return variant_from_stream>(stream);
else if ( is_optional )
- return variant_from_stream>(stream);
+ return variant_from_stream>(stream);
return variant_from_stream(stream);
},
pack_function()
@@ -65,7 +65,7 @@ namespace eosio { namespace chain {
if( is_array )
return variant_from_stream>(stream);
else if ( is_optional )
- return variant_from_stream>(stream);
+ return variant_from_stream>(stream);
return variant_from_stream(stream, yield);
},
pack_function()
@@ -77,11 +77,6 @@ namespace eosio { namespace chain {
set_abi(abi, yield);
}
- abi_serializer::abi_serializer( const abi_def& abi, const fc::microseconds& max_serialization_time) {
- configure_built_in_types();
- set_abi(abi, max_serialization_time);
- }
-
void abi_serializer::add_specialized_unpack_pack( const string& name,
std::pair unpack_pack ) {
built_in_types[name] = std::move( unpack_pack );
@@ -139,8 +134,10 @@ namespace eosio { namespace chain {
structs.clear();
actions.clear();
tables.clear();
+ kv_tables.clear();
error_messages.clear();
variants.clear();
+ action_results.clear();
for( const auto& st : abi.structs )
structs[st.name] = st;
@@ -157,12 +154,18 @@ namespace eosio { namespace chain {
for( const auto& t : abi.tables )
tables[t.name] = t.type;
+ for( const auto& kt : abi.kv_tables.value )
+ kv_tables[kt.first] = kt.second;
+
for( const auto& e : abi.error_messages )
error_messages[e.error_code] = e.error_msg;
for( const auto& v : abi.variants.value )
variants[v.name] = v;
+ for( const auto& r : abi.action_results.value )
+ action_results[r.name] = r.result_type;
+
/**
* The ABI vector may contain duplicates which would make it
* an invalid ABI
@@ -171,16 +174,14 @@ namespace eosio { namespace chain {
EOS_ASSERT( structs.size() == abi.structs.size(), duplicate_abi_struct_def_exception, "duplicate struct definition detected" );
EOS_ASSERT( actions.size() == abi.actions.size(), duplicate_abi_action_def_exception, "duplicate action definition detected" );
EOS_ASSERT( tables.size() == abi.tables.size(), duplicate_abi_table_def_exception, "duplicate table definition detected" );
+ EOS_ASSERT( kv_tables.size() == abi.kv_tables.value.size(), duplicate_abi_kv_table_def_exception, "duplicate kv table definition detected" );
EOS_ASSERT( error_messages.size() == abi.error_messages.size(), duplicate_abi_err_msg_def_exception, "duplicate error message definition detected" );
EOS_ASSERT( variants.size() == abi.variants.value.size(), duplicate_abi_variant_def_exception, "duplicate variant definition detected" );
+ EOS_ASSERT( action_results.size() == abi.action_results.value.size(), duplicate_abi_action_results_def_exception, "duplicate action results definition detected" );
validate(ctx);
}
- void abi_serializer::set_abi(const abi_def& abi, const fc::microseconds& max_serialization_time) {
- return set_abi(abi, create_yield_function(max_serialization_time));
- }
-
bool abi_serializer::is_builtin_type(const std::string_view& type)const {
return built_in_types.find(type) != built_in_types.end();
}
@@ -215,8 +216,8 @@ namespace eosio { namespace chain {
return _is_type(type, ctx);
}
- bool abi_serializer::is_type(const std::string_view& type, const fc::microseconds& max_serialization_time) const {
- return is_type(type, create_yield_function(max_serialization_time));
+ bool abi_serializer::is_kv_table(const std::string_view& type)const {
+ return kv_tables.find(name(type)) != kv_tables.end();
}
std::string_view abi_serializer::fundamental_type(const std::string_view& type)const {
@@ -243,6 +244,9 @@ namespace eosio { namespace chain {
if( typedefs.find(type) != typedefs.end() ) return _is_type(typedefs.find(type)->second, ctx);
if( structs.find(type) != structs.end() ) return true;
if( variants.find(type) != variants.end() ) return true;
+ if( eosio::chain::is_string_valid_name(type) ) {
+ if( kv_tables.find(name(type)) != kv_tables.end() ) return true;
+ }
return false;
}
@@ -301,6 +305,18 @@ namespace eosio { namespace chain {
ctx.check_deadline();
EOS_ASSERT(_is_type(t.second, ctx), invalid_type_inside_abi, "${type}", ("type",impl::limit_size(t.second)) );
} FC_CAPTURE_AND_RETHROW( (t) ) }
+
+ for( const auto& kt : kv_tables ) {
+ ctx.check_deadline();
+ EOS_ASSERT(_is_type(kt.second.type, ctx), invalid_type_inside_abi,
+ "Invalid reference in struct ${type}", ("type", impl::limit_size(kt.second.type)));
+ EOS_ASSERT( !kt.second.primary_index.type.empty(), invalid_type_inside_abi, "missing primary index$ {p}", ("p",impl::limit_size(kt.first.to_string())));
+ }
+
+ for( const auto& r : action_results ) { try {
+ ctx.check_deadline();
+ EOS_ASSERT(_is_type(r.second, ctx), invalid_type_inside_abi, "${type}", ("type",impl::limit_size(r.second)) );
+ } FC_CAPTURE_AND_RETHROW( (r) ) }
}
std::string_view abi_serializer::resolve_type(const std::string_view& type)const {
@@ -394,7 +410,7 @@ namespace eosio { namespace chain {
} else {
auto v_itr = variants.find(rtype);
if( v_itr != variants.end() ) {
- ctx.hint_variant_type_if_in_array( v_itr );
+ ctx.hint_variant_type_if_in_array(v_itr);
fc::unsigned_int select;
try {
fc::raw::unpack(stream, select);
@@ -404,6 +420,13 @@ namespace eosio { namespace chain {
auto h1 = ctx.push_to_path( impl::variant_path_item{ .variant_itr = v_itr, .variant_ordinal = static_cast(select) } );
return vector{v_itr->second.types[select], _binary_to_variant(v_itr->second.types[select], stream, ctx)};
}
+
+ if( !kv_tables.empty() && is_string_valid_name(rtype) ) {
+ if( auto kv_itr = kv_tables.find(name(rtype)); kv_itr != kv_tables.end() ) {
+ auto &kv_table = kv_itr->second;
+ return _binary_to_variant(kv_table.type, stream, ctx);
+ }
+ }
}
fc::mutable_variant_object mvo;
@@ -426,20 +449,12 @@ namespace eosio { namespace chain {
return _binary_to_variant(type, binary, ctx);
}
- fc::variant abi_serializer::binary_to_variant( const std::string_view& type, const bytes& binary, const fc::microseconds& max_serialization_time, bool short_path )const {
- return binary_to_variant( type, binary, create_yield_function(max_serialization_time), short_path );
- }
-
fc::variant abi_serializer::binary_to_variant( const std::string_view& type, fc::datastream& binary, const yield_function_t& yield, bool short_path )const {
impl::binary_to_variant_context ctx(*this, yield, type);
ctx.short_path = short_path;
return _binary_to_variant(type, binary, ctx);
}
- fc::variant abi_serializer::binary_to_variant( const std::string_view& type, fc::datastream& binary, const fc::microseconds& max_serialization_time, bool short_path )const {
- return binary_to_variant( type, binary, create_yield_function(max_serialization_time), short_path );
- }
-
void abi_serializer::_variant_to_binary( const std::string_view& type, const fc::variant& var, fc::datastream& ds, impl::variant_to_binary_context& ctx )const
{ try {
auto h = ctx.enter_scope();
@@ -540,6 +555,15 @@ namespace eosio { namespace chain {
} else {
EOS_THROW( pack_exception, "Unexpected input encountered while processing struct '${p}'", ("p",ctx.get_path_string()) );
}
+ } else if( var.is_object() ) {
+ if( !kv_tables.empty() && is_string_valid_name(rtype) ) {
+ if( auto kv_itr = kv_tables.find(name(rtype));kv_itr != kv_tables.end() ) {
+ auto& kv_table = kv_itr->second;
+ _variant_to_binary( kv_table.type, var, ds, ctx );
+ }
+ } else {
+ EOS_THROW(invalid_type_inside_abi, "Unknown type ${type}", ("type", ctx.maybe_shorten(type)));
+ }
} else {
EOS_THROW( invalid_type_inside_abi, "Unknown type ${type}", ("type",ctx.maybe_shorten(type)) );
}
@@ -565,20 +589,12 @@ namespace eosio { namespace chain {
return _variant_to_binary(type, var, ctx);
}
- bytes abi_serializer::variant_to_binary( const std::string_view& type, const fc::variant& var, const fc::microseconds& max_serialization_time, bool short_path ) const {
- return variant_to_binary( type, var, create_yield_function(max_serialization_time), short_path );
- }
-
void abi_serializer::variant_to_binary( const std::string_view& type, const fc::variant& var, fc::datastream& ds, const yield_function_t& yield, bool short_path )const {
impl::variant_to_binary_context ctx(*this, yield, type);
ctx.short_path = short_path;
_variant_to_binary(type, var, ds, ctx);
}
- void abi_serializer::variant_to_binary( const std::string_view& type, const fc::variant& var, fc::datastream& ds, const fc::microseconds& max_serialization_time, bool short_path ) const {
- variant_to_binary( type, var, create_yield_function(max_serialization_time), short_path );
- }
-
type_name abi_serializer::get_action_type(name action)const {
auto itr = actions.find(action);
if( itr != actions.end() ) return itr->second;
@@ -590,10 +606,23 @@ namespace eosio { namespace chain {
return type_name();
}
- optional abi_serializer::get_error_message( uint64_t error_code )const {
+ type_name abi_serializer::get_kv_table_type(name action)const {
+ if( auto itr = kv_tables.find(action);itr != kv_tables.end() )
+ return itr->second.type;
+
+ return type_name();
+ }
+
+ type_name abi_serializer::get_action_result_type(name action_result)const {
+ auto itr = action_results.find(action_result);
+ if( itr != action_results.end() ) return itr->second;
+ return type_name();
+ }
+
+ std::optional abi_serializer::get_error_message( uint64_t error_code )const {
auto itr = error_messages.find( error_code );
if( itr == error_messages.end() )
- return optional();
+ return std::optional();
return itr->second;
}
@@ -646,30 +675,30 @@ namespace eosio { namespace chain {
auto& b = path.back();
- EOS_ASSERT( b.contains(), abi_exception, "trying to set array index without first pushing new array index item" );
+ EOS_ASSERT( std::holds_alternative(b), abi_exception, "trying to set array index without first pushing new array index item" );
- b.get().array_index = i;
+ std::get(b).array_index = i;
}
void abi_traverse_context_with_path::hint_array_type_if_in_array() {
- if( path.size() == 0 || !path.back().contains() )
+ if( path.size() == 0 || !std::holds_alternative(path.back()) )
return;
- path.back().get().type_hint = array_type_path_root{};
+ std::get(path.back()).type_hint = array_type_path_root{};
}
void abi_traverse_context_with_path::hint_struct_type_if_in_array( const map::const_iterator& itr ) {
- if( path.size() == 0 || !path.back().contains() )
+ if( path.size() == 0 || !std::holds_alternative(path.back()) )
return;
- path.back().get().type_hint = struct_type_path_root{ .struct_itr = itr };
+ std::get(path.back()).type_hint = struct_type_path_root{ .struct_itr = itr };
}
void abi_traverse_context_with_path::hint_variant_type_if_in_array( const map::const_iterator& itr ) {
- if( path.size() == 0 || !path.back().contains() )
+ if( path.size() == 0 || !std::holds_alternative(path.back()) )
return;
- path.back().get().type_hint = variant_type_path_root{ .variant_itr = itr };
+ std::get(path.back()).type_hint = variant_type_path_root{ .variant_itr = itr };
}
constexpr size_t const_strlen( const char* str )
@@ -789,13 +818,13 @@ namespace eosio { namespace chain {
void operator()( const array_index_path_item& item ) {
const auto& th = item.type_hint;
- if( th.contains() ) {
- const auto& str = th.get().struct_itr->first;
+ if( std::holds_alternative(th) ) {
+ const auto& str = std::get(th).struct_itr->first;
output_name( s, str, shorten_names );
- } else if( th.contains() ) {
- const auto& str = th.get().variant_itr->first;
+ } else if( std::holds_alternative(th) ) {
+ const auto& str = std::get(th).variant_itr->first;
output_name( s, str, shorten_names );
- } else if( th.contains() ) {
+ } else if( std::holds_alternative(th) ) {
s << "ARRAY";
} else {
s << "UNKNOWN";
@@ -819,21 +848,21 @@ namespace eosio { namespace chain {
generate_path_string_visitor visitor(shorten_names, !full_path);
if( full_path )
- root_of_path.visit( visitor );
+ std::visit( visitor, root_of_path );
for( size_t i = 0, n = path.size(); i < n; ++i ) {
- if( full_path && !path[i].contains() )
+ if( full_path && !std::holds_alternative(path[i]) )
visitor.add_dot();
- path[i].visit( visitor );
+ std::visit( visitor, path[i] );
}
if( !full_path ) {
- if( visitor.last_path_item.contains() ) {
- root_of_path.visit( visitor );
+ if( std::holds_alternative(visitor.last_path_item) ) {
+ std::visit( visitor, root_of_path );
} else {
path_item_type_visitor vis2(visitor.s, shorten_names);
- visitor.last_path_item.visit(vis2);
+ std::visit(vis2, visitor.last_path_item);
}
}
diff --git a/libraries/chain/apply_context.cpp b/libraries/chain/apply_context.cpp
index df192fa0fa1..741a5a5c550 100644
--- a/libraries/chain/apply_context.cpp
+++ b/libraries/chain/apply_context.cpp
@@ -11,11 +11,14 @@
#include
#include
#include
+#include
using boost::container::flat_set;
namespace eosio { namespace chain {
+using db_context = backing_store::db_context;
+
static inline void print_debug(account_name receiver, const action_trace& ar) {
if (!ar.console.empty()) {
auto prefix = fc::format_string(
@@ -43,80 +46,122 @@ apply_context::apply_context(controller& con, transaction_context& trx_ctx, uint
,idx_double(*this)
,idx_long_double(*this)
{
+ kv_iterators.emplace_back(); // the iterator handle with value 0 is reserved
action_trace& trace = trx_ctx.get_action_trace(action_ordinal);
act = &trace.act;
receiver = trace.receiver;
context_free = trace.context_free;
+ _db_context = control.kv_db().create_db_context(*this, receiver);
+}
+
+template
+void apply_context::check_unprivileged_resource_usage(const char* resource, const flat_set& deltas) {
+ const size_t checktime_interval = 10;
+ const bool not_in_notify_context = (receiver == act->account);
+ size_t counter = 0;
+ for (const auto& entry : deltas) {
+ if (counter == checktime_interval) {
+ trx_context.checktime();
+ counter = 0;
+ }
+ if (entry.delta > 0 && entry.account != receiver) {
+ EOS_ASSERT(not_in_notify_context, Exception,
+ "unprivileged contract cannot increase ${resource} usage of another account within a notify context: "
+ "${account}",
+ ("resource", resource)
+ ("account", entry.account));
+ EOS_ASSERT(has_authorization(entry.account), Exception,
+ "unprivileged contract cannot increase ${resource} usage of another account that has not authorized the "
+ "action: ${account}",
+ ("resource", resource)
+ ("account", entry.account));
+ }
+ ++counter;
+ }
}
void apply_context::exec_one()
{
auto start = fc::time_point::now();
- action_receipt r;
- r.receiver = receiver;
- r.act_digest = digest_type::hash(*act);
+ digest_type act_digest;
const auto& cfg = control.get_global_properties().configuration;
const account_metadata_object* receiver_account = nullptr;
+
+ auto handle_exception = [&](const auto& e)
+ {
+ action_trace& trace = trx_context.get_action_trace( action_ordinal );
+ trace.error_code = controller::convert_exception_to_error_code( e );
+ trace.except = e;
+ finalize_trace( trace, start );
+ throw;
+ };
+
try {
try {
+ action_return_value.clear();
+ kv_iterators.resize(1);
+ kv_destroyed_iterators.clear();
+ if (!context_free) {
+ kv_backing_store = control.kv_db().create_kv_context(receiver, create_kv_resource_manager(*this), control.get_global_properties().kv_configuration);
+ }
receiver_account = &db.get( receiver );
- privileged = receiver_account->is_privileged();
- auto native = control.find_apply_handler( receiver, act->account, act->name );
- if( native ) {
- if( trx_context.enforce_whiteblacklist && control.is_producing_block() ) {
- control.check_contract_list( receiver );
- control.check_action_list( act->account, act->name );
+ if( !(context_free && control.skip_trx_checks()) ) {
+ privileged = receiver_account->is_privileged();
+ auto native = control.find_apply_handler( receiver, act->account, act->name );
+ if( native ) {
+ if( trx_context.enforce_whiteblacklist && control.is_producing_block() ) {
+ control.check_contract_list( receiver );
+ control.check_action_list( act->account, act->name );
+ }
+ (*native)( *this );
}
- (*native)( *this );
- }
- if( ( receiver_account->code_hash != digest_type() ) &&
- ( !( act->account == config::system_account_name
- && act->name == N( setcode )
- && receiver == config::system_account_name )
- || control.is_builtin_activated( builtin_protocol_feature_t::forward_setcode )
- )
- ) {
- if( trx_context.enforce_whiteblacklist && control.is_producing_block() ) {
- control.check_contract_list( receiver );
- control.check_action_list( act->account, act->name );
+ if( ( receiver_account->code_hash != digest_type() ) &&
+ ( !( act->account == config::system_account_name
+ && act->name == "setcode"_n
+ && receiver == config::system_account_name )
+ || control.is_builtin_activated( builtin_protocol_feature_t::forward_setcode )
+ )
+ ) {
+ if( trx_context.enforce_whiteblacklist && control.is_producing_block() ) {
+ control.check_contract_list( receiver );
+ control.check_action_list( act->account, act->name );
+ }
+ try {
+ control.get_wasm_interface().apply( receiver_account->code_hash, receiver_account->vm_type, receiver_account->vm_version, *this );
+ } catch( const wasm_exit& ) {}
}
- try {
- control.get_wasm_interface().apply( receiver_account->code_hash, receiver_account->vm_type, receiver_account->vm_version, *this );
- } catch( const wasm_exit& ) {}
- }
- if( !privileged && control.is_builtin_activated( builtin_protocol_feature_t::ram_restrictions ) ) {
- const size_t checktime_interval = 10;
- size_t counter = 0;
- bool not_in_notify_context = (receiver == act->account);
- const auto end = _account_ram_deltas.end();
- for( auto itr = _account_ram_deltas.begin(); itr != end; ++itr, ++counter ) {
- if( counter == checktime_interval ) {
- trx_context.checktime();
- counter = 0;
- }
- if( itr->delta > 0 && itr->account != receiver ) {
- EOS_ASSERT( not_in_notify_context, unauthorized_ram_usage_increase,
- "unprivileged contract cannot increase RAM usage of another account within a notify context: ${account}",
- ("account", itr->account)
- );
- EOS_ASSERT( has_authorization( itr->account ), unauthorized_ram_usage_increase,
- "unprivileged contract cannot increase RAM usage of another account that has not authorized the action: ${account}",
- ("account", itr->account)
- );
+ if (!privileged) {
+ if (control.is_builtin_activated(builtin_protocol_feature_t::ram_restrictions)) {
+ check_unprivileged_resource_usage("RAM", _account_ram_deltas);
}
}
}
} FC_RETHROW_EXCEPTIONS( warn, "pending console output: ${console}", ("console", _pending_console_output) )
- } catch( const fc::exception& e ) {
- action_trace& trace = trx_context.get_action_trace( action_ordinal );
- trace.error_code = controller::convert_exception_to_error_code( e );
- trace.except = e;
- finalize_trace( trace, start );
+
+ if( control.is_builtin_activated( builtin_protocol_feature_t::action_return_value ) ) {
+ act_digest = generate_action_digest(
+ [this](const char* data, uint32_t datalen) {
+ return trx_context.hash_with_checktime(data, datalen);
+ },
+ *act,
+ action_return_value
+ );
+ } else {
+ act_digest = digest_type::hash(*act);
+ }
+ } catch ( const std::bad_alloc& ) {
throw;
+ } catch ( const boost::interprocess::bad_alloc& ) {
+ throw;
+ } catch( const fc::exception& e ) {
+ handle_exception(e);
+ } catch ( const std::exception& e ) {
+ auto wrapper = fc::std_exception_wrapper::from_current_exception(e);
+ handle_exception(wrapper);
}
// Note: It should not be possible for receiver_account to be invalidated because:
@@ -124,6 +169,15 @@ void apply_context::exec_one()
// * a pointer to an object in a chainbase index is not invalidated if the fields of that object are modified;
// * and, the *receiver_account object itself cannot be removed because accounts cannot be deleted in EOSIO.
+ action_trace& trace = trx_context.get_action_trace( action_ordinal );
+ trace.return_value = std::move(action_return_value);
+ trace.receipt.emplace();
+
+ action_receipt& r = *trace.receipt;
+ r.receiver = receiver;
+ r.act_digest = act_digest;
+
+
r.global_sequence = next_global_sequence();
r.recv_sequence = next_recv_sequence( *receiver_account );
@@ -141,10 +195,7 @@ void apply_context::exec_one()
r.auth_sequence[auth.actor] = next_auth_sequence( auth.actor );
}
- action_trace& trace = trx_context.get_action_trace( action_ordinal );
- trace.receipt = r;
-
- trx_context.executed.emplace_back( std::move(r) );
+ trx_context.executed_action_receipt_digests.emplace_back( r.digest() );
finalize_trace( trace, start );
@@ -168,9 +219,12 @@ void apply_context::exec()
{
_notified.emplace_back( receiver, action_ordinal );
exec_one();
+ increment_action_id();
for( uint32_t i = 1; i < _notified.size(); ++i ) {
std::tie( receiver, action_ordinal ) = _notified[i];
+ _db_context->receiver = receiver;
exec_one();
+ increment_action_id();
}
if( _cfa_inline_actions.size() > 0 || _inline_actions.size() > 0 ) {
@@ -192,7 +246,7 @@ bool apply_context::is_account( const account_name& account )const {
return nullptr != db.find( account );
}
-void apply_context::require_authorization( const account_name& account ) {
+void apply_context::require_authorization( const account_name& account ) const {
for( uint32_t i=0; i < act->authorization.size(); i++ ) {
if( act->authorization[i].actor == account ) {
return;
@@ -209,7 +263,7 @@ bool apply_context::has_authorization( const account_name& account )const {
}
void apply_context::require_authorization(const account_name& account,
- const permission_name& permission) {
+ const permission_name& permission) const {
for( uint32_t i=0; i < act->authorization.size(); i++ )
if( act->authorization[i].actor == account ) {
if( act->authorization[i].permission == permission ) {
@@ -233,6 +287,12 @@ void apply_context::require_recipient( account_name recipient ) {
recipient,
schedule_action( action_ordinal, recipient, false )
);
+
+ if (auto dm_logger = control.get_deep_mind_logger()) {
+ fc_dlog(*dm_logger, "CREATION_OP NOTIFY ${action_id}",
+ ("action_id", get_action_id())
+ );
+ }
}
}
@@ -333,6 +393,12 @@ void apply_context::execute_inline( action&& a ) {
_inline_actions.emplace_back(
schedule_action( std::move(a), inline_receiver, false )
);
+
+ if (auto dm_logger = control.get_deep_mind_logger()) {
+ fc_dlog(*dm_logger, "CREATION_OP INLINE ${action_id}",
+ ("action_id", get_action_id())
+ );
+ }
}
void apply_context::execute_context_free_inline( action&& a ) {
@@ -354,6 +420,12 @@ void apply_context::execute_context_free_inline( action&& a ) {
_cfa_inline_actions.emplace_back(
schedule_action( std::move(a), inline_receiver, true )
);
+
+ if (auto dm_logger = control.get_deep_mind_logger()) {
+ fc_dlog(*dm_logger, "CREATION_OP CFA_INLINE ${action_id}",
+ ("action_id", get_action_id())
+ );
+ }
}
@@ -373,7 +445,7 @@ void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, a
"only the deferred_transaction_generation_context extension is currently supported for deferred transactions"
);
- const auto& context = itr->second.get();
+ const auto& context = std::get(itr->second);
EOS_ASSERT( context.sender == receiver, ill_formed_deferred_transaction_generation_context,
"deferred transaction generaction context contains mismatching sender",
@@ -383,15 +455,15 @@ void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, a
"deferred transaction generaction context contains mismatching sender_id",
("expected", sender_id)("actual", context.sender_id)
);
- EOS_ASSERT( context.sender_trx_id == trx_context.id, ill_formed_deferred_transaction_generation_context,
+ EOS_ASSERT( context.sender_trx_id == trx_context.packed_trx.id(), ill_formed_deferred_transaction_generation_context,
"deferred transaction generaction context contains mismatching sender_trx_id",
- ("expected", trx_context.id)("actual", context.sender_trx_id)
+ ("expected", trx_context.packed_trx.id())("actual", context.sender_trx_id)
);
} else {
emplace_extension(
trx.transaction_extensions,
deferred_transaction_generation_context::extension_id(),
- fc::raw::pack( deferred_transaction_generation_context( trx_context.id, sender_id, receiver ) )
+ fc::raw::pack( deferred_transaction_generation_context( trx_context.packed_trx.id(), sender_id, receiver ) )
);
}
trx.expiration = time_point_sec();
@@ -479,6 +551,8 @@ void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, a
}
uint32_t trx_size = 0;
+ std::string event_id;
+ const char* operation = "";
if ( auto ptr = db.find(boost::make_tuple(receiver, sender_id)) ) {
EOS_ASSERT( replace_existing, deferred_tx_duplicate, "deferred transaction with the same sender_id and payer already exists" );
@@ -489,11 +563,16 @@ void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, a
subjective_block_production_exception,
"Replacing a deferred transaction is temporarily disabled." );
+ if (control.get_deep_mind_logger() != nullptr) {
+ event_id = STORAGE_EVENT_ID("${id}", ("id", ptr->id));
+ }
+
uint64_t orig_trx_ram_bytes = config::billable_size_v + ptr->packed_trx.size();
if( replace_deferred_activated ) {
- add_ram_usage( ptr->payer, -static_cast( orig_trx_ram_bytes ) );
+ // avoiding moving event_id to make logic easier to maintain
+ add_ram_usage( ptr->payer, -static_cast( orig_trx_ram_bytes ), storage_usage_trace(get_action_id(), std::string(event_id), "deferred_trx", "cancel", "deferred_trx_cancel") );
} else {
- control.add_to_ram_correction( ptr->payer, orig_trx_ram_bytes );
+ control.add_to_ram_correction( ptr->payer, orig_trx_ram_bytes, get_action_id(), event_id.c_str() );
}
transaction_id_type trx_id_for_new_obj;
@@ -503,8 +582,23 @@ void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, a
trx_id_for_new_obj = ptr->trx_id;
}
+ if (auto dm_logger = control.get_deep_mind_logger()) {
+ fc_dlog(*dm_logger, "DTRX_OP MODIFY_CANCEL ${action_id} ${sender} ${sender_id} ${payer} ${published} ${delay} ${expiration} ${trx_id} ${trx}",
+ ("action_id", get_action_id())
+ ("sender", receiver)
+ ("sender_id", sender_id)
+ ("payer", ptr->payer)
+ ("published", ptr->published)
+ ("delay", ptr->delay_until)
+ ("expiration", ptr->expiration)
+ ("trx_id", ptr->trx_id)
+ ("trx", fc::to_hex(ptr->packed_trx.data(), ptr->packed_trx.size()))
+ );
+ }
+
// Use remove and create rather than modify because mutating the trx_id field in a modifier is unsafe.
db.remove( *ptr );
+
db.create( [&]( auto& gtx ) {
gtx.trx_id = trx_id_for_new_obj;
gtx.sender = receiver;
@@ -515,6 +609,23 @@ void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, a
gtx.expiration = gtx.delay_until + fc::seconds(control.get_global_properties().configuration.deferred_trx_expiration_window);
trx_size = gtx.set( trx );
+
+ if (auto dm_logger = control.get_deep_mind_logger()) {
+ operation = "update";
+ event_id = STORAGE_EVENT_ID("${id}", ("id", gtx.id));
+
+ fc_dlog(*dm_logger, "DTRX_OP MODIFY_CREATE ${action_id} ${sender} ${sender_id} ${payer} ${published} ${delay} ${expiration} ${trx_id} ${trx}",
+ ("action_id", get_action_id())
+ ("sender", receiver)
+ ("sender_id", sender_id)
+ ("payer", payer)
+ ("published", gtx.published)
+ ("delay", gtx.delay_until)
+ ("expiration", gtx.expiration)
+ ("trx_id", trx.id())
+ ("trx", fc::to_hex(gtx.packed_trx.data(), gtx.packed_trx.size()))
+ );
+ }
} );
} else {
db.create( [&]( auto& gtx ) {
@@ -527,6 +638,23 @@ void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, a
gtx.expiration = gtx.delay_until + fc::seconds(control.get_global_properties().configuration.deferred_trx_expiration_window);
trx_size = gtx.set( trx );
+
+ if (auto dm_logger = control.get_deep_mind_logger()) {
+ operation = "add";
+ event_id = STORAGE_EVENT_ID("${id}", ("id", gtx.id));
+
+ fc_dlog(*dm_logger, "DTRX_OP CREATE ${action_id} ${sender} ${sender_id} ${payer} ${published} ${delay} ${expiration} ${trx_id} ${trx}",
+ ("action_id", get_action_id())
+ ("sender", receiver)
+ ("sender_id", sender_id)
+ ("payer", payer)
+ ("published", gtx.published)
+ ("delay", gtx.delay_until)
+ ("expiration", gtx.expiration)
+ ("trx_id", gtx.trx_id)
+ ("trx", fc::to_hex(gtx.packed_trx.data(), gtx.packed_trx.size()))
+ );
+ }
} );
}
@@ -536,14 +664,33 @@ void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, a
subjective_block_production_exception,
"Cannot charge RAM to other accounts during notify."
);
- add_ram_usage( payer, (config::billable_size_v + trx_size) );
+ add_ram_usage( payer, (config::billable_size_v + trx_size), storage_usage_trace(get_action_id(), std::move(event_id), "deferred_trx", operation, "deferred_trx_add") );
}
bool apply_context::cancel_deferred_transaction( const uint128_t& sender_id, account_name sender ) {
+
+
auto& generated_transaction_idx = db.get_mutable_index();
const auto* gto = db.find(boost::make_tuple(sender, sender_id));
if ( gto ) {
- add_ram_usage( gto->payer, -(config::billable_size_v + gto->packed_trx.size()) );
+ std::string event_id;
+ if (auto dm_logger = control.get_deep_mind_logger()) {
+ event_id = STORAGE_EVENT_ID("${id}", ("id", gto->id));
+
+ fc_dlog(*dm_logger, "DTRX_OP CANCEL ${action_id} ${sender} ${sender_id} ${payer} ${published} ${delay} ${expiration} ${trx_id} ${trx}",
+ ("action_id", get_action_id())
+ ("sender", receiver)
+ ("sender_id", sender_id)
+ ("payer", gto->payer)
+ ("published", gto->published)
+ ("delay", gto->delay_until)
+ ("expiration", gto->expiration)
+ ("trx_id", gto->trx_id)
+ ("trx", fc::to_hex(gto->packed_trx.data(), gto->packed_trx.size()))
+ );
+ }
+
+ add_ram_usage( gto->payer, -(config::billable_size_v + gto->packed_trx.size()), storage_usage_trace(get_action_id(), std::move(event_id), "deferred_trx", "cancel", "deferred_trx_cancel") );
generated_transaction_idx.remove(*gto);
}
return gto;
@@ -579,18 +726,37 @@ const table_id_object& apply_context::find_or_create_table( name code, name scop
return *existing_tid;
}
- update_db_usage(payer, config::billable_size_v);
+ std::string event_id;
+ if (control.get_deep_mind_logger() != nullptr) {
+ event_id = db_context::table_event(code, scope, table);
+ }
+
+ update_db_usage(payer, config::billable_size_v, db_context::add_table_trace(get_action_id(), std::move(event_id)));
return db.create([&](table_id_object &t_id){
t_id.code = code;
t_id.scope = scope;
t_id.table = table;
t_id.payer = payer;
+
+ if (auto dm_logger = control.get_deep_mind_logger()) {
+ db_context::log_insert_table(*dm_logger, get_action_id(), code, scope, table, payer);
+ }
});
}
void apply_context::remove_table( const table_id_object& tid ) {
- update_db_usage(tid.payer, - config::billable_size_v);
+ std::string event_id;
+ if (control.get_deep_mind_logger() != nullptr) {
+ event_id = db_context::table_event(tid.code, tid.scope, tid.table);
+ }
+
+ update_db_usage(tid.payer, - config::billable_size_v, db_context::rem_table_trace(get_action_id(), std::move(event_id)) );
+
+ if (auto dm_logger = control.get_deep_mind_logger()) {
+ db_context::log_remove_table(*dm_logger, get_action_id(), tid.code, tid.scope, tid.table, tid.payer);
+ }
+
db.remove(tid);
}
@@ -604,12 +770,7 @@ vector apply_context::get_active_producers() const {
return accounts;
}
-bytes apply_context::get_packed_transaction() {
- auto r = fc::raw::pack( static_cast(trx_context.trx) );
- return r;
-}
-
-void apply_context::update_db_usage( const account_name& payer, int64_t delta ) {
+void apply_context::update_db_usage( const account_name& payer, int64_t delta, const storage_usage_trace& trace ) {
if( delta > 0 ) {
if( !(privileged || payer == account_name(receiver)
|| control.is_builtin_activated( builtin_protocol_feature_t::ram_restrictions ) ) )
@@ -619,13 +780,13 @@ void apply_context::update_db_usage( const account_name& payer, int64_t delta )
require_authorization( payer );
}
}
- add_ram_usage(payer, delta);
+ add_ram_usage(payer, delta, trace);
}
int apply_context::get_action( uint32_t type, uint32_t index, char* buffer, size_t buffer_size )const
{
- const auto& trx = trx_context.trx;
+ const auto& trx = trx_context.packed_trx.get_transaction();
const action* act_ptr = nullptr;
if( type == 0 ) {
@@ -651,26 +812,43 @@ int apply_context::get_action( uint32_t type, uint32_t index, char* buffer, size
int apply_context::get_context_free_data( uint32_t index, char* buffer, size_t buffer_size )const
{
- const auto& trx = trx_context.trx;
+ const packed_transaction::prunable_data_type::prunable_data_t& data = trx_context.packed_trx.get_prunable_data().prunable_data;
+ const bytes* cfd = nullptr;
+ if( std::holds_alternative(data) ) {
+ } else if( std::holds_alternative(data) ) {
+ if( index >= std::get(data).context_free_segments.size() ) return -1;
+
+ cfd = trx_context.packed_trx.get_context_free_data(index);
+ } else {
+ const std::vector& context_free_data =
+ std::holds_alternative(data) ?
+ std::get(data).context_free_segments :
+ std::get(data).context_free_segments;
+ if( index >= context_free_data.size() ) return -1;
- if( index >= trx.context_free_data.size() ) return -1;
+ cfd = &context_free_data[index];
+ }
- auto s = trx.context_free_data[index].size();
+ if( !cfd ) {
+ if( control.is_producing_block() ) {
+ EOS_THROW( subjective_block_production_exception, "pruned context free data not available" );
+ } else {
+ EOS_THROW( pruned_context_free_data_bad_block_exception, "pruned context free data not available" );
+ }
+ }
+
+ auto s = cfd->size();
if( buffer_size == 0 ) return s;
auto copy_size = std::min( buffer_size, s );
- memcpy( buffer, trx.context_free_data[index].data(), copy_size );
+ memcpy( buffer, cfd->data(), copy_size );
return copy_size;
}
-int apply_context::db_store_i64( name scope, name table, const account_name& payer, uint64_t id, const char* buffer, size_t buffer_size ) {
- return db_store_i64( receiver, scope, table, payer, id, buffer, buffer_size);
-}
-
-int apply_context::db_store_i64( name code, name scope, name table, const account_name& payer, uint64_t id, const char* buffer, size_t buffer_size ) {
+int apply_context::db_store_i64_chainbase( name scope, name table, const account_name& payer, uint64_t id, const char* buffer, size_t buffer_size ) {
// require_write_lock( scope );
- const auto& tab = find_or_create_table( code, scope, table, payer );
+ const auto& tab = find_or_create_table( receiver, scope, table, payer );
auto tableid = tab.id;
EOS_ASSERT( payer != account_name(), invalid_table_payer, "must specify a valid account to pay for new record" );
@@ -687,16 +865,26 @@ int apply_context::db_store_i64( name code, name scope, name table, const accoun
});
int64_t billable_size = (int64_t)(buffer_size + config::billable_size_v);
- update_db_usage( payer, billable_size);
- keyval_cache.cache_table( tab );
- return keyval_cache.add( obj );
+ std::string event_id;
+ if (control.get_deep_mind_logger() != nullptr) {
+ event_id = db_context::table_event(tab.code, tab.scope, tab.table, name(obj.primary_key));
+ }
+
+ update_db_usage( payer, billable_size, db_context::row_add_trace(get_action_id(), std::move(event_id)) );
+
+ if (auto dm_logger = control.get_deep_mind_logger()) {
+ db_context::log_row_insert(*dm_logger, get_action_id(), tab.code, tab.scope, tab.table, payer, name(obj.primary_key), buffer, buffer_size);
+ }
+
+ db_iter_store.cache_table( tab );
+ return db_iter_store.add( obj );
}
-void apply_context::db_update_i64( int iterator, account_name payer, const char* buffer, size_t buffer_size ) {
- const key_value_object& obj = keyval_cache.get( iterator );
+void apply_context::db_update_i64_chainbase( int iterator, account_name payer, const char* buffer, size_t buffer_size ) {
+ const key_value_object& obj = db_iter_store.get( iterator );
- const auto& table_obj = keyval_cache.get_table( obj.t_id );
+ const auto& table_obj = db_iter_store.get_table( obj.t_id );
EOS_ASSERT( table_obj.code == receiver, table_access_violation, "db access violation" );
// require_write_lock( table_obj.scope );
@@ -707,14 +895,25 @@ void apply_context::db_update_i64( int iterator, account_name payer, const char*
if( payer == account_name() ) payer = obj.payer;
+ std::string event_id;
+ if (control.get_deep_mind_logger() != nullptr) {
+ event_id = db_context::table_event(table_obj.code, table_obj.scope, table_obj.table, name(obj.primary_key));
+ }
+
if( account_name(obj.payer) != payer ) {
// refund the existing payer
- update_db_usage( obj.payer, -(old_size) );
+ update_db_usage( obj.payer, -(old_size), db_context::row_update_rem_trace(get_action_id(), std::string(event_id)) );
// charge the new payer
- update_db_usage( payer, (new_size));
+ update_db_usage( payer, (new_size), db_context::row_update_add_trace(get_action_id(), std::move(event_id)) );
} else if(old_size != new_size) {
// charge/refund the existing payer the difference
- update_db_usage( obj.payer, new_size - old_size);
+ update_db_usage( obj.payer, new_size - old_size, db_context::row_update_trace(get_action_id(), std::move(event_id)) );
+ }
+
+ if (auto dm_logger = control.get_deep_mind_logger()) {
+ db_context::log_row_update(*dm_logger, get_action_id(), table_obj.code, table_obj.scope, table_obj.table,
+ obj.payer, payer, name(obj.primary_key), obj.value.data(), obj.value.size(),
+ buffer, buffer_size);
}
db.modify( obj, [&]( auto& o ) {
@@ -723,15 +922,24 @@ void apply_context::db_update_i64( int iterator, account_name payer, const char*
});
}
-void apply_context::db_remove_i64( int iterator ) {
- const key_value_object& obj = keyval_cache.get( iterator );
+void apply_context::db_remove_i64_chainbase( int iterator ) {
+ const key_value_object& obj = db_iter_store.get( iterator );
- const auto& table_obj = keyval_cache.get_table( obj.t_id );
+ const auto& table_obj = db_iter_store.get_table( obj.t_id );
EOS_ASSERT( table_obj.code == receiver, table_access_violation, "db access violation" );
// require_write_lock( table_obj.scope );
- update_db_usage( obj.payer, -(obj.value.size() + config::billable_size_v) );
+ std::string event_id;
+ if (control.get_deep_mind_logger() != nullptr) {
+ event_id = db_context::table_event(table_obj.code, table_obj.scope, table_obj.table, name(obj.primary_key));
+ }
+
+ update_db_usage( obj.payer, -(obj.value.size() + config::billable_size_v), db_context::row_rem_trace(get_action_id(), std::move(event_id)) );
+
+ if (auto dm_logger = control.get_deep_mind_logger()) {
+ db_context::log_row_remove(*dm_logger, get_action_id(), table_obj.code, table_obj.scope, table_obj.table, obj.payer, name(obj.primary_key), obj.value.data(), obj.value.size());
+ }
db.modify( table_obj, [&]( auto& t ) {
--t.count;
@@ -742,11 +950,11 @@ void apply_context::db_remove_i64( int iterator ) {
remove_table(table_obj);
}
- keyval_cache.remove( iterator );
+ db_iter_store.remove( iterator );
}
-int apply_context::db_get_i64( int iterator, char* buffer, size_t buffer_size ) {
- const key_value_object& obj = keyval_cache.get( iterator );
+int apply_context::db_get_i64_chainbase( int iterator, char* buffer, size_t buffer_size ) {
+ const key_value_object& obj = db_iter_store.get( iterator );
auto s = obj.value.size();
if( buffer_size == 0 ) return s;
@@ -757,27 +965,27 @@ int apply_context::db_get_i64( int iterator, char* buffer, size_t buffer_size )
return copy_size;
}
-int apply_context::db_next_i64( int iterator, uint64_t& primary ) {
+int apply_context::db_next_i64_chainbase( int iterator, uint64_t& primary ) {
if( iterator < -1 ) return -1; // cannot increment past end iterator of table
- const auto& obj = keyval_cache.get( iterator ); // Check for iterator != -1 happens in this call
+ const auto& obj = db_iter_store.get( iterator ); // Check for iterator != -1 happens in this call
const auto& idx = db.get_index();
auto itr = idx.iterator_to( obj );
++itr;
- if( itr == idx.end() || itr->t_id != obj.t_id ) return keyval_cache.get_end_iterator_by_table_id(obj.t_id);
+ if( itr == idx.end() || itr->t_id != obj.t_id ) return db_iter_store.get_end_iterator_by_table_id(obj.t_id);
primary = itr->primary_key;
- return keyval_cache.add( *itr );
+ return db_iter_store.add( *itr );
}
-int apply_context::db_previous_i64( int iterator, uint64_t& primary ) {
+int apply_context::db_previous_i64_chainbase( int iterator, uint64_t& primary ) {
const auto& idx = db.get_index();
if( iterator < -1 ) // is end iterator
{
- auto tab = keyval_cache.find_table_by_end_iterator(iterator);
+ auto tab = db_iter_store.find_table_by_end_iterator(iterator);
EOS_ASSERT( tab, invalid_table_iterator, "not a valid end iterator" );
auto itr = idx.upper_bound(tab->id);
@@ -788,10 +996,10 @@ int apply_context::db_previous_i64( int iterator, uint64_t& primary ) {
if( itr->t_id != tab->id ) return -1; // Empty table
primary = itr->primary_key;
- return keyval_cache.add(*itr);
+ return db_iter_store.add(*itr);
}
- const auto& obj = keyval_cache.get(iterator); // Check for iterator != -1 happens in this call
+ const auto& obj = db_iter_store.get(iterator); // Check for iterator != -1 happens in this call
auto itr = idx.iterator_to(obj);
if( itr == idx.begin() ) return -1; // cannot decrement past beginning iterator of table
@@ -801,62 +1009,149 @@ int apply_context::db_previous_i64( int iterator, uint64_t& primary ) {
if( itr->t_id != obj.t_id ) return -1; // cannot decrement past beginning iterator of table
primary = itr->primary_key;
- return keyval_cache.add(*itr);
+ return db_iter_store.add(*itr);
}
-int apply_context::db_find_i64( name code, name scope, name table, uint64_t id ) {
+int apply_context::db_find_i64_chainbase( name code, name scope, name table, uint64_t id ) {
//require_read_lock( code, scope ); // redundant?
const auto* tab = find_table( code, scope, table );
if( !tab ) return -1;
- auto table_end_itr = keyval_cache.cache_table( *tab );
+ auto table_end_itr = db_iter_store.cache_table( *tab );
const key_value_object* obj = db.find( boost::make_tuple( tab->id, id ) );
if( !obj ) return table_end_itr;
- return keyval_cache.add( *obj );
+ return db_iter_store.add( *obj );
}
-int apply_context::db_lowerbound_i64( name code, name scope, name table, uint64_t id ) {
+int apply_context::db_lowerbound_i64_chainbase( name code, name scope, name table, uint64_t id ) {
//require_read_lock( code, scope ); // redundant?
const auto* tab = find_table( code, scope, table );
if( !tab ) return -1;
- auto table_end_itr = keyval_cache.cache_table( *tab );
+ auto table_end_itr = db_iter_store.cache_table( *tab );
const auto& idx = db.get_index();
auto itr = idx.lower_bound( boost::make_tuple( tab->id, id ) );
if( itr == idx.end() ) return table_end_itr;
if( itr->t_id != tab->id ) return table_end_itr;
- return keyval_cache.add( *itr );
+ return db_iter_store.add( *itr );
}
-int apply_context::db_upperbound_i64( name code, name scope, name table, uint64_t id ) {
+int apply_context::db_upperbound_i64_chainbase( name code, name scope, name table, uint64_t id ) {
//require_read_lock( code, scope ); // redundant?
const auto* tab = find_table( code, scope, table );
if( !tab ) return -1;
- auto table_end_itr = keyval_cache.cache_table( *tab );
+ auto table_end_itr = db_iter_store.cache_table( *tab );
const auto& idx = db.get_index();
auto itr = idx.upper_bound( boost::make_tuple( tab->id, id ) );
if( itr == idx.end() ) return table_end_itr;
if( itr->t_id != tab->id ) return table_end_itr;
- return keyval_cache.add( *itr );
+ return db_iter_store.add( *itr );
}
-int apply_context::db_end_i64( name code, name scope, name table ) {
+int apply_context::db_end_i64_chainbase( name code, name scope, name table ) {
//require_read_lock( code, scope ); // redundant?
const auto* tab = find_table( code, scope, table );
if( !tab ) return -1;
- return keyval_cache.cache_table( *tab );
+ return db_iter_store.cache_table( *tab );
+}
+
+int64_t apply_context::kv_erase(uint64_t contract, const char* key, uint32_t key_size) {
+ return kv_get_backing_store().kv_erase(contract, key, key_size);
+}
+
+int64_t apply_context::kv_set(uint64_t contract, const char* key, uint32_t key_size, const char* value, uint32_t value_size, account_name payer) {
+ return kv_get_backing_store().kv_set(contract, key, key_size, value, value_size, payer);
+}
+
+bool apply_context::kv_get(uint64_t contract, const char* key, uint32_t key_size, uint32_t& value_size) {
+ return kv_get_backing_store().kv_get(contract, key, key_size, value_size);
+}
+
+uint32_t apply_context::kv_get_data(uint32_t offset, char* data, uint32_t data_size) {
+ return kv_get_backing_store().kv_get_data(offset, data, data_size);
+}
+
+uint32_t apply_context::kv_it_create(uint64_t contract, const char* prefix, uint32_t size) {
+ uint32_t itr;
+ if (!kv_destroyed_iterators.empty()) {
+ itr = kv_destroyed_iterators.back();
+ kv_destroyed_iterators.pop_back();
+ } else {
+ // Sanity check in case the per-database limits are set poorly
+ EOS_ASSERT(kv_iterators.size() <= 0xFFFFFFFFu, kv_bad_iter, "Too many iterators");
+ itr = kv_iterators.size();
+ kv_iterators.emplace_back();
+ }
+ kv_iterators[itr] = kv_get_backing_store().kv_it_create(contract, prefix, size);
+ return itr;
+}
+
+void apply_context::kv_it_destroy(uint32_t itr) {
+ kv_check_iterator(itr);
+ kv_destroyed_iterators.push_back(itr);
+ kv_iterators[itr].reset();
+}
+
+int32_t apply_context::kv_it_status(uint32_t itr) {
+ kv_check_iterator(itr);
+ return static_cast(kv_iterators[itr]->kv_it_status());
+}
+
+int32_t apply_context::kv_it_compare(uint32_t itr_a, uint32_t itr_b) {
+ kv_check_iterator(itr_a);
+ kv_check_iterator(itr_b);
+ return kv_iterators[itr_a]->kv_it_compare(*kv_iterators[itr_b]);
+}
+
+int32_t apply_context::kv_it_key_compare(uint32_t itr, const char* key, uint32_t size) {
+ kv_check_iterator(itr);
+ return kv_iterators[itr]->kv_it_key_compare(key, size);
+}
+
+int32_t apply_context::kv_it_move_to_end(uint32_t itr) {
+ kv_check_iterator(itr);
+ return static_cast(kv_iterators[itr]->kv_it_move_to_end());
+}
+
+int32_t apply_context::kv_it_next(uint32_t itr, uint32_t* found_key_size, uint32_t* found_value_size) {
+ kv_check_iterator(itr);
+ return static_cast(kv_iterators[itr]->kv_it_next(found_key_size, found_value_size));
+}
+
+int32_t apply_context::kv_it_prev(uint32_t itr, uint32_t* found_key_size, uint32_t* found_value_size) {
+ kv_check_iterator(itr);
+ return static_cast(kv_iterators[itr]->kv_it_prev(found_key_size, found_value_size));
+}
+
+int32_t apply_context::kv_it_lower_bound(uint32_t itr, const char* key, uint32_t size, uint32_t* found_key_size, uint32_t* found_value_size) {
+ kv_check_iterator(itr);
+ return static_cast(kv_iterators[itr]->kv_it_lower_bound(key, size, found_key_size, found_value_size));
+}
+
+int32_t apply_context::kv_it_key(uint32_t itr, uint32_t offset, char* dest, uint32_t size, uint32_t& actual_size) {
+ kv_check_iterator(itr);
+ return static_cast(kv_iterators[itr]->kv_it_key(offset, dest, size, actual_size));
+}
+
+int32_t apply_context::kv_it_value(uint32_t itr, uint32_t offset, char* dest, uint32_t size, uint32_t& actual_size) {
+ kv_check_iterator(itr);
+ return static_cast(kv_iterators[itr]->kv_it_value(offset, dest, size, actual_size));
+}
+
+void apply_context::kv_check_iterator(uint32_t itr) {
+ EOS_ASSERT(itr < kv_iterators.size() && kv_iterators[itr], kv_bad_iter, "Bad key-value iterator");
}
uint64_t apply_context::next_global_sequence() {
@@ -881,8 +1176,8 @@ uint64_t apply_context::next_auth_sequence( account_name actor ) {
return amo.auth_sequence;
}
-void apply_context::add_ram_usage( account_name account, int64_t ram_delta ) {
- trx_context.add_ram_usage( account, ram_delta );
+void apply_context::add_ram_usage( account_name account, int64_t ram_delta, const storage_usage_trace& trace ) {
+ trx_context.add_ram_usage( account, ram_delta, trace );
auto p = _account_ram_deltas.emplace( account, ram_delta );
if( !p.second ) {
@@ -899,4 +1194,17 @@ action_name apply_context::get_sender() const {
return action_name();
}
+uint32_t apply_context::get_action_id() const {
+ return trx_context.action_id.current();
+}
+
+void apply_context::increment_action_id() {
+ trx_context.action_id.increment();
+}
+
+db_context& apply_context::db_get_context() {
+ EOS_ASSERT( _db_context, action_validate_exception,
+ "context-free actions cannot access state" );
+ return *_db_context;
+}
} } /// eosio::chain
diff --git a/libraries/chain/authority.cpp b/libraries/chain/authority.cpp
new file mode 100644
index 00000000000..d36640a476c
--- /dev/null
+++ b/libraries/chain/authority.cpp
@@ -0,0 +1,7 @@
+#include
+
+namespace fc {
+ void to_variant(const eosio::chain::shared_public_key& var, fc::variant& vo) {
+ vo = var.to_string();
+ }
+} // namespace fc
diff --git a/libraries/chain/authorization_manager.cpp b/libraries/chain/authorization_manager.cpp
index 9e76ff63bf3..1427b3c3bff 100644
--- a/libraries/chain/authorization_manager.cpp
+++ b/libraries/chain/authorization_manager.cpp
@@ -133,11 +133,12 @@ namespace eosio { namespace chain {
permission_name name,
permission_id_type parent,
const authority& auth,
+ uint32_t action_id,
time_point initial_creation_time
)
{
for(const key_weight& k: auth.keys)
- EOS_ASSERT(k.key.which() < _db.get().num_supported_key_types, unactivated_key_type,
+ EOS_ASSERT(static_cast(k.key.which()) < _db.get().num_supported_key_types, unactivated_key_type,
"Unactivated key type used when creating permission");
auto creation_time = initial_creation_time;
@@ -156,6 +157,14 @@ namespace eosio { namespace chain {
p.name = name;
p.last_updated = creation_time;
p.auth = auth;
+
+ if (auto dm_logger = _control.get_deep_mind_logger()) {
+ fc_dlog(*dm_logger, "PERM_OP INS ${action_id} ${permission_id} ${data}",
+ ("action_id", action_id)
+ ("permission_id", p.id)
+ ("data", p)
+ );
+ }
});
return perm;
}
@@ -164,11 +173,12 @@ namespace eosio { namespace chain {
permission_name name,
permission_id_type parent,
authority&& auth,
+ uint32_t action_id,
time_point initial_creation_time
)
{
for(const key_weight& k: auth.keys)
- EOS_ASSERT(k.key.which() < _db.get().num_supported_key_types, unactivated_key_type,
+ EOS_ASSERT(static_cast(k.key.which()) < _db.get().num_supported_key_types, unactivated_key_type,
"Unactivated key type used when creating permission");
auto creation_time = initial_creation_time;
@@ -187,28 +197,63 @@ namespace eosio { namespace chain {
p.name = name;
p.last_updated = creation_time;
p.auth = std::move(auth);
+
+ if (auto dm_logger = _control.get_deep_mind_logger()) {
+ fc_dlog(*dm_logger, "PERM_OP INS ${action_id} ${permission_id} ${data}",
+ ("action_id", action_id)
+ ("permission_id", p.id)
+ ("data", p)
+ );
+ }
});
return perm;
}
- void authorization_manager::modify_permission( const permission_object& permission, const authority& auth ) {
+ void authorization_manager::modify_permission( const permission_object& permission, const authority& auth, uint32_t action_id ) {
for(const key_weight& k: auth.keys)
- EOS_ASSERT(k.key.which() < _db.get().num_supported_key_types, unactivated_key_type,
+ EOS_ASSERT(static_cast(k.key.which()) < _db.get().num_supported_key_types, unactivated_key_type,
"Unactivated key type used when modifying permission");
_db.modify( permission, [&](permission_object& po) {
+ auto dm_logger = _control.get_deep_mind_logger();
+
+ fc::variant old_permission;
+ if (dm_logger) {
+ old_permission = po;
+ }
+
po.auth = auth;
po.last_updated = _control.pending_block_time();
+
+ if (auto dm_logger = _control.get_deep_mind_logger()) {
+ fc_dlog(*dm_logger, "PERM_OP UPD ${action_id} ${permission_id} ${data}",
+ ("action_id", action_id)
+ ("permission_id", po.id)
+ ("data", fc::mutable_variant_object()
+ ("old", old_permission)
+ ("new", po)
+ )
+ );
+ }
});
}
- void authorization_manager::remove_permission( const permission_object& permission ) {
+ void authorization_manager::remove_permission( const permission_object& permission, uint32_t action_id) {
const auto& index = _db.template get_index();
auto range = index.equal_range(permission.id);
EOS_ASSERT( range.first == range.second, action_validate_exception,
"Cannot remove a permission which has children. Remove the children first.");
_db.get_mutable_index().remove_object( permission.usage_id._id );
+
+ if (auto dm_logger = _control.get_deep_mind_logger()) {
+ fc_dlog(*dm_logger, "PERM_OP REM ${action_id} ${permission_id} ${data}",
+ ("action_id", action_id)
+ ("permission_id", permission.id)
+ ("data", permission)
+ );
+ }
+
_db.remove( permission );
}
@@ -235,10 +280,10 @@ namespace eosio { namespace chain {
return _db.get( boost::make_tuple(level.actor,level.permission) );
} EOS_RETHROW_EXCEPTIONS( chain::permission_query_exception, "Failed to retrieve permission: ${level}", ("level", level) ) }
- optional authorization_manager::lookup_linked_permission( account_name authorizer_account,
- account_name scope,
- action_name act_name
- )const
+ std::optional authorization_manager::lookup_linked_permission( account_name authorizer_account,
+ account_name scope,
+ action_name act_name
+ )const
{
try {
// First look up a specific link for this message act_name
@@ -254,16 +299,14 @@ namespace eosio { namespace chain {
if (link != nullptr) {
return link->required_permission;
}
- return optional();
-
- // return optional();
+ return std::optional();
} FC_CAPTURE_AND_RETHROW((authorizer_account)(scope)(act_name))
}
- optional authorization_manager::lookup_minimum_permission( account_name authorizer_account,
- account_name scope,
- action_name act_name
- )const
+ std::optional