Compare commits

..

6 Commits

Author SHA1 Message Date
Elliot Lee
4f506599f6 Set version to 1.10.1
* Add release notes
2023-03-22 09:27:56 -07:00
Elliot Lee
383f1b6ab3 Set version to 1.10.1-rc1 2023-03-21 11:14:20 -07:00
Michael Legleux
da18c86cbf Build packages with Ubuntu 18.04
Restores Ubuntu 18.04 packages
Update docker images to use Conan
2023-03-21 11:13:03 -07:00
Mark Travis
f7b3ddd87b Reporting Mode: Do not attempt to acquire missing data from peer network (#4458)
In Reporting Mode, a server would core dump when it is not able to read
from Cassandra. This patch prevents the core dump when Cassandra is down
for reporting mode servers. This does not fix the root cause, but it
cuts down on some of the resulting noise.
2023-03-14 20:49:40 -07:00
Elliot Lee
1e7710eee2 docs: security bug bounty acknowledgements (#4460) 2023-03-14 13:08:56 -07:00
Elliot Lee
07f047b1e2 Set version to 1.10.0
Merge #4451
2023-03-14 09:30:22 -07:00
18 changed files with 416 additions and 144 deletions

View File

@@ -124,7 +124,10 @@ else ()
# * static option set and # * static option set and
# * NOT APPLE (AppleClang does not support static libc/c++) and # * NOT APPLE (AppleClang does not support static libc/c++) and
# * NOT san (sanitizers typically don't work with static libc/c++) # * NOT san (sanitizers typically don't work with static libc/c++)
$<$<AND:$<BOOL:${static}>,$<NOT:$<BOOL:${APPLE}>>,$<NOT:$<BOOL:${san}>>>:-static-libstdc++>) $<$<AND:$<BOOL:${static}>,$<NOT:$<BOOL:${APPLE}>>,$<NOT:$<BOOL:${san}>>>:
-static-libstdc++
-static-libgcc
>)
endif () endif ()
if (use_gold AND is_gcc) if (use_gold AND is_gcc)

View File

@@ -64,16 +64,16 @@ if (is_root_project)
#[===================================================================[ #[===================================================================[
dpkg dpkg
#]===================================================================] #]===================================================================]
# currently use ubuntu 16.04 as a base b/c it has one of # currently use ubuntu 18.04 as a base b/c it has one of
# the lower versions of libc among ubuntu and debian releases. # the lower versions of libc among ubuntu and debian releases.
# we could change this in the future and build with some other deb # we could change this in the future and build with some other deb
# based system. # based system.
add_custom_target (dpkg_container add_custom_target (dpkg_container
docker build docker build
--pull --pull
--build-arg DIST_TAG=20.04 --build-arg DIST_TAG=18.04
--build-arg GIT_COMMIT=${commit_hash} --build-arg GIT_COMMIT=${commit_hash}
-t rippleci/rippled-dpkg-builder:${container_label} -t rippled-dpkg-builder:${container_label}
$<$<BOOL:${dpkg_cache_from}>:--cache-from=${dpkg_cache_from}> $<$<BOOL:${dpkg_cache_from}>:--cache-from=${dpkg_cache_from}>
-f ubuntu-builder/Dockerfile . -f ubuntu-builder/Dockerfile .
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Builds/containers WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Builds/containers
@@ -119,7 +119,7 @@ if (is_root_project)
docker run docker run
-v ${CMAKE_CURRENT_SOURCE_DIR}:/opt/rippled_bld/pkg/rippled -v ${CMAKE_CURRENT_SOURCE_DIR}:/opt/rippled_bld/pkg/rippled
-v ${CMAKE_CURRENT_BINARY_DIR}/packages:/opt/rippled_bld/pkg/out -v ${CMAKE_CURRENT_BINARY_DIR}/packages:/opt/rippled_bld/pkg/out
-t rippleci/rippled-dpkg-builder:${container_label} -t rippled-dpkg-builder:${container_label}
/bin/bash -c "cp -fpu rippled/Builds/containers/packaging/dpkg/build_dpkg.sh . && ./build_dpkg.sh" /bin/bash -c "cp -fpu rippled/Builds/containers/packaging/dpkg/build_dpkg.sh . && ./build_dpkg.sh"
VERBATIM VERBATIM
USES_TERMINAL USES_TERMINAL
@@ -159,7 +159,7 @@ if (is_root_project)
add_custom_target (ci_container add_custom_target (ci_container
docker build docker build
--pull --pull
--build-arg DIST_TAG=20.04 --build-arg DIST_TAG=18.04
--build-arg GIT_COMMIT=${commit_hash} --build-arg GIT_COMMIT=${commit_hash}
--build-arg CI_USE=true --build-arg CI_USE=true
-t rippled-ci-builder:${container_label} -t rippled-ci-builder:${container_label}

View File

@@ -12,10 +12,10 @@ variables:
# cmake build (container targets) and tagged/pushed so they # cmake build (container targets) and tagged/pushed so they
# can be used here # can be used here
RPM_CONTAINER_TAG: "2023-02-13" RPM_CONTAINER_TAG: "2023-02-13"
RPM_CONTAINER_NAME: "rippleci/rippled-rpm-builder" RPM_CONTAINER_NAME: "rippled-rpm-builder"
RPM_CONTAINER_FULLNAME: "${RPM_CONTAINER_NAME}:${RPM_CONTAINER_TAG}" RPM_CONTAINER_FULLNAME: "${RPM_CONTAINER_NAME}:${RPM_CONTAINER_TAG}"
DPKG_CONTAINER_TAG: "2023-02-13" DPKG_CONTAINER_TAG: "2023-03-20"
DPKG_CONTAINER_NAME: "rippleci/rippled-dpkg-builder" DPKG_CONTAINER_NAME: "rippled-dpkg-builder"
DPKG_CONTAINER_FULLNAME: "${DPKG_CONTAINER_NAME}:${DPKG_CONTAINER_TAG}" DPKG_CONTAINER_FULLNAME: "${DPKG_CONTAINER_NAME}:${DPKG_CONTAINER_TAG}"
ARTIFACTORY_HOST: "artifactory.ops.ripple.com" ARTIFACTORY_HOST: "artifactory.ops.ripple.com"
ARTIFACTORY_HUB: "${ARTIFACTORY_HOST}:6555" ARTIFACTORY_HUB: "${ARTIFACTORY_HOST}:6555"
@@ -190,7 +190,7 @@ rocky_8_smoketest:
dependencies: dependencies:
- rpm_build - rpm_build
image: image:
name: rockylinux/rockylinux:8 name: artifactory.ops.ripple.com/rockylinux/rockylinux:8
<<: *run_local_smoketest <<: *run_local_smoketest
fedora_37_smoketest: fedora_37_smoketest:
@@ -209,6 +209,14 @@ fedora_38_smoketest:
name: artifactory.ops.ripple.com/fedora:38 name: artifactory.ops.ripple.com/fedora:38
<<: *run_local_smoketest <<: *run_local_smoketest
ubuntu_18_smoketest:
stage: smoketest
dependencies:
- dpkg_build
image:
name: artifactory.ops.ripple.com/ubuntu:18.04
<<: *run_local_smoketest
ubuntu_20_smoketest: ubuntu_20_smoketest:
stage: smoketest stage: smoketest
dependencies: dependencies:
@@ -225,6 +233,14 @@ ubuntu_22_smoketest:
name: artifactory.ops.ripple.com/ubuntu:22.04 name: artifactory.ops.ripple.com/ubuntu:22.04
<<: *run_local_smoketest <<: *run_local_smoketest
debian_10_smoketest:
stage: smoketest
dependencies:
- dpkg_build
image:
name: artifactory.ops.ripple.com/debian:10
<<: *run_local_smoketest
debian_11_smoketest: debian_11_smoketest:
stage: smoketest stage: smoketest
dependencies: dependencies:
@@ -329,12 +345,13 @@ centos_7_verify_repo_test:
<<: *only_primary <<: *only_primary
<<: *run_repo_smoketest <<: *run_repo_smoketest
rocky_8_verify_repo_test: rocky_8_verify_repo_test:
stage: verify_from_test stage: verify_from_test
variables: variables:
RPM_REPO: "rippled-rpm-test-mirror" RPM_REPO: "rippled-rpm-test-mirror"
image: image:
name: rockylinux/rockylinux:8 name: artifactory.ops.ripple.com/rockylinux/rockylinux:8
dependencies: dependencies:
- rpm_sign - rpm_sign
<<: *only_primary <<: *only_primary
@@ -362,6 +379,18 @@ fedora_38_verify_repo_test:
<<: *only_primary <<: *only_primary
<<: *run_repo_smoketest <<: *run_repo_smoketest
ubuntu_18_verify_repo_test:
stage: verify_from_test
variables:
DISTRO: "bionic"
DEB_REPO: "rippled-deb-test-mirror"
image:
name: artifactory.ops.ripple.com/ubuntu:18.04
dependencies:
- dpkg_sign
<<: *only_primary
<<: *run_repo_smoketest
ubuntu_20_verify_repo_test: ubuntu_20_verify_repo_test:
stage: verify_from_test stage: verify_from_test
variables: variables:
@@ -386,6 +415,18 @@ ubuntu_22_verify_repo_test:
<<: *only_primary <<: *only_primary
<<: *run_repo_smoketest <<: *run_repo_smoketest
debian_10_verify_repo_test:
stage: verify_from_test
variables:
DISTRO: "buster"
DEB_REPO: "rippled-deb-test-mirror"
image:
name: artifactory.ops.ripple.com/debian:10
dependencies:
- dpkg_sign
<<: *only_primary
<<: *run_repo_smoketest
debian_11_verify_repo_test: debian_11_verify_repo_test:
stage: verify_from_test stage: verify_from_test
variables: variables:
@@ -468,7 +509,7 @@ rocky_8_verify_repo_prod:
variables: variables:
RPM_REPO: "rippled-rpm" RPM_REPO: "rippled-rpm"
image: image:
name: rockylinux/rockylinux:8 name: artifactory.ops.ripple.com/rockylinux/rockylinux:8
dependencies: dependencies:
- rpm_sign - rpm_sign
<<: *only_primary <<: *only_primary
@@ -496,6 +537,18 @@ fedora_38_verify_repo_prod:
<<: *only_primary <<: *only_primary
<<: *run_repo_smoketest <<: *run_repo_smoketest
ubuntu_18_verify_repo_prod:
stage: verify_from_prod
variables:
DISTRO: "bionic"
DEB_REPO: "rippled-deb"
image:
name: artifactory.ops.ripple.com/ubuntu:18.04
dependencies:
- dpkg_sign
<<: *only_primary
<<: *run_repo_smoketest
ubuntu_20_verify_repo_prod: ubuntu_20_verify_repo_prod:
stage: verify_from_prod stage: verify_from_prod
variables: variables:
@@ -520,6 +573,18 @@ ubuntu_22_verify_repo_prod:
<<: *only_primary <<: *only_primary
<<: *run_repo_smoketest <<: *run_repo_smoketest
debian_10_verify_repo_prod:
stage: verify_from_prod
variables:
DISTRO: "buster"
DEB_REPO: "rippled-deb"
image:
name: artifactory.ops.ripple.com/debian:10
dependencies:
- dpkg_sign
<<: *only_primary
<<: *run_repo_smoketest
debian_11_verify_repo_prod: debian_11_verify_repo_prod:
stage: verify_from_prod stage: verify_from_prod
variables: variables:

View File

@@ -20,7 +20,7 @@ RIPPLED_REPORTING_DBG_PKG=$(ls rippled-reporting-dbgsym_*.*deb)
# TODO - where to upload src tgz? # TODO - where to upload src tgz?
RIPPLED_SRC=$(ls rippled_*.orig.tar.gz) RIPPLED_SRC=$(ls rippled_*.orig.tar.gz)
DEB_MATRIX=";deb.component=${COMPONENT};deb.architecture=amd64" DEB_MATRIX=";deb.component=${COMPONENT};deb.architecture=amd64"
for dist in bullseye focal jammy; do for dist in buster bullseye bionic focal jammy; do
DEB_MATRIX="${DEB_MATRIX};deb.distribution=${dist}" DEB_MATRIX="${DEB_MATRIX};deb.distribution=${dist}"
done done
echo "{ \"debs\": {" > "${TOPDIR}/files.info" echo "{ \"debs\": {" > "${TOPDIR}/files.info"

View File

@@ -45,8 +45,6 @@ CHANGELOG
# PATH must be preserved for our more modern cmake in /opt/local # PATH must be preserved for our more modern cmake in /opt/local
# TODO : consider allowing lintian to run in future ? # TODO : consider allowing lintian to run in future ?
export DH_BUILD_DDEBS=1 export DH_BUILD_DDEBS=1
export CC=gcc-11
export CXX=g++-11
debuild --no-lintian --preserve-envvar PATH --preserve-env -us -uc debuild --no-lintian --preserve-envvar PATH --preserve-env -us -uc
rc=$?; if [[ $rc != 0 ]]; then rc=$?; if [[ $rc != 0 ]]; then
error "error building dpkg" error "error building dpkg"

View File

@@ -23,6 +23,8 @@ override_dh_auto_configure:
conan install . \ conan install . \
--install-folder bld/rippled \ --install-folder bld/rippled \
--build missing \ --build missing \
--build boost \
--build sqlite3 \
--settings build_type=Release --settings build_type=Release
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \ cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
@@ -38,8 +40,10 @@ override_dh_auto_configure:
conan install . \ conan install . \
--install-folder bld/rippled-reporting \ --install-folder bld/rippled-reporting \
--build missing \ --build missing \
--build boost \
--build sqlite3 \
--build libuv \
--settings build_type=Release \ --settings build_type=Release \
--settings compiler.cppstd=17 \
--options reporting=True --options reporting=True
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \ cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \

View File

@@ -1,22 +1,13 @@
ARG DIST_TAG=20.04 ARG DIST_TAG=18.04
FROM ubuntu:$DIST_TAG FROM ubuntu:$DIST_TAG
ARG GIT_COMMIT=unknown ARG GIT_COMMIT=unknown
ARG CI_USE=false ARG CI_USE=false
LABEL git-commit=$GIT_COMMIT LABEL git-commit=$GIT_COMMIT
# install/setup prerequisites: WORKDIR /root
COPY ubuntu-builder/ubuntu_setup.sh /tmp/ COPY ubuntu-builder/ubuntu_setup.sh .
COPY shared/install_cmake.sh /tmp/ RUN ./ubuntu_setup.sh && rm ubuntu_setup.sh
RUN chmod +x /tmp/ubuntu_setup.sh && \
chmod +x /tmp/install_cmake.sh
RUN /tmp/ubuntu_setup.sh
RUN /tmp/install_cmake.sh 3.16.3 /opt/local/cmake-3.16
RUN ln -s /opt/local/cmake-3.16 /opt/local/cmake
ENV PATH="/opt/local/cmake/bin:$PATH"
# prep files for package building
RUN update-alternatives --set gcc /usr/bin/gcc-11
RUN mkdir -m 777 -p /opt/rippled_bld/pkg/ RUN mkdir -m 777 -p /opt/rippled_bld/pkg/
WORKDIR /opt/rippled_bld/pkg WORKDIR /opt/rippled_bld/pkg

View File

@@ -1,104 +1,76 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -ex
source /etc/os-release set -o errexit
set -o nounset
set -o xtrace
if [[ ${VERSION_ID} =~ ^20\. || ${VERSION_ID} =~ ^22\. ]] ; then # Parameters
echo "setup for ${PRETTY_NAME}"
else
echo "${VERSION} not supported"
exit 1
fi
export DEBIAN_FRONTEND="noninteractive" gcc_version=${GCC_VERSION:-10}
echo "Acquire::Retries 3;" > /etc/apt/apt.conf.d/80-retries cmake_version=${CMAKE_VERSION:-3.25.1}
echo "Acquire::http::Pipeline-Depth 0;" >> /etc/apt/apt.conf.d/80-retries conan_version=${CONAN_VERSION:-1.59}
echo "Acquire::http::No-Cache true;" >> /etc/apt/apt.conf.d/80-retries
echo "Acquire::BrokenProxy true;" >> /etc/apt/apt.conf.d/80-retries
apt-get update -o Acquire::CompressionTypes::Order::=gz
apt-get -y update apt update
apt-get -y install apt-utils # Iteratively build the list of packages to install so that we can interleave
apt-get -y install software-properties-common wget curl ca-certificates # the lines with comments explaining their inclusion.
apt-get -y install python3-pip dependencies=''
apt-get -y upgrade # - to identify the Ubuntu version
add-apt-repository -y ppa:ubuntu-toolchain-r/test dependencies+=' lsb-release'
apt-get -y clean # - for add-apt-repository
apt-get -y update dependencies+=' software-properties-common'
# - to download CMake
dependencies+=' curl'
# - to build CMake
dependencies+=' libssl-dev'
# - Python headers for Boost.Python
dependencies+=' python3-dev'
# - to install Conan
dependencies+=' python3-pip'
# - to download rippled
dependencies+=' git'
# - CMake generators (but not CMake itself)
dependencies+=' make ninja-build'
apt install --yes ${dependencies}
apt-get -y --fix-missing install \ add-apt-repository --yes ppa:ubuntu-toolchain-r/test
make cmake ninja-build autoconf automake libtool pkg-config libtool \ apt install --yes gcc-${gcc_version} g++-${gcc_version} \
openssl libssl-dev \ debhelper debmake debsums gnupg dh-buildinfo dh-make dh-systemd cmake \
liblzma-dev libbz2-dev zlib1g-dev \ ninja-build zlib1g-dev make cmake ninja-build autoconf automake \
libjemalloc-dev \ pkg-config apt-transport-https
gdb gdbserver \
libstdc++6 \
flex bison parallel \
libicu-dev texinfo \
java-common javacc \
dpkg-dev debhelper devscripts fakeroot \
debmake git-buildpackage dh-make gitpkg debsums gnupg \
dh-buildinfo dh-make \
apt-transport-https
if [[ ${VERSION_ID} =~ ^20\. ]] ; then # Give us nice unversioned aliases for gcc and company.
apt-get install -y \
dh-systemd
fi
apt-get -y install gcc-11 g++-11
update-alternatives --install \ update-alternatives --install \
/usr/bin/gcc gcc /usr/bin/gcc-11 20 \ /usr/bin/gcc gcc /usr/bin/gcc-${gcc_version} 100 \
--slave /usr/bin/g++ g++ /usr/bin/g++-11 \ --slave /usr/bin/g++ g++ /usr/bin/g++-${gcc_version} \
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 \ --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-${gcc_version} \
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-11 \ --slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-${gcc_version} \
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11 \ --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-${gcc_version} \
--slave /usr/bin/gcov gcov /usr/bin/gcov-11 \ --slave /usr/bin/gcov gcov /usr/bin/gcov-${gcc_version} \
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-dump-11 \ --slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-dump-${gcc_version} \
--slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-tool-11 --slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-tool-${gcc_version}
update-alternatives --auto gcc update-alternatives --auto gcc
update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-11 20 # Download and unpack CMake.
update-alternatives --auto cpp cmake_slug="cmake-${cmake_version}"
curl --location --remote-name \
"https://github.com/Kitware/CMake/releases/download/v${cmake_version}/${cmake_slug}.tar.gz"
tar xzf ${cmake_slug}.tar.gz
rm ${cmake_slug}.tar.gz
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - # Build and install CMake.
cd ${cmake_slug}
./bootstrap --parallel=$(nproc)
make --jobs $(nproc)
make install
cd ..
rm --recursive --force ${cmake_slug}
if [[ ${VERSION_ID} =~ ^20\. ]] ; then # Install Conan.
cat << EOF > /etc/apt/sources.list.d/llvm.list pip3 install conan==${conan_version}
deb http://apt.llvm.org/focal/ llvm-toolchain-focal main
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal main
deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main
deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main
EOF
apt-get -y install binutils clang-12
fi
conan profile new --detect gcc
apt-get -y update conan profile update settings.compiler=gcc gcc
if [[ ${VERSION_ID} =~ ^20\. ]] ; then conan profile update settings.compiler.version=${gcc_version} gcc
for v in 12 14; do conan profile update settings.compiler.libcxx=libstdc++11 gcc
apt-get -y install \ conan profile update env.CC=/usr/bin/gcc gcc
clang-$v libclang-common-$v-dev libclang-$v-dev libllvm$v llvm-$v \ conan profile update env.CXX=/usr/bin/g++ gcc
llvm-$v-dev llvm-$v-runtime clang-format-$v python3-clang-$v \
lld-$v libfuzzer-$v-dev libc++-$v-dev python-is-python3
update-alternatives --install \
/usr/bin/clang clang /usr/bin/clang-$v 40 \
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-$v \
--slave /usr/bin/llvm-profdata llvm-profdata /usr/bin/llvm-profdata-$v \
--slave /usr/bin/asan-symbolize asan-symbolize /usr/bin/asan_symbolize-$v \
--slave /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-$v \
--slave /usr/bin/clang-format clang-format /usr/bin/clang-format-$v \
--slave /usr/bin/llvm-ar llvm-ar /usr/bin/llvm-ar-$v \
--slave /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-$v \
--slave /usr/bin/llvm-nm llvm-nm /usr/bin/llvm-nm-$v
done
fi
pip install "conan<2" && \
conan profile new default --detect && \
conan profile update settings.compiler.cppstd=20 default && \
conan profile update settings.compiler.libcxx=libstdc++11 default
apt-get -y autoremove

View File

@@ -5,7 +5,211 @@
This document contains the release notes for `rippled`, the reference server implementation of the XRP Ledger protocol. To learn more about how to build, run or update a `rippled` server, visit https://xrpl.org/install-rippled.html This document contains the release notes for `rippled`, the reference server implementation of the XRP Ledger protocol. To learn more about how to build, run or update a `rippled` server, visit https://xrpl.org/install-rippled.html
Have new ideas? Need help with setting up your node? Come visit us [here](https://github.com/xrplf/rippled/issues/new/choose) Have new ideas? Need help with setting up your node? [Please open an issue here](https://github.com/xrplf/rippled/issues/new/choose).
# Introducing XRP Ledger version 1.10.1
Version 1.10.1 of `rippled`, the reference server implementation of the XRP Ledger protocol, is now available. This release restores packages for Ubuntu 18.04.
Compared to version 1.10.0, the only C++ code change fixes an edge case in Reporting Mode.
If you are already running version 1.10.0, then upgrading to version 1.10.1 is generally not required.
[Sign Up for Future Release Announcements](https://groups.google.com/g/ripple-server)
<!-- BREAK -->
## Install / Upgrade
On supported platforms, see the [instructions on installing or updating `rippled`](https://xrpl.org/install-rippled.html).
## Changelog
- [`da18c86cbf`](https://github.com/ripple/rippled/commit/da18c86cbfea1d8fe6940035f9103e15890d47ce) Build packages with Ubuntu 18.04
- [`f7b3ddd87b`](https://github.com/ripple/rippled/commit/f7b3ddd87b8ef093a06ab1420bea57ed1e77643a) Reporting Mode: Do not attempt to acquire missing data from peer network (#4458)
### GitHub
The public source code repository for `rippled` is hosted on GitHub at <https://github.com/XRPLF/rippled>.
We welcome all contributions and invite everyone to join the community of XRP Ledger developers to help build the Internet of Value.
### Credits
The following people contributed directly to this release:
- John Freeman <jfreeman08@gmail.com>
- Mark Travis <mtrippled@users.noreply.github.com>
- Michael Legleux <mlegleux@ripple.com>
Bug Bounties and Responsible Disclosures:
We welcome reviews of the rippled code and urge researchers to
responsibly disclose any issues they may find.
To report a bug, please send a detailed report to:
bugs@xrpl.org
# Introducing XRP Ledger version 1.10.0
Version 1.10.0 of `rippled`, the reference server implementation of the XRP Ledger protocol, is now available. This release introduces six new amendments, detailed below, and cleans up code to improve performance.
[Sign Up for Future Release Announcements](https://groups.google.com/g/ripple-server)
<!-- BREAK -->
## Action Required
Six new amendments are now open for voting according to the XRP Ledger's [amendment process](https://xrpl.org/amendments.html), which enables protocol changes following two weeks of >80% support from trusted validators.
If you operate an XRP Ledger server, upgrade to version 1.10.0 by March 21 to ensure service continuity. The exact time that protocol changes take effect depends on the voting decisions of the decentralized network.
## Install / Upgrade
On supported platforms, see the [instructions on installing or updating `rippled`](https://xrpl.org/install-rippled.html).
## New Amendments
- **`featureImmediateOfferKilled`**: Changes the response code of an `OfferCreate` transaction with the `tfImmediateOrCancel` flag to return `tecKILLED` when no funds are moved. The previous return code of `tecSUCCESS` was unintuitive. [#4157](https://github.com/XRPLF/rippled/pull/4157)
- **`featureDisallowIncoming`**: Enables an account to block incoming checks, payment channels, NFToken offers, and trust lines. [#4336](https://github.com/XRPLF/rippled/pull/4336)
- **`featureXRPFees`**: Simplifies transaction cost calculations to use XRP directly, rather than calculating indirectly in "fee units" and translating the results to XRP. Updates all instances of "fee units" in the protocol and ledger data to be drops of XRP instead. [#4247](https://github.com/XRPLF/rippled/pull/4247)
- **`fixUniversalNumber`**: Simplifies and unifies the code for decimal floating point math. In some cases, this provides slightly better accuracy than the previous code, resulting in calculations whose least significant digits are different than when calculated with the previous code. The different results may cause other edge case differences where precise calculations are used, such as ranking of offers or processing of payments that use several different paths. [#4192](https://github.com/XRPLF/rippled/pull/4192)
- **`fixNonFungibleTokensV1_2`**: This amendment is a combination of NFToken fixes. [#4417](https://github.com/XRPLF/rippled/pull/4417)
- Fixes unburnable NFTokens when it has over 500 offers. [#4346](https://github.com/XRPLF/rippled/pull/4346)
- Fixes 3 NFToken offer acceptance issues. [#4380](https://github.com/XRPLF/rippled/pull/4380)
- Prevents brokered sales of NFTokens to owners. [#4403](https://github.com/XRPLF/rippled/pull/4403)
- Only allows the destination to settle NFToken offers through brokerage. [#4399](https://github.com/XRPLF/rippled/pull/4399)
- **`fixTrustLinesToSelf`**: Trust lines must be between two different accounts, but two exceptions exist because of a bug that briefly existed. This amendment removes those trust lines. [69bb2be](https://github.com/XRPLF/rippled/pull/4270/commits/69bb2be446e3cc24c694c0835b48bd2ecd3d119e)
## Changelog
### New Features and Improvements
- **Improve Handshake in the peer protocol**: Switched to using a cryptographically secure PRNG for the Instance Cookie. `rippled` now uses hex encoding for the `Closed-Ledger` and `Previous-Ledger` fields in the Handshake. Also added `--newnodeid` and `--nodeid` command line options. [5a15229](https://github.com/XRPLF/rippled/pull/4270/commits/5a15229eeb13b69c8adf1f653b88a8f8b9480546)
- **RPC tooBusy response now has 503 HTTP status code**: Added ripplerpc 3.0, enabling RPC tooBusy responses to return relevant HTTP status codes. This is a non-breaking change that only applies to JSON-RPC when you include `"ripplerpc": "3.0"` in the request. [#4143](https://github.com/XRPLF/rippled/pull/4143)
- **Use the Conan package manager**: Added a `conanfile.py` and Conan recipe for Snappy. Removed the RocksDB recipe from the repo; you can now get it from Conan Center. [#4367](https://github.com/XRPLF/rippled/pull/4367), [c2b03fe](https://github.com/XRPLF/rippled/commit/c2b03fecca19a304b37467b01fa78593d3dce3fb)
- **Update Build Instructions**: Updated the build instructions to build with the Conan package manager and restructured info for easier comprehension. [#4376](https://github.com/XRPLF/rippled/pull/4376), [#4383](https://github.com/XRPLF/rippled/pull/4383)
- **Revise CONTRIBUTING**: Updated code contribution guidelines. `rippled` is an open source project and contributions are very welcome. [#4382](https://github.com/XRPLF/rippled/pull/4382)
- **Update documented pathfinding configuration defaults**: `417cfc2` changed the default Path Finding configuration values, but missed updating the values documented in rippled-example.cfg. Updated those defaults and added recommended values for nodes that want to support advanced pathfinding. [#4409](https://github.com/XRPLF/rippled/pull/4409)
- **Remove gRPC code previously used for the Xpring SDK**: Removed gRPC code used for the Xpring SDK. The gRPC API is also enabled locally by default in `rippled-example.cfg`. This API is used for [Reporting Mode](https://xrpl.org/build-run-rippled-in-reporting-mode.html) and [Clio](https://github.com/XRPLF/clio). [28f4cc7](https://github.com/XRPLF/rippled/pull/4321/commits/28f4cc7817c2e477f0d7e9ade8f07a45ff2b81f1)
- **Switch from C++17 to C++20**: Updated `rippled` to use C++20. [92d35e5](https://github.com/XRPLF/rippled/pull/4270/commits/92d35e54c7de6bbe44ff6c7c52cc0765b3f78258)
- **Support for Boost 1.80.0:**: [04ef885](https://github.com/XRPLF/rippled/pull/4321/commits/04ef8851081f6ee9176783ad3725960b8a931ebb)
- **Reduce default reserves to 10/2**: Updated the hard-coded default reserves to match the current settings on Mainnet. [#4329](https://github.com/XRPLF/rippled/pull/4329)
- **Improve self-signed certificate generation**: Improved speed and security of TLS certificate generation on fresh startup. [0ecfc7c](https://github.com/XRPLF/rippled/pull/4270/commits/0ecfc7cb1a958b731e5f184876ea89ae2d4214ee)
### Bug Fixes
- **Update command-line usage help message**: Added `manifest` and `validator_info` to the `rippled` CLI usage statement. [b88ed5a](https://github.com/XRPLF/rippled/pull/4270/commits/b88ed5a8ec2a0735031ca23dc6569d54787dc2f2)
- **Work around gdb bug by changing a template parameter**: Added a workaround for a bug in gdb, where unsigned template parameters caused issues with RTTI. [#4332](https://github.com/XRPLF/rippled/pull/4332)
- **Fix clang 15 warnings**: [#4325](https://github.com/XRPLF/rippled/pull/4325)
- **Catch transaction deserialization error in doLedgerGrpc**: Fixed an issue in the gRPC API, so `Clio` can extract ledger headers and state objects from specific transactions that can't be deserialized by `rippled` code. [#4323](https://github.com/XRPLF/rippled/pull/4323)
- **Update dependency: gRPC**: New Conan recipes broke the old version of gRPC, so the dependency was updated. [#4407](https://github.com/XRPLF/rippled/pull/4407)
- **Fix Doxygen workflow**: Added options to build documentation that don't depend on the library dependencies of `rippled`. [#4372](https://github.com/XRPLF/rippled/pull/4372)
- **Don't try to read SLE with key 0 from the ledger**: Fixed the `preclaim` function to check for 0 in `NFTokenSellOffer` and `NFTokenBuyOffer` before calling `Ledger::read`. This issue only affected debug builds. [#4351](https://github.com/XRPLF/rippled/pull/4351)
- **Update broken link to hosted Doxygen content**: [5e1cb09](https://github.com/XRPLF/rippled/pull/4270/commits/5e1cb09b8892e650f6c34a66521b6b1673bd6b65)
### Code Cleanup
- **Prevent unnecessary `shared_ptr` copies by accepting a value in `SHAMapInnerNode::setChild`**: [#4266](https://github.com/XRPLF/rippled/pull/4266)
- **Release TaggedCache object memory outside the lock**: [3726f8b](https://github.com/XRPLF/rippled/pull/4321/commits/3726f8bf31b3eab8bab39dce139656fd705ae9a0)
- **Rename SHAMapStoreImp::stopping() to healthWait()**: [7e9e910](https://github.com/XRPLF/rippled/pull/4321/commits/7e9e9104eabbf0391a0837de5630af17a788e233)
- **Improve wrapper around OpenSSL RAND**: [7b3507b](https://github.com/XRPLF/rippled/pull/4270/commits/7b3507bb873495a974db33c57a888221ddabcacc)
- **Improve AccountID string conversion caching**: Improved memory cache usage. [e2eed96](https://github.com/XRPLF/rippled/pull/4270/commits/e2eed966b0ecb6445027e6a023b48d702c5f4832)
- **Build the command map at compile time**: [9aaa0df](https://github.com/XRPLF/rippled/pull/4270/commits/9aaa0dff5fd422e5f6880df8e20a1fd5ad3b4424)
- **Avoid unnecessary copying and dynamic memory allocations**: [d318ab6](https://github.com/XRPLF/rippled/pull/4270/commits/d318ab612adc86f1fd8527a50af232f377ca89ef)
- **Use constexpr to check memo validity**: [e67f905](https://github.com/XRPLF/rippled/pull/4270/commits/e67f90588a9050162881389d7e7d1d0fb31066b0)
- **Remove charUnHex**: [83ac141](https://github.com/XRPLF/rippled/pull/4270/commits/83ac141f656b1a95b5661853951ebd95b3ffba99)
- **Remove deprecated AccountTxOld.cpp**: [ce64f7a](https://github.com/XRPLF/rippled/pull/4270/commits/ce64f7a90f99c6b5e68d3c3d913443023de061a6)
- **Remove const_cast usage**: [23ce431](https://github.com/XRPLF/rippled/pull/4321/commits/23ce4318768b718c82e01004d23f1abc9a9549ff)
- **Remove inaccessible code paths and outdated data format wchar_t**: [95fabd5](https://github.com/XRPLF/rippled/pull/4321/commits/95fabd5762a4917753c06268192e4d4e4baef8e4)
- **Improve move semantics in Expected**: [#4326](https://github.com/XRPLF/rippled/pull/4326)
### GitHub
The public source code repository for `rippled` is hosted on GitHub at <https://github.com/XRPLF/rippled>.
We welcome all contributions and invite everyone to join the community of XRP Ledger developers to help build the Internet of Value.
### Credits
The following people contributed directly to this release:
- Alexander Kremer <akremer@ripple.com>
- Alloy Networks <45832257+alloynetworks@users.noreply.github.com>
- CJ Cobb <46455409+cjcobb23@users.noreply.github.com>
- Chenna Keshava B S <ckbs.keshava56@gmail.com>
- Crypto Brad Garlinghouse <cryptobradgarlinghouse@protonmail.com>
- Denis Angell <dangell@transia.co>
- Ed Hennis <ed@ripple.com>
- Elliot Lee <github.public@intelliot.com>
- Gregory Popovitch <greg7mdp@gmail.com>
- Howard Hinnant <howard.hinnant@gmail.com>
- J. Scott Branson <18340247+crypticrabbit@users.noreply.github.com>
- John Freeman <jfreeman08@gmail.com>
- ledhed2222 <ledhed2222@users.noreply.github.com>
- Levin Winter <33220502+levinwinter@users.noreply.github.com>
- manojsdoshi <mdoshi@ripple.com>
- Nik Bougalis <nikb@bougalis.net>
- RichardAH <richard.holland@starstone.co.nz>
- Scott Determan <scott.determan@yahoo.com>
- Scott Schurr <scott@ripple.com>
- Shawn Xie <35279399+shawnxie999@users.noreply.github.com>
Security Bug Bounty Acknowledgements:
- Aaron Hook
- Levin Winter
Bug Bounties and Responsible Disclosures:
We welcome reviews of the rippled code and urge researchers to
responsibly disclose any issues they may find.
To report a bug, please send a detailed report to:
bugs@xrpl.org
# Introducing XRP Ledger version 1.9.4 # Introducing XRP Ledger version 1.9.4

View File

@@ -266,7 +266,7 @@ Ledger::Ledger(
{ {
info_.hash = calculateLedgerHash(info_); info_.hash = calculateLedgerHash(info_);
if (acquire && !config.reporting()) if (acquire && !config.reporting())
family.missingNode(info_.hash, info_.seq); family.missingNodeAcquireByHash(info_.hash, info_.seq);
} }
} }

View File

@@ -33,7 +33,7 @@ namespace BuildInfo {
// and follow the format described at http://semver.org/ // and follow the format described at http://semver.org/
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// clang-format off // clang-format off
char const* const versionString = "1.10.0-rc4" char const* const versionString = "1.10.1"
// clang-format on // clang-format on
#if defined(DEBUG) || defined(SANITIZER) #if defined(DEBUG) || defined(SANITIZER)

View File

@@ -75,11 +75,23 @@ public:
virtual bool virtual bool
isShardBacked() const = 0; isShardBacked() const = 0;
/** Acquire ledger that has a missing node by ledger sequence
*
* Throw if in reporting mode.
*
* @param refNum Sequence of ledger to acquire.
* @param nodeHash Hash of missing node to report in throw.
*/
virtual void virtual void
missingNode(std::uint32_t refNum) = 0; missingNodeAcquireBySeq(std::uint32_t refNum, uint256 const& nodeHash) = 0;
/** Acquire ledger that has a missing node by ledger hash
*
* @param refHash Hash of ledger to acquire.
* @param refNum Ledger sequence with missing node.
*/
virtual void virtual void
missingNode(uint256 const& refHash, std::uint32_t refNum) = 0; missingNodeAcquireByHash(uint256 const& refHash, std::uint32_t refNum) = 0;
virtual void virtual void
reset() = 0; reset() = 0;

View File

@@ -83,10 +83,10 @@ public:
reset() override; reset() override;
void void
missingNode(std::uint32_t seq) override; missingNodeAcquireBySeq(std::uint32_t seq, uint256 const& hash) override;
void void
missingNode(uint256 const& hash, std::uint32_t seq) override missingNodeAcquireByHash(uint256 const& hash, std::uint32_t seq) override
{ {
acquire(hash, seq); acquire(hash, seq);
} }

View File

@@ -89,10 +89,11 @@ public:
reset() override; reset() override;
void void
missingNode(std::uint32_t seq) override; missingNodeAcquireBySeq(std::uint32_t seq, uint256 const& nodeHash)
override;
void void
missingNode(uint256 const& hash, std::uint32_t seq) override missingNodeAcquireByHash(uint256 const& hash, std::uint32_t seq) override
{ {
acquire(hash, seq); acquire(hash, seq);
} }

View File

@@ -21,6 +21,7 @@
#include <ripple/app/main/Application.h> #include <ripple/app/main/Application.h>
#include <ripple/app/main/Tuning.h> #include <ripple/app/main/Tuning.h>
#include <ripple/shamap/NodeFamily.h> #include <ripple/shamap/NodeFamily.h>
#include <sstream>
namespace ripple { namespace ripple {
@@ -65,9 +66,16 @@ NodeFamily::reset()
} }
void void
NodeFamily::missingNode(std::uint32_t seq) NodeFamily::missingNodeAcquireBySeq(std::uint32_t seq, uint256 const& nodeHash)
{ {
JLOG(j_.error()) << "Missing node in " << seq; JLOG(j_.error()) << "Missing node in " << seq;
if (app_.config().reporting())
{
std::stringstream ss;
ss << "Node not read, likely a Cassandra error in ledger seq " << seq
<< " object hash " << nodeHash;
Throw<std::runtime_error>(ss.str());
}
std::unique_lock<std::mutex> lock(maxSeqMutex_); std::unique_lock<std::mutex> lock(maxSeqMutex_);
if (maxSeq_ == 0) if (maxSeq_ == 0)

View File

@@ -173,30 +173,40 @@ SHAMap::finishFetch(
std::shared_ptr<NodeObject> const& object) const std::shared_ptr<NodeObject> const& object) const
{ {
assert(backed_); assert(backed_);
if (!object)
{
if (full_)
{
full_ = false;
f_.missingNode(ledgerSeq_);
}
return {};
}
std::shared_ptr<SHAMapTreeNode> node; std::shared_ptr<SHAMapTreeNode> node;
try try
{ {
if (!object)
{
if (full_)
{
full_ = false;
f_.missingNodeAcquireBySeq(ledgerSeq_, hash.as_uint256());
}
return {};
}
node = node =
SHAMapTreeNode::makeFromPrefix(makeSlice(object->getData()), hash); SHAMapTreeNode::makeFromPrefix(makeSlice(object->getData()), hash);
if (node) if (node)
canonicalize(hash, node); canonicalize(hash, node);
return node; return node;
} }
catch (std::exception const&) catch (SHAMapMissingNode const& e)
{
JLOG(journal_.warn()) << "Missing node: " << hash << " : " << e.what();
}
catch (std::runtime_error const& e)
{
JLOG(journal_.warn()) << e.what();
}
catch (...)
{ {
JLOG(journal_.warn()) << "Invalid DB node " << hash; JLOG(journal_.warn()) << "Invalid DB node " << hash;
return std::shared_ptr<SHAMapTreeNode>();
} }
return std::shared_ptr<SHAMapTreeNode>();
} }
// See if a sync filter has a node // See if a sync filter has a node

View File

@@ -22,6 +22,7 @@
#include <ripple/app/main/Tuning.h> #include <ripple/app/main/Tuning.h>
#include <ripple/nodestore/DatabaseShard.h> #include <ripple/nodestore/DatabaseShard.h>
#include <ripple/shamap/ShardFamily.h> #include <ripple/shamap/ShardFamily.h>
#include <tuple>
namespace ripple { namespace ripple {
@@ -152,8 +153,9 @@ ShardFamily::reset()
} }
void void
ShardFamily::missingNode(std::uint32_t seq) ShardFamily::missingNodeAcquireBySeq(std::uint32_t seq, uint256 const& nodeHash)
{ {
std::ignore = nodeHash;
JLOG(j_.error()) << "Missing node in ledger sequence " << seq; JLOG(j_.error()) << "Missing node in ledger sequence " << seq;
std::unique_lock<std::mutex> lock(maxSeqMutex_); std::unique_lock<std::mutex> lock(maxSeqMutex_);

View File

@@ -105,13 +105,15 @@ public:
} }
void void
missingNode(std::uint32_t refNum) override missingNodeAcquireBySeq(std::uint32_t refNum, uint256 const& nodeHash)
override
{ {
Throw<std::runtime_error>("missing node"); Throw<std::runtime_error>("missing node");
} }
void void
missingNode(uint256 const& refHash, std::uint32_t refNum) override missingNodeAcquireByHash(uint256 const& refHash, std::uint32_t refNum)
override
{ {
Throw<std::runtime_error>("missing node"); Throw<std::runtime_error>("missing node");
} }