Compare commits

...

732 Commits

Author SHA1 Message Date
dependabot[bot]
707427c63a ci: [DEPENDABOT] Bump actions/download-artifact from 4 to 5 (#2414)
Bumps
[actions/download-artifact](https://github.com/actions/download-artifact)
from 4 to 5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/download-artifact/releases">actions/download-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/download-artifact/pull/407">actions/download-artifact#407</a></li>
<li>BREAKING fix: inconsistent path behavior for single artifact
downloads by ID by <a
href="https://github.com/GrantBirki"><code>@​GrantBirki</code></a> in <a
href="https://redirect.github.com/actions/download-artifact/pull/416">actions/download-artifact#416</a></li>
</ul>
<h2>v5.0.0</h2>
<h3>🚨 Breaking Change</h3>
<p>This release fixes an inconsistency in path behavior for single
artifact downloads by ID. <strong>If you're downloading single artifacts
by ID, the output path may change.</strong></p>
<h4>What Changed</h4>
<p>Previously, <strong>single artifact downloads</strong> behaved
differently depending on how you specified the artifact:</p>
<ul>
<li><strong>By name</strong>: <code>name: my-artifact</code> → extracted
to <code>path/</code> (direct)</li>
<li><strong>By ID</strong>: <code>artifact-ids: 12345</code> → extracted
to <code>path/my-artifact/</code> (nested)</li>
</ul>
<p>Now both methods are consistent:</p>
<ul>
<li><strong>By name</strong>: <code>name: my-artifact</code> → extracted
to <code>path/</code> (unchanged)</li>
<li><strong>By ID</strong>: <code>artifact-ids: 12345</code> → extracted
to <code>path/</code> (fixed - now direct)</li>
</ul>
<h4>Migration Guide</h4>
<h5> No Action Needed If:</h5>
<ul>
<li>You download artifacts by <strong>name</strong></li>
<li>You download <strong>multiple</strong> artifacts by ID</li>
<li>You already use <code>merge-multiple: true</code> as a
workaround</li>
</ul>
<h5>⚠️ Action Required If:</h5>
<p>You download <strong>single artifacts by ID</strong> and your
workflows expect the nested directory structure.</p>
<p><strong>Before v5 (nested structure):</strong></p>
<pre lang="yaml"><code>- uses: actions/download-artifact@v4
  with:
    artifact-ids: 12345
    path: dist
# Files were in: dist/my-artifact/
</code></pre>
<blockquote>
<p>Where <code>my-artifact</code> is the name of the artifact you
previously uploaded</p>
</blockquote>
<p><strong>To maintain old behavior (if needed):</strong></p>
<pre lang="yaml"><code>&lt;/tr&gt;&lt;/table&gt; 
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="634f93cb29"><code>634f93c</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/download-artifact/issues/416">#416</a>
from actions/single-artifact-id-download-path</li>
<li><a
href="b19ff43027"><code>b19ff43</code></a>
refactor: resolve download path correctly in artifact download tests
(mainly ...</li>
<li><a
href="e262cbee4a"><code>e262cbe</code></a>
bundle dist</li>
<li><a
href="bff23f9308"><code>bff23f9</code></a>
update docs</li>
<li><a
href="fff8c148a8"><code>fff8c14</code></a>
fix download path logic when downloading a single artifact by id</li>
<li><a
href="448e3f862a"><code>448e3f8</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/download-artifact/issues/407">#407</a>
from actions/nebuk89-patch-1</li>
<li><a
href="47225c44b3"><code>47225c4</code></a>
Update README.md</li>
<li>See full diff in <a
href="https://github.com/actions/download-artifact/compare/v4...v5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/download-artifact&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
2025-08-11 12:23:49 +01:00
emrearıyürek
5eea26d9ac perf: Pass const reference Input into handlers (#2409)
Fix https://github.com/XRPLF/clio/issues/2265

---------

Co-authored-by: Sergey Kuznetsov <skuznetsov@ripple.com>
2025-08-11 12:21:32 +01:00
Peter Chen
226d386be2 fix: remove 'count' from logger level (#2408) 2025-08-11 12:00:52 +01:00
dependabot[bot]
c95d8f2f89 ci: [DEPENDABOT] Bump docker/login-action from 3.4.0 to 3.5.0 in /.github/actions/build_docker_image (#2415) 2025-08-11 10:26:48 +01:00
dependabot[bot]
ed5dfc6c0e ci: [DEPENDABOT] Bump docker/login-action from 3.4.0 to 3.5.0 (#2416) 2025-08-11 10:26:09 +01:00
Ayaz Salikhov
2600198bd5 perf: Optimize bench logger code for more realistic scenario (#2412) 2025-08-08 12:21:06 +01:00
github-actions[bot]
c83be63b9c style: clang-tidy auto fixes (#2411) 2025-08-08 10:49:43 +01:00
Ayaz Salikhov
4aa2ca94de perf: Add benchmark for Logger (#2407) 2025-08-07 19:46:12 +01:00
Alex Kremer
87565b685a fix: MPT test object producing ASAN error (#2406)
Plus some driveby cleanup of incorrect placement of `constexpr`
2025-08-07 18:57:26 +01:00
Alex Kremer
e4d0c1ca48 chore: Update trufflehog max depth (#2405) 2025-08-07 16:01:38 +01:00
Ayaz Salikhov
498232baf8 ci: Build benchmark code in CI (#2404) 2025-08-07 15:59:33 +01:00
github-actions[bot]
43f4828a61 style: clang-tidy auto fixes (#2402)
Fixes #2401. Please review and commit clang-tidy fixes.

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-08-07 10:44:43 +01:00
Alex Kremer
1a298dedd2 fix: ETLng more cpu usage fixes (#2399) 2025-08-06 16:50:48 +01:00
Alex Kremer
6c9c88e3fc fix: Remove tight loop in ETLng (#2398) 2025-08-06 12:29:42 +01:00
Ayaz Salikhov
156b858db7 fix: Fix default bool value print in config definition (#2397) 2025-08-06 11:51:15 +01:00
Ayaz Salikhov
cfffbfba9d ci: Make clio_server executable (#2394)
Closes: https://github.com/XRPLF/clio/discussions/2393
2025-08-05 18:13:23 +01:00
Ayaz Salikhov
97a938a2a9 chore: Rewrite clio Dockerfile so it's more clear (#2395) 2025-08-05 18:13:11 +01:00
Copilot
63d664b9fb ci: Fix concurrency settings to allow parallel workflows on develop branch (#2391)
Updates the GitHub Actions workflow concurrency configuration to allow
parallel execution of workflows on the `develop` branch while
maintaining cancellation behavior for other branches.

## Problem
Previously, all workflow runs were subject to cancellation when new
commits were pushed to the same branch (`cancel-in-progress: true`).
This caused issues on the `develop` branch where important CI runs could
be prematurely cancelled, potentially missing critical feedback on the
main development branch.

## Solution
Modified the `concurrency` settings in `.github/workflows/build.yml` to
use separate concurrency groups and conditional cancellation:

```yaml
concurrency:
  # Use separate concurrency groups for develop vs other branches to prevent cross-cancellation
  group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref == 'refs/heads/develop' && github.run_number || 'branch' }}
  cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}
```

## Behavior
- **`develop` branch**: Each run gets its own concurrency group (using
`run_number`), allowing parallel execution without cancellation or
queuing delays
- **All other branches**: Shared concurrency group with
`cancel-in-progress: true` - workflows are cancelled when new commits
are pushed

This ensures that the `develop` branch can run multiple workflows in
parallel without interference while still providing the efficiency
benefits of workflow cancellation on feature branches and pull requests.

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 Share your feedback on Copilot coding agent for the chance to win a
$200 gift card! Click
[here](https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent) to
start the survey.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
Co-authored-by: mathbunnyru <12270691+mathbunnyru@users.noreply.github.com>
2025-08-05 14:26:26 +01:00
Ayaz Salikhov
40824812d6 chore: Update conan recipe revisions (#2390) 2025-08-05 13:49:53 +01:00
Ayaz Salikhov
288ffb8fef chore: Bump libuv recipe version (#2389) 2025-08-04 16:22:17 +01:00
Ayaz Salikhov
a9cf781ca5 ci: Use an image with CMake 4 in CI (#2388) 2025-08-04 15:52:36 +01:00
Ayaz Salikhov
a446d85297 chore: Enable CMake 4 support (#2387) 2025-08-04 15:18:21 +01:00
Ayaz Salikhov
dc18aefb33 ci: Hash-pin docker/login-action (#2386) 2025-08-04 14:13:38 +01:00
dependabot[bot]
e312354016 ci: [DEPENDABOT] Bump docker/metadata-action from 5.7.0 to 5.8.0 in /.github/actions/build_docker_image (#2385) 2025-08-04 10:16:19 +01:00
github-actions[bot]
ba905e38ae style: Update pre-commit hooks (#2384)
Update versions of pre-commit hooks to latest version.

Co-authored-by: mathbunnyru <12270691+mathbunnyru@users.noreply.github.com>
2025-08-03 10:01:42 +01:00
Ayaz Salikhov
f35e5ac784 ci: Call prepare_runner right after checkout (#2383) 2025-07-31 15:27:54 +01:00
Ayaz Salikhov
a9b02fb292 ci: Specify conan profile in check_libxrpl (#2381)
Fix: https://github.com/XRPLF/clio/issues/2380
2025-07-31 12:14:40 +01:00
Ayaz Salikhov
bc8a2c19aa feat: Use mold linker on Linux (#2304)
Fix: https://github.com/XRPLF/clio/issues/1242

Depends on: https://github.com/XRPLF/clio/pull/2329
2025-07-30 17:10:31 +01:00
github-actions[bot]
46b86a5d61 style: clang-tidy auto fixes (#2379)
Fixes #2378. Please review and commit clang-tidy fixes.

---------

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
2025-07-30 13:21:16 +01:00
Alex Kremer
3defcaecac docs: Set ws_port to 6006 in example config (#2377) 2025-07-29 13:00:28 +01:00
Ayaz Salikhov
d7888d5556 fix: Do not link to several boost::stacktrace implementations because… (#2329)
… of rippled

See: https://github.com/XRPLF/rippled/pull/5546
2025-07-29 12:56:18 +01:00
Ayaz Salikhov
f518936e69 docs: Fix some doxygen issues (#2370) 2025-07-29 12:54:49 +01:00
Ayaz Salikhov
9e35f16be1 chore: Move config definition to cpp file (#2371)
Having such a long init list in almost every translation unit is
definitely not nice.
It makes it more difficult to work on custom logger (because I need to
adjust log_format), so let's move it to cpp file
2025-07-29 11:52:41 +01:00
Ayaz Salikhov
d048641242 ci: Add option to force conan upload (#2376) 2025-07-29 11:21:58 +01:00
github-actions[bot]
f347a732a6 style: clang-tidy auto fixes (#2375) 2025-07-29 10:51:26 +01:00
Ayaz Salikhov
0e2ba4a64e chore: Do not generate source files and use target_compile_definition… (#2369)
…s to set version

Advantages:
- not modifying src dir in build time (`git clean` will also remove
less)
- simpler codecov (if we decide to move it to separate stage in the
future)
- The cpp file is perfectly valid, so it will be treated as a C++ files
by all the tooling
- No need to use CMAKE_PROJECT_INCLUDE_BEFORE, should work fine without
it
- Instead of generating + recompiling, we will just be doing
recompilation of 1 file
2025-07-28 12:49:36 +01:00
Ayaz Salikhov
4a4f8842bd ci: Pass expected_version to build_impl.yml (#2367) 2025-07-28 11:31:22 +01:00
dependabot[bot]
a63805d631 ci: [DEPENDABOT] Bump ytanikin/pr-conventional-commits from 1.4.1 to 1.4.2 (#2368)
Bumps
[ytanikin/pr-conventional-commits](https://github.com/ytanikin/pr-conventional-commits)
from 1.4.1 to 1.4.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ytanikin/pr-conventional-commits/releases">ytanikin/pr-conventional-commits's
releases</a>.</em></p>
<blockquote>
<h2>1.4.2</h2>
<h2>What's Changed</h2>
<ul>
<li>docs: Rework the Configuring Squash Merging section of the README.md
by <a
href="https://github.com/SimonPistache"><code>@​SimonPistache</code></a>
in <a
href="https://redirect.github.com/ytanikin/pr-conventional-commits/pull/39">ytanikin/pr-conventional-commits#39</a></li>
<li>feat: Add scope validation &amp; update workflows by <a
href="https://github.com/LordFckHelmchen"><code>@​LordFckHelmchen</code></a>
in <a
href="https://redirect.github.com/ytanikin/pr-conventional-commits/pull/42">ytanikin/pr-conventional-commits#42</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/SimonPistache"><code>@​SimonPistache</code></a>
made their first contribution in <a
href="https://redirect.github.com/ytanikin/pr-conventional-commits/pull/39">ytanikin/pr-conventional-commits#39</a></li>
<li><a
href="https://github.com/LordFckHelmchen"><code>@​LordFckHelmchen</code></a>
made their first contribution in <a
href="https://redirect.github.com/ytanikin/pr-conventional-commits/pull/42">ytanikin/pr-conventional-commits#42</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/ytanikin/pr-conventional-commits/compare/1.4.1...1.4.2">https://github.com/ytanikin/pr-conventional-commits/compare/1.4.1...1.4.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b72758283d"><code>b727582</code></a>
feat: Add scope validation (<a
href="https://redirect.github.com/ytanikin/pr-conventional-commits/issues/42">#42</a>)</li>
<li><a
href="2aa4e89987"><code>2aa4e89</code></a>
docs: Rework the Configuring Squash Merging section of the README.md (<a
href="https://redirect.github.com/ytanikin/pr-conventional-commits/issues/39">#39</a>)</li>
<li>See full diff in <a
href="8267db1bac...b72758283d">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ytanikin/pr-conventional-commits&package-manager=github_actions&previous-version=1.4.1&new-version=1.4.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-28 10:18:31 +01:00
Ayaz Salikhov
b3beb50e8f ci: Provide fetch-tags and ref when using actions/checkout (#2366) 2025-07-25 18:07:36 +01:00
Ayaz Salikhov
0be712c363 chore: Verify version of the binary on release (#2365) 2025-07-25 16:49:58 +01:00
Ayaz Salikhov
ad5f0642ba ci: Use image with artifactory DNS name (#2364) 2025-07-25 15:24:51 +01:00
Ayaz Salikhov
4948882545 chore: Use artifactory DNS name (#2363) 2025-07-25 12:56:59 +01:00
Ayaz Salikhov
5778363689 chore: Do not add sha256 checksums to release notes (#2362) 2025-07-24 18:05:38 +01:00
Ayaz Salikhov
d6fec5b5ff chore: Improve RC release notes (#2361) 2025-07-24 17:01:20 +01:00
github-actions[bot]
e380214496 style: clang-tidy auto fixes (#2360)
Fixes #2359. Please review and commit clang-tidy fixes.

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-07-24 10:49:05 +01:00
Ayaz Salikhov
1463b0e3e5 refactor: Refactor Logger::init() into multiple functions (#2357) 2025-07-23 22:56:02 +01:00
Ayaz Salikhov
60bbe1eb72 refactor: Refactor Logger.hpp and LoggerFixtures.hpp (#2356) 2025-07-23 17:49:27 +01:00
Alex Kremer
b29e2e4c88 chore: Update boost usages to match 1.88 (#2355) 2025-07-23 15:49:19 +01:00
Sergey Kuznetsov
bcaa5f3392 test: Fix prometheus tests (#2312) 2025-07-23 15:26:01 +01:00
Ayaz Salikhov
3f0f20a542 ci: Pin docker image to commit hash (#2354) 2025-07-22 13:38:27 +01:00
Sergey Kuznetsov
00333a8d16 fix: Handle logger exceptions (#2349) 2025-07-21 17:30:08 +01:00
Sergey Kuznetsov
61c17400fe fix: Fix writing into dead variables in BlockingCache (#2333) 2025-07-21 12:16:46 +01:00
Ayaz Salikhov
d43002b49a ci: Run upload_conan_deps on necessary changes in .github/scripts/conan/ (#2348) 2025-07-18 13:49:18 +01:00
Ayaz Salikhov
30880ad627 ci: Don't run tsan unit tests, build 3rd party for gcc.tsan heavy-arm64 (#2347) 2025-07-18 13:04:53 +01:00
Ayaz Salikhov
25e55ef952 feat: Update to GCC 14.3 (#2344)
Testing in: https://github.com/XRPLF/clio/pull/2345
2025-07-18 12:20:42 +01:00
Ayaz Salikhov
579e6030ca chore: Install apple-clang 17 locally (#2342) 2025-07-18 11:42:56 +01:00
Ayaz Salikhov
d93b23206e chore: Do not hardcode python filename in gcc Dockerfile (#2340) 2025-07-17 18:18:00 +01:00
Ayaz Salikhov
1b63c3c315 chore: Don't hardcode gcc version in ci/Dockerfile (#2337) 2025-07-17 15:52:51 +01:00
Ayaz Salikhov
a8e61204da chore: Don't hardcode xrplf repo when building docker images (#2336) 2025-07-16 13:46:33 +01:00
Ayaz Salikhov
bef24c1387 chore: Add trufflehog security tool (#2334)
Tool works locally and doesn't require internet connection, if
`--no-verification` is passed.
I also tried to add `secret.cpp` with github PAT and the tool detected
it.
2025-07-15 19:26:14 +01:00
Sergey Kuznetsov
b6c1e2578b chore: Remove using blocking cache (#2328)
BlockingCache has a bug so reverting its usage for now.
2025-07-14 13:47:13 +01:00
Ayaz Salikhov
e0496aff5a fix: Prepare runner in docs workflow (#2325) 2025-07-10 18:41:22 +01:00
Ayaz Salikhov
2f7adfb883 feat: Always use version from tag if available (#2322) 2025-07-10 17:10:31 +01:00
Ayaz Salikhov
0f1895947d feat: Add script to rebuild conan dependencies (#2311) 2025-07-10 15:44:12 +01:00
Ayaz Salikhov
fa693b2aff chore: Unify how we deal with branches (#2320) 2025-07-10 14:16:36 +01:00
Ayaz Salikhov
1825ea701f fix: Mark tags with dash as prerelease (#2319) 2025-07-10 14:16:03 +01:00
Ayaz Salikhov
2ae5b13fb9 refactor: Simplify CMakeLists.txt for sanitizers (#2297) 2025-07-10 14:04:29 +01:00
Ayaz Salikhov
686a732fa8 fix: Link with boost libraries explicitly (#2313) 2025-07-10 12:09:21 +01:00
github-actions[bot]
4919b57466 style: clang-tidy auto fixes (#2317) 2025-07-10 10:50:03 +01:00
Alex Kremer
44d39f335e fix: ASAN heap-buffer-overflow issue in DBHelpers (#2310) 2025-07-09 21:17:25 +01:00
Sergey Kuznetsov
bfe5b52a64 fix: Add sending queue to ng web server (#2273) 2025-07-09 17:29:57 +01:00
Alex Kremer
413b823976 fix: ASAN stack-buffer-overflow in NFTHelpersTest_NFTDataFromLedgerObject (#2306) 2025-07-09 13:43:39 +01:00
Hanlu
e664f0b9ce chore: Remove redundant words in comment (#2309)
remove redundant words in comment

Signed-off-by: liangmulu <liangmulu@outlook.com>
2025-07-09 12:11:49 +01:00
Ayaz Salikhov
907bd7a58f chore: Update conan revisions (#2308)
Took latest versions from CCI and uploaded to our artifactory
2025-07-09 11:46:34 +01:00
Alex Kremer
f94a9864f0 fix: Usage of compiler flags for RPC module (#2305) 2025-07-08 22:46:26 +01:00
Ayaz Salikhov
36ea0389e2 chore: Bump tools docker image version (#2303) 2025-07-08 18:05:08 +01:00
Ayaz Salikhov
12640de22d ci: Build tools image separately for different archs (#2302) 2025-07-08 17:59:52 +01:00
Ayaz Salikhov
ae4f2d9023 ci: Add mold to tools image (#2301)
Work on: https://github.com/XRPLF/clio/issues/1242
2025-07-08 17:41:22 +01:00
Ayaz Salikhov
b7b61ef61d fix: Temporarily disable dockerhub description update (#2298) 2025-07-08 15:41:03 +01:00
Ayaz Salikhov
f391c3c899 feat: Run sanitizers for Debug builds as well (#2296) 2025-07-08 12:32:16 +01:00
Ayaz Salikhov
562ea41a64 feat: Update to Clang 19 (#2293) 2025-07-08 11:49:11 +01:00
Ayaz Salikhov
687b1e8887 chore: Don't hardcode versions in Dockerfiles and workflows (#2291) 2025-07-03 11:53:53 +01:00
github-actions[bot]
cc506fd094 style: Update pre-commit hooks (#2290)
Update versions of pre-commit hooks to latest version.

Co-authored-by: mathbunnyru <12270691+mathbunnyru@users.noreply.github.com>
2025-07-02 16:36:34 +01:00
Ayaz Salikhov
1fe323190a fix: Make pre-commit autoupdate PRs verified (#2289) 2025-07-02 16:34:16 +01:00
Ayaz Salikhov
379a44641b fix: Import a GPG key when running pre-commit-autoupdate (#2287) 2025-07-02 16:23:13 +01:00
Ayaz Salikhov
18b8fc7e5c ci: Update LLVM tools to v20 (#2278)
Trying in https://github.com/XRPLF/clio/pull/2280
2025-07-02 14:55:54 +01:00
Ayaz Salikhov
be2d915df7 fix: Cleanup fmt headers (#2285) 2025-07-02 14:55:24 +01:00
Ayaz Salikhov
57dda8ac50 chore: Update fmt to 11.2.0 (#2281)
Seems that new clang-tidy fails with our old fmt lib
2025-07-02 14:11:35 +01:00
Ayaz Salikhov
5cdd8a642f fix: Use .contains() method where available (#2277) 2025-07-01 18:28:12 +01:00
Ayaz Salikhov
8abc9c6645 style: Add pre-commit hook to fix JSON style in C++ code (#2266) 2025-06-30 15:28:59 +01:00
Ayaz Salikhov
24e1aa9ae5 fix: Only set package_id:confs for sanitized builds (#2261) 2025-06-30 13:15:28 +01:00
Ayaz Salikhov
9bee023105 fix: Do not allow command injection in GitHub workflows (#2270) 2025-06-30 12:03:06 +01:00
github-actions[bot]
4ee3ef94d9 style: clang-tidy auto fixes (#2272)
Fixes #2271. 

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-06-30 11:40:45 +01:00
Ayaz Salikhov
8fcc2dfa19 fix: Pin lxml<6.0.0 (#2269) 2025-06-27 18:56:14 +01:00
Ayaz Salikhov
123e09695e feat: Switch to xrpl/2.5.0 release (#2267) 2025-06-27 17:13:05 +01:00
Peter Chen
371237487b feat: Support single asset vault (#1979)
fixes #1921

---------

Co-authored-by: Sergey Kuznetsov <skuznetsov@ripple.com>
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
2025-06-27 15:27:34 +01:00
Ayaz Salikhov
d97f19ba1d style: Fix JSON style in C++ code (#2262) 2025-06-27 11:45:11 +01:00
github-actions[bot]
e92dbc8fce style: clang-tidy auto fixes (#2264)
Fixes #2263. Please review and commit clang-tidy fixes.

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-06-27 10:30:17 +01:00
Ayaz Salikhov
769fdab6b7 feat: Add Support For Token Escrow (#2252)
Fix: https://github.com/XRPLF/clio/issues/2174
2025-06-26 18:03:26 +01:00
Ayaz Salikhov
363344d36e feat: Add init_conan script (#2242)
This should make life of a developer so much easier
2025-06-26 17:12:32 +01:00
Ayaz Salikhov
4f7e8194f0 fix: Don't cancel ci image builds (#2259) 2025-06-26 14:51:34 +01:00
dependabot[bot]
04c80c62f5 ci: [DEPENDABOT] bump docker/setup-buildx-action from 3.11.0 to 3.11.1 in /.github/actions/build_docker_image (#2256) 2025-06-23 12:26:26 +01:00
Ayaz Salikhov
92fdebf590 chore: Update conan.lock (#2250) 2025-06-23 12:11:03 +01:00
Ayaz Salikhov
b054a8424d refactor: Refactor GCC image to make upgrades easier (#2246)
Work on: https://github.com/XRPLF/clio/issues/2047
2025-06-23 12:07:44 +01:00
Ayaz Salikhov
162b1305e0 feat: Download and upload conan packages in parallel (#2254) 2025-06-23 12:06:38 +01:00
Ayaz Salikhov
bdaa04d1ec ci: Don't use dynamic names when they are not needed (#2251) 2025-06-23 11:44:17 +01:00
Ayaz Salikhov
6c69453bda fix: Disable conan uploads on schedule (#2253) 2025-06-23 11:41:31 +01:00
Ayaz Salikhov
7661ee6a3b fix: Make update-libxrpl-version work with lockfile (#2249) 2025-06-23 11:38:28 +01:00
Ayaz Salikhov
6cabe89601 chore: Don't use self-hosted runner tag (#2248) 2025-06-23 11:35:34 +01:00
Ayaz Salikhov
70f7635dda refactor: Simplify check_config implementation (#2247) 2025-06-23 11:34:43 +01:00
Ayaz Salikhov
c8574ea42a chore: Cleanup conanfile (#2243) 2025-06-23 11:28:22 +01:00
Ayaz Salikhov
e4fbf5131f feat: Build sanitizers with clang (#2239) 2025-06-23 11:26:05 +01:00
Ayaz Salikhov
87ee358297 ci: Silence brew warnings (#2255) 2025-06-23 11:22:19 +01:00
github-actions[bot]
27e29d0421 style: clang-tidy auto fixes (#2245)
Fixes #2244. Please review and commit clang-tidy fixes.

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-06-19 11:27:06 +01:00
Alex Kremer
63ec563135 feat: ETLng cleanup and graceful shutdown (#2232) 2025-06-18 21:40:11 +01:00
Ayaz Salikhov
2c6f52a0ed ci: Full build conan dependencies only on schedule (#2241) 2025-06-18 20:03:58 +01:00
Ayaz Salikhov
97956b1718 feat: Build macos dependencies with sanitizers (#2240) 2025-06-18 18:20:26 +01:00
Ayaz Salikhov
ebfe4e6468 ci: Don't use save/restore cache for conan; use artifactory (#2230) 2025-06-18 15:25:40 +01:00
Ayaz Salikhov
534518f13e docs: Add information about global.conf (#2238) 2025-06-18 11:26:46 +01:00
Ayaz Salikhov
4ed51c22d0 fix: Force reupload new artifacts (#2236)
The issue is that we previously didn't care about `[conf]` section.
And for example, we uploaded `clang.ubsan` build with the same
package_id as a regular clang build.
This was fixed in https://github.com/XRPLF/clio/pull/2233 and
https://github.com/XRPLF/clio/pull/2234

Adding `global.conf` almost fixed the problem, but since our
non-sanitized builds don't set anything in `[conf]`, we use the same
package_id as before.
So, for the `clang` build we end up with previously uploaded
`clang.ubsan` build artifacts.

To fix this, we should force the upload.
2025-06-18 11:14:03 +01:00
dependabot[bot]
4364c07f1e ci: [DEPENDABOT] bump docker/setup-buildx-action from 3.10.0 to 3.11.0 in /.github/actions/build_docker_image (#2235)
Bumps
[docker/setup-buildx-action](https://github.com/docker/setup-buildx-action)
from 3.10.0 to 3.11.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/setup-buildx-action/releases">docker/setup-buildx-action's
releases</a>.</em></p>
<blockquote>
<h2>v3.11.0</h2>
<ul>
<li>Keep BuildKit state support by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/setup-buildx-action/pull/427">docker/setup-buildx-action#427</a></li>
<li>Remove aliases created when installing by default by <a
href="https://github.com/hashhar"><code>@​hashhar</code></a> in <a
href="https://redirect.github.com/docker/setup-buildx-action/pull/139">docker/setup-buildx-action#139</a></li>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.56.0 to 0.62.1 in
<a
href="https://redirect.github.com/docker/setup-buildx-action/pull/422">docker/setup-buildx-action#422</a>
<a
href="https://redirect.github.com/docker/setup-buildx-action/pull/425">docker/setup-buildx-action#425</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/setup-buildx-action/compare/v3.10.0...v3.11.0">https://github.com/docker/setup-buildx-action/compare/v3.10.0...v3.11.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="18ce135bb5"><code>18ce135</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/setup-buildx-action/issues/425">#425</a>
from docker/dependabot/npm_and_yarn/docker/actions-to...</li>
<li><a
href="0e198e93af"><code>0e198e9</code></a>
chore: update generated content</li>
<li><a
href="05f3f3ac10"><code>05f3f3a</code></a>
build(deps): bump <code>@​docker/actions-toolkit</code> from 0.61.0 to
0.62.1</li>
<li><a
href="622913496d"><code>6229134</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/setup-buildx-action/issues/427">#427</a>
from crazy-max/keep-state</li>
<li><a
href="c6f6a07025"><code>c6f6a07</code></a>
chore: update generated content</li>
<li><a
href="6c5e29d848"><code>6c5e29d</code></a>
skip builder creation if one already exists with the same name</li>
<li><a
href="548b297749"><code>548b297</code></a>
ci: keep-state check</li>
<li><a
href="36590ad0c1"><code>36590ad</code></a>
check if driver compatible with keep-state</li>
<li><a
href="4143b5899b"><code>4143b58</code></a>
Support to retain cache</li>
<li><a
href="3f1544eb9e"><code>3f1544e</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/setup-buildx-action/issues/139">#139</a>
from hashhar/hashhar/cleanup-aliases</li>
<li>Additional commits viewable in <a
href="b5ca514318...18ce135bb5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/setup-buildx-action&package-manager=github_actions&previous-version=3.10.0&new-version=3.11.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-17 21:30:16 +01:00
Ayaz Salikhov
f20efae75a fix: Use new CI image with global.conf for sanitizers to affect packa… (#2234) 2025-06-17 19:26:25 +01:00
Ayaz Salikhov
67b27ee344 fix: Update CI image to provide global.conf for sanitizers to affect … (#2233)
…package_id
2025-06-17 18:45:41 +01:00
Ayaz Salikhov
082f2fe21e style: Put static before type (#2231) 2025-06-17 16:07:19 +01:00
Ayaz Salikhov
7584a683dd fix: Add domain to book_changes (#2229)
Fix: https://github.com/XRPLF/clio/issues/2221
2025-06-17 14:22:06 +01:00
Ayaz Salikhov
f58c85d203 fix: Return domainMalformed when domain is malformed (#2228)
Fix: https://github.com/XRPLF/clio/issues/2222

Code in rippled to handle errors:
https://github.com/XRPLF/rippled/blob/2.5.0-rc1/src/xrpld/rpc/handlers/BookOffers.cpp#L183
2025-06-16 15:42:19 +01:00
Ayaz Salikhov
95698ee2de fix: Run upload_conan_deps.yml on conan.lock changes (#2227) 2025-06-13 17:40:55 +01:00
Alex Kremer
3d3db68508 feat: Support start and finish sequence in ETLng (#2226)
This PR adds support for start and finish sequence specified through the
config (for parity).
2025-06-13 17:39:21 +01:00
Ayaz Salikhov
7fcabd1ce7 feat: Build all possible conan configurations in CI (#2225) 2025-06-13 16:53:04 +01:00
Ayaz Salikhov
59bb9a11ab ci: Upload conan deps for all profiles (#2217) 2025-06-13 13:55:35 +01:00
Ayaz Salikhov
ac5fcc7f4b feat: Add conan lockfile (#2220) 2025-06-13 13:51:59 +01:00
Ayaz Salikhov
3d0e722176 fix: Use conan v2 dirs and commands in docs (#2219) 2025-06-12 21:50:14 +01:00
Ayaz Salikhov
93add775b2 fix: Make GHCR lowercase (#2218) 2025-06-12 20:42:36 +01:00
Alex Kremer
0273ba0da3 chore: Unreachable code is error (#2216) 2025-06-12 16:16:11 +01:00
Ayaz Salikhov
276477c494 feat: Build GCC natively and then merge the image (#2212) 2025-06-12 15:48:10 +01:00
github-actions[bot]
d0b2a24a30 style: clang-tidy auto fixes (#2215) 2025-06-12 10:47:34 +01:00
Ayaz Salikhov
e44a058b13 chore: Don't flex and don't install bison in CI image (#2210)
Test in: https://github.com/XRPLF/clio/pull/2211
2025-06-11 17:57:00 +01:00
Alex Kremer
743c9b92de feat: Read-write switching in ETLng (#2199)
Fixes #1597
2025-06-11 17:53:14 +01:00
Alex Kremer
35c90e64ec feat: Add flags to deps for sanitizer builds (#2205)
Fix: https://github.com/XRPLF/clio/issues/2198
Tested in #2208
2025-06-11 16:26:09 +01:00
Ayaz Salikhov
6e0d7a0fac feat: Pass sanitizer as part of conan_profile (#2189)
I noticed we don't need `sanitizer` value anymore, so removed it.
2025-06-10 16:04:00 +01:00
Ayaz Salikhov
d3c98ab2a8 fix: Only set compile flag for grpc (#2204)
I built all conan packages locally and this flag is only required for
grpc, so let's only set it for grpc.
This is better - it's explicit, and we'll know that if we update grpc
recipe, we can remove this.

I also uploaded all rebuilt packages to the artifactory.
2025-06-10 15:57:23 +01:00
Ayaz Salikhov
2d172f470d feat: Always build with native arch in Conan 2 (#2201)
Will test it works in https://github.com/XRPLF/clio/pull/2202

Work on: https://github.com/XRPLF/clio/issues/1692
2025-06-09 15:47:43 +01:00
Ayaz Salikhov
a68229e9d7 feat: Use Conan 2 (#2179)
Merge right after: https://github.com/XRPLF/clio/pull/2178
Waits for: https://github.com/XRPLF/rippled/pull/5462
2025-06-06 19:55:46 +01:00
Ayaz Salikhov
cec8b29998 ci: Update CI image to use Conan 2 (#2178)
I pushed this image to my fork, and will use it to test everything works
2025-06-06 19:37:43 +01:00
Ayaz Salikhov
13524be6cc feat: Support Permissioned DEX (#2152)
Fix: https://github.com/XRPLF/clio/issues/2143

Will add tests
2025-06-06 17:12:18 +01:00
Ayaz Salikhov
2bf582839e feat: Add ubsan build to nightly release (#2190) 2025-06-06 17:11:48 +01:00
Peter Chen
ed47db7d39 chore: update libxrpl (#2186) 2025-06-06 15:25:21 +01:00
Ayaz Salikhov
4994f9db92 fix: Analyze build time on clang as well (#2195) 2025-06-06 14:01:37 +01:00
Ayaz Salikhov
50851aed16 chore: Use gcc from Docker Hub for now (#2194) 2025-06-06 13:02:37 +01:00
github-actions[bot]
4118fb2584 style: clang-tidy auto fixes (#2193) 2025-06-06 10:40:42 +01:00
Sergey Kuznetsov
837a547849 chore: Revert "feat: Use new web server by default (#2182)" (#2187)
There is an issue found in the new web server, so we couldn't use it by
default for now.
This reverts commit b3f3259b14.
2025-06-05 17:35:21 +01:00
Ayaz Salikhov
b57618a211 fix: Add README to docker/compilers (#2188) 2025-06-05 15:48:45 +01:00
Ayaz Salikhov
588ed91d1b feat: New docker images structure, tools image (#2185) 2025-06-05 15:11:10 +01:00
Sergey Kuznetsov
4904c4b4d4 chore: Cancellable coroutines (#2180)
Add a wrap for `boost::asio::yield_context` to make async operations
cancellable by default. The API could be a bit adjusted when we start
switching our code to use it.
2025-06-05 12:17:58 +01:00
Ayaz Salikhov
03070d7582 feat: Create releases in CI (#2168)
Fix: https://github.com/XRPLF/clio/issues/1779
2025-06-04 16:25:03 +01:00
Sergey Kuznetsov
b3f3259b14 feat: Use new web server by default (#2182)
Fixes #1781.
2025-06-04 15:01:30 +01:00
github-actions[bot]
357b96ab0d style: clang-tidy auto fixes (#2184)
Fixes #2183. Please review and commit clang-tidy fixes.

Co-authored-by: mathbunnyru <12270691+mathbunnyru@users.noreply.github.com>
2025-06-03 18:15:08 +01:00
Ayaz Salikhov
550f0fae85 refactor: Use std::expected instead of std::variant for errors (#2160) 2025-06-03 13:34:25 +01:00
Ayaz Salikhov
19257f8aa9 style: Beautify installation lists in Dockerfile (#2172)
Needed for: https://github.com/XRPLF/clio/pull/2168
2025-06-02 11:48:37 +01:00
Ayaz Salikhov
49b4af1a56 fix: Add style to the name of pre-commit autoupdate PR title (#2177) 2025-06-02 11:43:44 +01:00
Ayaz Salikhov
c7600057bc ci: Install zip in Dockerfile (#2176) 2025-06-02 11:42:25 +01:00
dependabot[bot]
0b7fd64a4c ci: [DEPENDABOT] bump docker/build-push-action from 6.17.0 to 6.18.0 in /.github/actions/build_docker_image (#2175)
Bumps
[docker/build-push-action](https://github.com/docker/build-push-action)
from 6.17.0 to 6.18.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/build-push-action/releases">docker/build-push-action's
releases</a>.</em></p>
<blockquote>
<h2>v6.18.0</h2>
<ul>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.61.0 to 0.62.1 in
<a
href="https://redirect.github.com/docker/build-push-action/pull/1381">docker/build-push-action#1381</a></li>
</ul>
<blockquote>
<p>[!NOTE]
<a
href="https://docs.docker.com/build/ci/github-actions/build-summary/">Build
summary</a> is now supported with <a
href="https://docs.docker.com/build-cloud/">Docker Build Cloud</a>.</p>
</blockquote>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/build-push-action/compare/v6.17.0...v6.18.0">https://github.com/docker/build-push-action/compare/v6.17.0...v6.18.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="263435318d"><code>2634353</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1381">#1381</a>
from docker/dependabot/npm_and_yarn/docker/actions-t...</li>
<li><a
href="c0432d2e01"><code>c0432d2</code></a>
chore: update generated content</li>
<li><a
href="0bb1f27d6b"><code>0bb1f27</code></a>
set builder driver and endpoint attributes for dbc summary support</li>
<li><a
href="5f9dbf956c"><code>5f9dbf9</code></a>
chore(deps): Bump <code>@​docker/actions-toolkit</code> from 0.61.0 to
0.62.1</li>
<li><a
href="0788c444d8"><code>0788c44</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1375">#1375</a>
from crazy-max/remove-gcr</li>
<li><a
href="aa179ca4f4"><code>aa179ca</code></a>
e2e: remove GCR</li>
<li>See full diff in <a
href="1dc7386353...263435318d">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/build-push-action&package-manager=github_actions&previous-version=6.17.0&new-version=6.18.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-02 11:08:46 +01:00
Ayaz Salikhov
ecdea015b9 style: Mark JSON literal strings with R"JSON (#2169) 2025-05-30 15:50:39 +01:00
Peter Chen
7588e9d5bf feat: Support Batch (#2162)
fixes #2161.

- Tested locally to confirm that Clio forwards Batch transactions
correctly.
2025-05-30 10:00:40 -04:00
github-actions[bot]
bfa17134d2 style: clang-tidy auto fixes (#2167)
Fixes #2166. Please review and commit clang-tidy fixes.

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-05-30 10:54:16 +01:00
Ayaz Salikhov
57b8ff1c49 fix: Use UniformRandomGenerator class to prevent threading issue (#2165) 2025-05-29 19:59:40 +01:00
Ayaz Salikhov
9b69da7f91 test: Skip slow DB sleep-based test on Mac (#2148)
Fix: https://github.com/XRPLF/clio/issues/2147
Fix: https://github.com/XRPLF/clio/issues/2132
2025-05-28 14:03:38 +01:00
Ayaz Salikhov
09409fc05d ci: Add missing workflow dependencies (#2155)
Was discovered in https://github.com/XRPLF/clio/pull/2150, better to be
fixed separately, as I'm not sure it'll be merged.
2025-05-28 12:58:37 +01:00
github-actions[bot]
561eae1b7f style: clang-tidy auto fixes (#2164) 2025-05-28 11:13:01 +01:00
Alex Kremer
28062496eb feat: ETLng MPT support (#2154) 2025-05-27 13:05:03 +01:00
github-actions[bot]
3e83b54332 style: clang-tidy auto fixes (#2159)
Fixes #2158. Please review and commit clang-tidy fixes.

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
2025-05-26 16:56:39 +01:00
Ayaz Salikhov
3e520c8742 chore: Fix: nagetive -> negative (#2156) 2025-05-26 15:48:17 +01:00
Alex Kremer
2a147b9487 feat: ETLng publisher and service refactoring (#2138) 2025-05-23 15:01:50 +01:00
Sergey Kuznetsov
8aab33c18c fix: Add Delegate to Ledger types (#2151)
Fix discrepancy with rippled for `account_objects` API.
2025-05-22 13:43:52 +01:00
Ayaz Salikhov
aef3119efb fix: Fix some doxygen docs errors (#2130) 2025-05-21 15:06:31 +01:00
Peter Chen
28bd58f1d1 feat: add get range feat to export tool (#2131) 2025-05-20 10:08:17 -04:00
Sergey Kuznetsov
b3da9adb03 feat: Account permission support (#2145)
Fixes: #1975.
Also switch to libxrpl 2.5.0-b1. Fixes: #2139, #2140.
2025-05-20 13:40:38 +01:00
dependabot[bot]
670eaaa51d ci: [DEPENDABOT] bump codecov/codecov-action from 5.4.2 to 5.4.3 (#2141) 2025-05-19 18:13:49 +01:00
Ayaz Salikhov
7dee6413ae feat: Add hadolint docker pre-commit hook (#2135) 2025-05-19 12:50:06 +01:00
dependabot[bot]
27b37ade7b ci: [DEPENDABOT] bump docker/build-push-action from 6.16.0 to 6.17.0 in /.github/actions/build_docker_image (#2142)
Bumps
[docker/build-push-action](https://github.com/docker/build-push-action)
from 6.16.0 to 6.17.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/build-push-action/releases">docker/build-push-action's
releases</a>.</em></p>
<blockquote>
<h2>v6.17.0</h2>
<ul>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.59.0 to 0.61.0 by
<a href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in
<a
href="https://redirect.github.com/docker/build-push-action/pull/1364">docker/build-push-action#1364</a></li>
</ul>
<blockquote>
<p>[!NOTE]
Build record is now exported using the <a
href="https://docs.docker.com/reference/cli/docker/buildx/history/export/"><code>buildx
history export</code></a> command instead of the legacy export-build
tool.</p>
</blockquote>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/build-push-action/compare/v6.16.0...v6.17.0">https://github.com/docker/build-push-action/compare/v6.16.0...v6.17.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1dc7386353"><code>1dc7386</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1364">#1364</a>
from crazy-max/history-export-cmd</li>
<li><a
href="9c9803f364"><code>9c9803f</code></a>
chore: update generated content</li>
<li><a
href="db1f6c46e8"><code>db1f6c4</code></a>
DOCKER_BUILD_EXPORT_LEGACY env var to opt-in for legacy export</li>
<li><a
href="721e8c79de"><code>721e8c7</code></a>
Bump <code>@​docker/actions-toolkit</code> from 0.59.0 to 0.61.0</li>
<li>See full diff in <a
href="14487ce63c...1dc7386353">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/build-push-action&package-manager=github_actions&previous-version=6.16.0&new-version=6.17.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-19 12:14:49 +01:00
Ayaz Salikhov
76ec9ccb0b ci: Install git-cliff to generate changelog (#2136) 2025-05-19 09:08:58 +01:00
Ayaz Salikhov
5cb3908e4f test: Run undefined sanitizer without ignoring errors (#2134) 2025-05-19 09:07:14 +01:00
Peter Chen
cdb5882688 refactor: remove old config (#2097)
fixes #1805

---------

Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
Co-authored-by: Maria Shodunke <maria-robobug@users.noreply.github.com>
Co-authored-by: Sergey Kuznetsov <skuznetsov@ripple.com>
2025-05-15 11:53:47 -04:00
Ayaz Salikhov
8cbbf6689d fix: Use git lfs install and fix verify-commits hook (#2129) 2025-05-15 16:46:22 +01:00
Ayaz Salikhov
34ed4a1eb0 test: Increase cassandra timeouts in tests (#2127)
Fix: https://github.com/XRPLF/clio/issues/2124
2025-05-15 14:16:57 +01:00
github-actions[bot]
683e2ba54b style: clang-tidy auto fixes (#2126) 2025-05-15 10:34:59 +01:00
Ayaz Salikhov
e2f078e0af ci: Run sanitizers on script change (#2122) 2025-05-14 16:19:59 +01:00
Ayaz Salikhov
27ff532473 ci: Explicitly specify workflow dependencies (#2110) 2025-05-14 15:21:08 +01:00
Ayaz Salikhov
d5195e3e52 feat: Implement load balancer metrics in etlng (#2119) 2025-05-14 15:19:38 +01:00
Sergey Kuznetsov
0595076c6e fix: Fix build with sanitizers (#2118) 2025-05-14 14:52:32 +01:00
Ayaz Salikhov
e835ad8b57 ci: Don't use team-reviewers because creating PAT is too difficult (#2117) 2025-05-14 14:35:32 +01:00
Ayaz Salikhov
0a7ce8c5be fix: Do not rewrite original file if it hasn't changed in fix-local-i… (#2109)
…ncludes.sh
2025-05-14 13:09:10 +01:00
Ayaz Salikhov
ca2a3ccee9 ci: Use XRPLF/clio-dev-team as team-reviewers, update assignees (#2113) 2025-05-14 13:06:01 +01:00
Ayaz Salikhov
a4f677be2c ci: Freeze pre-commit hooks (#2114) 2025-05-14 13:04:04 +01:00
Ayaz Salikhov
243e174f1e refactor: Load balancer forwarding metrics (#2103) 2025-05-14 11:43:31 +01:00
github-actions[bot]
a369381594 style: clang-tidy auto fixes (#2112)
Fixes #2111. Please review and commit clang-tidy fixes.

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-05-14 11:28:40 +01:00
Alex Kremer
2d52966806 ci: Attempt to remove whitespace to fix sanitizer build (#2105)
Let's see if this does the trick. 
Alternatives are
- more complicated cleanup using sed or similar
- don't multiline the expression (e.g. "${{ multiline expression becomes
single line }}")
- don't wrap `SANITIZER_OPTION` in double quotes (like it was before)
- something else that i did not find - let me know if you know
2025-05-13 15:50:22 +01:00
Ayaz Salikhov
02ccbf850f style: Use codespell instead of typos pre-commit hook (#2104) 2025-05-13 15:15:38 +01:00
Sergey Kuznetsov
b87b32db86 feat: Dosguard API weights (#2082)
Experimental support for Dosguard API weights.
2025-05-13 15:02:21 +01:00
Ayaz Salikhov
d02da5d28a fix: Run clang-format after tidy (#2108) 2025-05-13 13:51:08 +01:00
github-actions[bot]
00aff5cfe0 style: clang-tidy auto fixes (#2107)
Fixes #2106. 

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-05-13 12:06:39 +01:00
Alex Kremer
59282f764d fix: Guarantee async behaviour of WsBase::send (#2100) 2025-05-12 19:05:43 +01:00
Ayaz Salikhov
0cdfad3731 fix: Make fix-local-includes.sh work with multiple files (#2102) 2025-05-12 17:42:29 +01:00
Peter Chen
0b0794d9bf feat: Cache FetchLedgerBySeq (#2014)
fixes #1758
2025-05-12 11:45:54 -04:00
Sergey Kuznetsov
aa910ba889 fix: Catch exception in ClusterCommunicationService (#2093)
Fixes #2016.
2025-05-12 16:16:23 +01:00
Ayaz Salikhov
dbfabd4102 feat: Add load balancer prometheus metrics (#2096)
Fix: https://github.com/XRPLF/clio/issues/2070
2025-05-12 14:15:22 +01:00
Ayaz Salikhov
ce41f5ba07 fix: Make fix-local-includes.sh work on file-basis (#2099)
Fix: https://github.com/XRPLF/clio/issues/2098
2025-05-12 13:14:42 +01:00
Ayaz Salikhov
24c77752cb docs: Improve wording (#2095)
Co-authored-by: Maria Shodunke <maria-robobug@users.noreply.github.com>
2025-05-12 10:17:54 +01:00
Ayaz Salikhov
81f4386770 ci: Run integration tests on macOS (#2080)
Fix: https://github.com/XRPLF/clio/issues/1400
2025-05-07 18:31:54 +01:00
Alex Kremer
a60d01d272 chore: Fix double quotes for all workflows and actions (#2090)
Workaround potential vulnerabilities in workflows.
2025-05-07 15:26:51 +01:00
github-actions[bot]
59d27db5ab style: clang-tidy auto fixes (#2092)
Fixes #2091. Please review and commit clang-tidy fixes.

Co-authored-by: mathbunnyru <12270691+mathbunnyru@users.noreply.github.com>
2025-05-07 14:29:12 +01:00
Ayaz Salikhov
e75aa1add1 fix: Make ctors/dtors public in tests (#2089)
Fix: https://github.com/XRPLF/clio/issues/2087
2025-05-07 12:49:47 +01:00
Ayaz Salikhov
68f832a832 ci: Use XRPLF/clio-dev-team in dependabot (#2081) 2025-05-07 09:41:59 +01:00
Ayaz Salikhov
5e43c3b099 test: Remove SetUp and TearDown methods in tests (#2086)
Fix: https://github.com/XRPLF/clio/issues/910
2025-05-07 09:41:23 +01:00
Ayaz Salikhov
9af36e5235 ci: run pre-commit workflow on heavy runner to make doxygen work (#2085) 2025-05-06 15:51:00 +01:00
Ayaz Salikhov
90103431ea fix: Pass secrets.CODECOV_TOKEN explicitly (#2079) 2025-05-02 17:17:27 +01:00
Ayaz Salikhov
ed27c41641 ci: Fail CI if codecov upload fails (#2078) 2025-05-02 16:17:32 +01:00
Alex Kremer
3daa735b31 fix: Flaky test in ETLng (#2077)
Fixes a flaky test

Fix: https://github.com/XRPLF/clio/issues/2075

---------

Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
2025-05-02 15:55:12 +01:00
Ayaz Salikhov
5d2c2a8bfc ci: Move clang build analyzer to nightly (#2074) 2025-05-02 13:50:02 +01:00
Ayaz Salikhov
f2384a47f1 feat: Implement clang build analyzer (#2072)
Fix: https://github.com/XRPLF/clio/issues/936
2025-05-02 12:49:51 +01:00
Ayaz Salikhov
c774a40a59 ci: Install ClangBuildAnalyzer in the ci image (#2071) 2025-05-01 18:49:57 +01:00
Ayaz Salikhov
477d8e1f5f ci: Don't use concurrency with workflow_call (#2069) 2025-05-01 18:03:46 +01:00
Ayaz Salikhov
7fd51d8a60 ci: Refactor how we run code coverage (#2065)
Fix: https://github.com/XRPLF/clio/issues/2061
2025-05-01 16:44:37 +01:00
Ayaz Salikhov
b2a1b34ae6 style: Improve actions and workflows style (#2060) 2025-04-30 11:55:27 +01:00
Ayaz Salikhov
5860a90b94 fix: Quote release title (#2064)
Fix: https://github.com/XRPLF/clio/issues/2063
2025-04-30 11:46:44 +01:00
Ayaz Salikhov
f2f342f7c2 ci: Specify concurrency for github workflows (#2059) 2025-04-30 11:45:56 +01:00
Ayaz Salikhov
cc1da5afa9 test: Add build_and_test reusable workflow (#2048) 2025-04-29 20:28:51 +01:00
Ayaz Salikhov
de055934e1 chore: Use only pre-commit hooks (#2057)
Co-authored-by: Maria Shodunke <maria-robobug@users.noreply.github.com>
2025-04-29 18:18:42 +01:00
Ayaz Salikhov
0c201ed952 feat: Introduce release_impl.yml workflow to automatically create rel… (#2043)
…eases

Work on: https://github.com/XRPLF/clio/issues/1779

Features:
- works in PRs (everything but actually pushing a release)
- supports custom release notes header
- removes previous release for nightly releases

The idea is that creating releases should be automatic or almost
automatic and should work more or less the same for nightly and actual
releases.

I haven't yet implemented automatic release process for the actual
release (and don't plan to do it here), but this PR will make it much
easier to implement it in the future.
I suggest deferring discussion of how actual releases should work till
the next PR.
2025-04-29 16:58:25 +01:00
Ayaz Salikhov
9b83eb4033 style: Add C++ pre-commit hooks (#2039) 2025-04-29 15:12:38 +01:00
Ayaz Salikhov
fadd60e68a fix: Don't use steps.conan.outputs.conan_profile as it doesn't exist … (#2056) 2025-04-29 13:32:47 +01:00
Ayaz Salikhov
eef85b520a ci: Use ghcr.io/xrplf/clio-ci docker image (#2055) 2025-04-29 11:35:26 +01:00
github-actions[bot]
8b99013ff8 style: clang-tidy auto fixes (#2053)
Fixes #2052. Please review and commit clang-tidy fixes.

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
Co-authored-by: Alex Kremer <akremer@ripple.com>
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
2025-04-29 10:52:35 +01:00
Ayaz Salikhov
af0a8af287 style: Add typos pre-commit hook (#2041) 2025-04-29 09:59:11 +01:00
Ayaz Salikhov
de43be887e ci: Try to push to ghcr.io (#2051)
I don't think I can change where it's pushed and start using it in the
same PR, so will try to first update the push part, and then change
where the image is used. Only doing it for CI image to not break
anything.
2025-04-28 19:04:22 +01:00
Ayaz Salikhov
b03cd63efd fix: Remove Mac CMake installation error (#2040)
Even on a successful build I see an error from `brew install`
https://github.com/XRPLF/clio/actions/runs/14668965915?pr=2039
2025-04-28 19:00:15 +01:00
Ayaz Salikhov
76cf2fc57e chore: Disable add_label for conventional commits (#2054) 2025-04-28 18:55:26 +01:00
Ayaz Salikhov
f7f619fd1b chore: Don't use wandalen/wretry.action and update codecov/codecov-ac… (#2050)
…tion
2025-04-28 18:00:02 +01:00
Ayaz Salikhov
4a0267fbac style: Add markdownlint pre-commit hook (#2038)
Co-authored-by: Maria Shodunke <maria-robobug@users.noreply.github.com>
2025-04-28 16:31:07 +01:00
Ayaz Salikhov
b51ed8dd98 fix: Use ytanikin/pr-conventional-commits action for conventional com… (#2049)
…mits check

There are 2 actions with almost the same name from the same author:
- https://github.com/ytanikin/PRConventionalCommits: the one we use, not
updated for 7 months
- https://github.com/ytanikin/pr-conventional-commits: seems to be more
recent, has more stars and releases

I've merged this change to my develop branch in my fork and created a PR
on to test it works: https://github.com/mathbunnyru/clio/pull/3

I will update the upstream issue and suggest author to archive the old
action: https://github.com/ytanikin/pr-conventional-commits/issues/19
2025-04-28 16:17:23 +01:00
Ayaz Salikhov
cb01c9f596 fix: Add missing paths to update_docker_ci.yml (#2044) 2025-04-28 16:06:09 +01:00
Ayaz Salikhov
7c55529c90 chore: Capitalize Dockerfile to add support of tools (#2045)
For example, there is not syntax highlighting in GitHub, because file is
named `dockerfile` (and not Dockerfile), for example:
https://github.com/XRPLF/clio/blob/release/2.4.0/docker/ci/dockerfile

I also grep'ed dockerfile in repo and fixed some other places
2025-04-28 16:05:37 +01:00
Ayaz Salikhov
424af5dfe0 style: Apply go fmt to go code (#2046)
~I will add pre-commit hook later if I find a good one~

Found a nice repo, but it is no longer maintained:
https://github.com/dnephin/pre-commit-golang
So, I implemented the check as a local hook.
2025-04-28 16:04:50 +01:00
Ayaz Salikhov
bebc683ba2 chore: Specify conan profile explicitly and don't override it (#2042) 2025-04-28 15:00:44 +01:00
Ayaz Salikhov
1e0a2f5162 style: Add prettier pre-commit hook (#2031)
There are 2 things to know about prettier:
- it's quite pretty most of the time
- it's not configurable
2025-04-25 16:24:45 +01:00
Peter Chen
593d7298b1 fix: Add CTID to all RPC's that includes transactions (#2011)
fixes #1998
2025-04-25 09:55:39 -04:00
Ayaz Salikhov
79e6f07863 fix: Pin cmake version in ci Dockerfile (#2036)
Fix: https://github.com/XRPLF/clio/issues/2032
2025-04-25 12:23:44 +01:00
github-actions[bot]
1cb09a01f6 style: clang-tidy auto fixes (#2034)
Fixes #2033.
Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-04-25 11:10:05 +01:00
Ayaz Salikhov
9c92a2b51b style: Use pre-commit tool and add simple config (#2029)
I started with really simple pre-commit hooks and will add more on top.

Important files:
- `.pre-commit-config.yaml` - the config for pre-commit
- `.github/workflows/pre-commit.yml` - runs pre-commit hooks in branches
and `develop`
- `.github/workflows/pre-commit-autoupdate.yml` - autoupdates pre-commit
hooks once in a month
2025-04-24 17:59:43 +01:00
dependabot[bot]
99580a2602 ci: [DEPENDABOT] bump docker/build-push-action from 6.15.0 to 6.16.0 in /.github/actions/build_docker_image (#2030)
Bumps
[docker/build-push-action](https://github.com/docker/build-push-action)
from 6.15.0 to 6.16.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/build-push-action/releases">docker/build-push-action's
releases</a>.</em></p>
<blockquote>
<h2>v6.16.0</h2>
<ul>
<li>Handle no default attestations env var by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/build-push-action/pull/1343">docker/build-push-action#1343</a></li>
<li>Only print secret keys in build summary output by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/build-push-action/pull/1353">docker/build-push-action#1353</a></li>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.56.0 to 0.59.0 in
<a
href="https://redirect.github.com/docker/build-push-action/pull/1352">docker/build-push-action#1352</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/build-push-action/compare/v6.15.0...v6.16.0">https://github.com/docker/build-push-action/compare/v6.15.0...v6.16.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="14487ce63c"><code>14487ce</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1343">#1343</a>
from crazy-max/fix-no-default-attest</li>
<li><a
href="0ec91264d8"><code>0ec9126</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1366">#1366</a>
from crazy-max/pr-assign-author</li>
<li><a
href="b749522b90"><code>b749522</code></a>
pr-assign-author workflow</li>
<li><a
href="c566248492"><code>c566248</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1363">#1363</a>
from crazy-max/fix-codecov</li>
<li><a
href="13275dd76e"><code>13275dd</code></a>
ci: fix missing source for codecov</li>
<li><a
href="67dc78bbaf"><code>67dc78b</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1361">#1361</a>
from mschoettle/patch-1</li>
<li><a
href="0760504437"><code>0760504</code></a>
docs: add validating build configuration example</li>
<li><a
href="1c198f4467"><code>1c198f4</code></a>
chore: update generated content</li>
<li><a
href="288d9e2e4a"><code>288d9e2</code></a>
handle no default attestations env var</li>
<li><a
href="88844b95d8"><code>88844b9</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1353">#1353</a>
from crazy-max/summary-secret-keys</li>
<li>Additional commits viewable in <a
href="471d1dc4e0...14487ce63c">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/build-push-action&package-manager=github_actions&previous-version=6.15.0&new-version=6.16.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-24 17:21:43 +01:00
Ayaz Salikhov
ade6289de2 refactor: Add str() method to BaseTagDecorator (#2020)
Fix: https://github.com/XRPLF/clio/issues/2008
2025-04-24 16:48:19 +01:00
Ayaz Salikhov
3916635037 chore: Remove dead code related to centos (#2028) 2025-04-24 15:26:41 +01:00
dependabot[bot]
f195a30a76 ci: [DEPENDABOT] bump docker/build-push-action from 5.4.0 to 6.15.0 in /.github/actions/build_docker_image (#2027)
Bumps
[docker/build-push-action](https://github.com/docker/build-push-action)
from 5.4.0 to 6.15.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/build-push-action/releases">docker/build-push-action's
releases</a>.</em></p>
<blockquote>
<h2>v6.15.0</h2>
<ul>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.55.0 to 0.56.0 in
<a
href="https://redirect.github.com/docker/build-push-action/pull/1330">docker/build-push-action#1330</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/build-push-action/compare/v6.14.0...v6.15.0">https://github.com/docker/build-push-action/compare/v6.14.0...v6.15.0</a></p>
<h2>v6.14.0</h2>
<ul>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.53.0 to 0.55.0 in
<a
href="https://redirect.github.com/docker/build-push-action/pull/1324">docker/build-push-action#1324</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/build-push-action/compare/v6.13.0...v6.14.0">https://github.com/docker/build-push-action/compare/v6.13.0...v6.14.0</a></p>
<h2>v6.13.0</h2>
<ul>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.51.0 to 0.53.0 in
<a
href="https://redirect.github.com/docker/build-push-action/pull/1308">docker/build-push-action#1308</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/build-push-action/compare/v6.12.0...v6.13.0">https://github.com/docker/build-push-action/compare/v6.12.0...v6.13.0</a></p>
<h2>v6.12.0</h2>
<ul>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.49.0 to 0.51.0 in
<a
href="https://redirect.github.com/docker/build-push-action/pull/1300">docker/build-push-action#1300</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/build-push-action/compare/v6.11.0...v6.12.0">https://github.com/docker/build-push-action/compare/v6.11.0...v6.12.0</a></p>
<h2>v6.11.0</h2>
<ul>
<li>Handlebar <code>defaultContext</code> support for
<code>build-contexts</code> input by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/build-push-action/pull/1283">docker/build-push-action#1283</a></li>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.46.0 to 0.49.0 in
<a
href="https://redirect.github.com/docker/build-push-action/pull/1281">docker/build-push-action#1281</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/build-push-action/compare/v6.10.0...v6.11.0">https://github.com/docker/build-push-action/compare/v6.10.0...v6.11.0</a></p>
<h2>v6.10.0</h2>
<ul>
<li>Add <code>call</code> input to set method for evaluating build by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/build-push-action/pull/1265">docker/build-push-action#1265</a></li>
<li>Bump <code>@​actions/core</code> from 1.10.1 to 1.11.1 in <a
href="https://redirect.github.com/docker/build-push-action/pull/1238">docker/build-push-action#1238</a></li>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.39.0 to 0.46.0 in
<a
href="https://redirect.github.com/docker/build-push-action/pull/1268">docker/build-push-action#1268</a></li>
<li>Bump cross-spawn from 7.0.3 to 7.0.6 in <a
href="https://redirect.github.com/docker/build-push-action/pull/1261">docker/build-push-action#1261</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/build-push-action/compare/v6.9.0...v6.10.0">https://github.com/docker/build-push-action/compare/v6.9.0...v6.10.0</a></p>
<h2>v6.9.0</h2>
<ul>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.38.0 to 0.39.0 in
<a
href="https://redirect.github.com/docker/build-push-action/pull/1234">docker/build-push-action#1234</a></li>
<li>Bump path-to-regexp from 6.2.2 to 6.3.0 in <a
href="https://redirect.github.com/docker/build-push-action/pull/1232">docker/build-push-action#1232</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/build-push-action/compare/v6.8.0...v6.9.0">https://github.com/docker/build-push-action/compare/v6.8.0...v6.9.0</a></p>
<h2>v6.8.0</h2>
<ul>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.37.1 to 0.38.0 in
<a
href="https://redirect.github.com/docker/build-push-action/pull/1230">docker/build-push-action#1230</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/build-push-action/compare/v6.7.0...v6.8.0">https://github.com/docker/build-push-action/compare/v6.7.0...v6.8.0</a></p>
<h2>v6.7.0</h2>
<ul>
<li>Print info message for build summary support checks by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/build-push-action/pull/1211">docker/build-push-action#1211</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/build-push-action/compare/v6.6.1...v6.7.0">https://github.com/docker/build-push-action/compare/v6.6.1...v6.7.0</a></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="471d1dc4e0"><code>471d1dc</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1330">#1330</a>
from docker/dependabot/npm_and_yarn/docker/actions-t...</li>
<li><a
href="b89ff0a6f2"><code>b89ff0a</code></a>
chore: update generated content</li>
<li><a
href="1e3ae3a4d3"><code>1e3ae3a</code></a>
chore(deps): Bump <code>@​docker/actions-toolkit</code> from 0.55.0 to
0.56.0</li>
<li><a
href="b16f42f92a"><code>b16f42f</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1325">#1325</a>
from crazy-max/buildx-edge</li>
<li><a
href="dc0fea5e62"><code>dc0fea5</code></a>
ci: update buildx to edge and buildkit to latest</li>
<li><a
href="0adf995921"><code>0adf995</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1324">#1324</a>
from docker/dependabot/npm_and_yarn/docker/actions-t...</li>
<li><a
href="d88cd289df"><code>d88cd28</code></a>
chore: update generated content</li>
<li><a
href="3d09a6bd70"><code>3d09a6b</code></a>
chore(deps): Bump <code>@​docker/actions-toolkit</code> from 0.53.0 to
0.55.0</li>
<li><a
href="ca877d9245"><code>ca877d9</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1308">#1308</a>
from docker/dependabot/npm_and_yarn/docker/actions-t...</li>
<li><a
href="d2fe919bb5"><code>d2fe919</code></a>
chore: update generated content</li>
<li>Additional commits viewable in <a
href="ca052bb54a...471d1dc4e0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/build-push-action&package-manager=github_actions&previous-version=5.4.0&new-version=6.15.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-24 12:51:08 +01:00
Ayaz Salikhov
cc610a0964 ci: Fix time field to be string in dependabot config (#2024)
Sorry, it seems to have been the wrong change.
I pushed this to `develop` in my fork, enabled Dependabot there and PRs
were created in my fork.

Close: https://github.com/XRPLF/clio/issues/2022
2025-04-24 12:19:44 +01:00
github-actions[bot]
c5012eb854 style: clang-tidy auto fixes (#2026)
Fixes #2025. 
Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-04-24 11:19:28 +01:00
Ayaz Salikhov
01ae4c4312 refactor: Compare error_code with enum values, not hardcoded ints (#2023)
Fix: https://github.com/XRPLF/clio/issues/2002
2025-04-23 18:39:53 +01:00
Ayaz Salikhov
88d27a7265 chore: Pin external actions using hashes (#2019)
Note: I used exactly the version which are already being used (didn't
update anything).
Updates will come when we merge https://github.com/XRPLF/clio/pull/2018
2025-04-23 17:35:40 +01:00
Ayaz Salikhov
e01d7d12cf chore: Run dependabot for all local actions (#2018) 2025-04-23 16:54:32 +01:00
github-actions[bot]
1e38ad5ec0 style: clang-tidy auto fixes (#2013)
Fixes #2012. Please review and commit clang-tidy fixes.

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-04-21 10:26:46 -04:00
Sergey Kuznetsov
bd9e39ee85 fix: Fix incorrect requests logging (#2005)
Fixes #2004.
2025-04-17 17:49:44 +01:00
Sergey Kuznetsov
46514c8fe9 feat: More efficient cache (#1997)
Fixes #1473.
2025-04-17 16:44:53 +01:00
github-actions[bot]
39d1ceace4 style: clang-tidy auto fixes (#2007)
Fixes #2006. 
Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-04-17 11:05:27 +01:00
Peter Chen
89eb962d85 fix: CTID issue (#2001)
fixes #1998
2025-04-16 19:55:12 +01:00
Maria Shodunke
4a5fee7548 docs: Verify/review config descriptions (#1960)
- Reviewed and modified descriptions.
- Added some minor formatting.
- Removed the "Key:" before every key name, seems redundant.
2025-04-09 09:49:11 -07:00
Alex Kremer
fcd891148b chore: Fix clang-tidy 'fixes' (#1996)
Undo some of #1994
2025-04-08 17:18:33 +01:00
github-actions[bot]
99adb31184 style: clang-tidy auto fixes (#1994)
Fixes #1993. 

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-04-08 11:18:52 +01:00
Sergey Kuznetsov
2c1a90a20d feat: Nodes communication via DB (#1976)
Fixes #1966.
2025-04-07 14:18:49 +01:00
github-actions[bot]
2385bf547b style: clang-tidy auto fixes (#1992)
Fixes #1991. 

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-04-07 11:13:22 +01:00
Alex Kremer
1d011cf8d9 feat: ETLng integration (#1986)
For #1594
2025-04-04 15:52:22 +01:00
Alex Kremer
6896a2545a chore: Update workflow notification settings (#1990) 2025-04-04 15:51:13 +01:00
github-actions[bot]
91484c64e4 style: clang-tidy auto fixes (#1989)
Fixes #1988. Please review and commit clang-tidy fixes.

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-04-03 11:08:47 +01:00
Alex Kremer
bdf7382d44 chore: Update maintainers (#1987) 2025-04-02 16:50:45 +01:00
Peter Chen
8a3e71e91f fix: incorrect set HighDeepFreeze flag (#1978)
fixes #1977
2025-04-02 09:53:35 -04:00
github-actions[bot]
e61ee30180 style: clang-tidy auto fixes (#1985)
Fixes #1984.

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-04-02 12:40:38 +01:00
Sergey Kuznetsov
d3df6d10e4 fix: Fix ssl in new webserver (#1981)
Fixes #1980.

An SSL handshake was missing and WsConnection should be build from
stream not socket because in case SSL connection stream already
completed SSL handshake.
2025-04-01 16:12:16 +01:00
Sergey Kuznetsov
60df3a1914 ci: Pin cmake 3.31.6 for macos runners (#1983)
Fixes #1982.
2025-04-01 14:49:17 +01:00
cyan317
f454076fb6 feat: Snapshot import feature (#1970)
Implement snapshot import cmd
`clio_snapshot --server --grpc_server 0.0.0.0:12345 --path
<snapshot_path>`

Implement snapshot range cmd
`./clio_snapshot --range --path <snapshot_path>`

Add
LedgerHouses: It is responsible for reading/writing snapshot data
Server: Start grpc server and ws server
2025-03-26 09:11:15 +00:00
github-actions[bot]
66b3f40268 style: clang-tidy auto fixes (#1972)
Fixes #1971. 
Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-03-24 12:14:38 +00:00
Alex Kremer
b31b7633c9 feat: ETLng extensions (#1967)
For #1599 #1597
2025-03-21 16:41:29 +00:00
Peter Chen
a36aa3618f fix: ripple_flag logic in account lines (#1969)
fixes #1968
2025-03-19 10:26:04 -04:00
Sergey Kuznetsov
7943f47939 chore: Add git-cliff config (#1965)
First step for #1779.
2025-03-18 15:12:49 +00:00
Sergey Kuznetsov
67e451ec23 chore: Upgrade libxrpl to 2.4.0 (#1961) 2025-03-13 15:42:20 +00:00
github-actions[bot]
92789d5a91 style: clang-tidy auto fixes (#1963)
Fixes #1962.

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-03-13 11:24:12 +00:00
Sergey Kuznetsov
73477fb9d4 feat: Expose ledger cache full and disabled to prometheus (#1957)
Fixes #1771
2025-03-12 14:54:21 +00:00
Alex Kremer
8ac1ff7699 feat: Implement and use LedgerCacheInterface (#1955)
For #1200
2025-03-12 13:48:33 +00:00
Sergey Kuznetsov
26842374de fix: Fix url check in config (#1953)
Fixes #1850
2025-03-11 12:54:22 +00:00
Sergey Kuznetsov
a46d700390 fix: Improve error message when starting read only mode with empty DB (#1946)
Fixes #1721
2025-03-10 11:54:56 +00:00
github-actions[bot]
a34d565ea4 style: clang-tidy auto fixes (#1949)
Fixes #1948.

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-03-10 10:35:36 +00:00
Sergey Kuznetsov
c57fe1e6e4 test: Add assert mock to avoid death tests (#1947)
Fixes #1750
2025-03-07 18:11:52 +00:00
Peter Chen
8a08c5e6ce feat: Add support for deep freeze (#1875)
fixes #1826
2025-03-05 11:04:44 -05:00
Peter Chen
5d2694d36c chore: update libxrpl (#1943) 2025-03-05 10:14:39 -05:00
Peter Chen
98ff72be66 fix: change math/rand to crypto/rand (#1941) 2025-03-05 10:12:50 -05:00
Sergey Kuznetsov
915a8beb40 style: Use error code instead of exception when parsing json (#1942) 2025-03-04 18:34:45 +00:00
Sergey Kuznetsov
f7db030ad7 fix: Fix dangling reference in new web server (#1938)
Also delete move constructors where moving may be dangerous.
2025-03-04 16:45:47 +00:00
Peter Chen
86e2cd1cc4 feat: Add workflow to check config description (#1894)
fixes #1880

---------

Co-authored-by: Sergey Kuznetsov <skuznetsov@ripple.com>
Co-authored-by: Alex Kremer <akremer@ripple.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
Co-authored-by: Shawn Xie <35279399+shawnxie999@users.noreply.github.com>
2025-03-04 10:47:36 -05:00
Sergey Kuznetsov
f0613c945f ci: Use ubuntu latest for some ci jobs (#1939)
Ubuntu 20.04 images will be deprecated soon:
https://github.com/actions/runner-images/issues/11101
Switch to the latest Ubuntu everywhere we use Github's image.
2025-03-04 14:52:37 +00:00
Sergey Kuznetsov
d11e7bc60e fix: Data race in new webserver (#1926)
There was a data race inside `CoroutineGroup` because internal timer was
used from multiple threads in the methods `asyncWait()` and
`onCoroutineComplete()`. Changing `registerForeign()` to spawn to the
same `yield_context` fixes the problem because now the timer is accessed
only from the same coroutine which has an internal strand.

During debugging I also added websocket support for `request_gun` tool.
2025-02-27 15:08:46 +00:00
Sergey Kuznetsov
b909b8879d fix: Fix backtrace usage (#1932) 2025-02-27 14:26:51 +00:00
github-actions[bot]
918a92eeee style: clang-tidy auto fixes (#1925)
Fixes #1924. Please review and commit clang-tidy fixes.

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-02-25 09:29:24 +00:00
Shawn Xie
c9e8330e0a feat: LPT freeze (#1840)
Fixes #1827
2025-02-24 15:39:11 +00:00
github-actions[bot]
f577139f70 style: clang-tidy auto fixes (#1920)
Fixes #1919. Please review and commit clang-tidy fixes.

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-02-24 09:35:25 +00:00
Alex Kremer
491cd58f93 feat: ETLng monitor (#1898)
For #1594
2025-02-21 16:10:25 +00:00
Sergey Kuznetsov
25296f8ffa fix: Better errors on logger init failure (#1857)
Fixes #1326.
2025-02-18 15:43:13 +00:00
Sergey Kuznetsov
4b178805de fix: Array parsing in new config (#1896)
Improving array parsing in config:
- Allow null values in arrays for optional fields
- Allow empty array even for required field
- Allow to not put an empty array in config even if array contains
required fields
2025-02-18 13:29:43 +00:00
Peter Chen
fcebd715ba test: add non-admin test for simulate (#1893) 2025-02-14 13:00:40 -05:00
Sergey Kuznetsov
531e1dad6d ci: Upload cache only for develop branch (#1897) 2025-02-14 16:54:08 +00:00
cyan317
3c008b6bb4 feat: Snapshot exporting tool (#1877)
In this PR:
1 We create a golang grpc client to request data from rippled
2 We store the data into the specific place
3 Add unittests
4 Create build script, the build can be initiated by set conan option
`snapshot` being true.

Please ignore the grpc server part. It will be implemented in importing
tool.
2025-02-12 16:56:04 +00:00
Peter Chen
624f7ff6d5 feat: Support Simulate (#1891)
fixes #1887
2025-02-12 10:00:04 -05:00
Sergey Kuznetsov
e503dffc9a fix: Array parsing in new config (#1884)
Fixes #1870.
2025-02-12 13:28:06 +00:00
Alex Kremer
cd1aa8fb70 chore: Revert workflow names (#1890) 2025-02-11 18:08:47 +00:00
github-actions[bot]
b5fe22da18 style: clang-tidy auto fixes (#1889)
Fixes #1888. Please review and commit clang-tidy fixes.

Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
2025-02-11 13:01:31 +00:00
Peter Chen
cd6289b79a feat: Generate config descriptions (#1842)
Fixes #1460
2025-02-10 11:29:00 -05:00
Alex Kremer
f5e6c9576e feat: Run tests with sanitizers in CI (#1879)
Fixes #1075
Fixes #1049
2025-02-10 16:20:25 +00:00
Sergey Kuznetsov
427ba47716 chore: Fix error in grafana dashboard example (#1878) 2025-02-07 13:42:30 +00:00
cyan317
67c989081d fix clang-tidy issues (#1871) 2025-02-03 12:00:59 +00:00
github-actions[bot]
2fd16cd582 style: clang-tidy auto fixes (#1868)
Fixes #1867. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2025-02-03 08:43:26 +00:00
Sergey Kuznetsov
89af8fe500 feat: Permissioned domains (#1841)
Fixes #1833.
2025-01-31 15:30:34 +00:00
cyan317
1753c95910 feat: Support Dynamic NFT (#1525)
Fix #1471
Clio's changes for supporting DNFT
https://github.com/XRPLF/rippled/pull/5048/files
2025-01-31 13:33:20 +00:00
Maria Shodunke
e7702e9c11 docs: Move metrics and static analysis docs (#1864)
Fixes #1219.
2025-01-31 11:37:27 +00:00
github-actions[bot]
e549657766 style: clang-tidy auto fixes (#1863)
Fixes #1862. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2025-01-30 09:16:34 +00:00
Peter Chen
7c2742036b refactor: Remove boost filesystem (#1859) 2025-01-29 11:16:54 -05:00
Alex Kremer
73f375f20d feat: ETLng task manager (#1843) 2025-01-29 15:29:13 +00:00
Alex Kremer
3e200d8b9d feat: Add Conan profiles for common Sanitizers to docker ci image (#1856)
For #1049
2025-01-29 14:45:00 +00:00
Alex Kremer
81fe617816 fix: Re-add account_tx max limit (#1855) 2025-01-29 13:42:31 +00:00
Sergey Kuznetsov
75354fbecd fix: CacheLoader causes crash when no cache is used (#1853)
If cache is disabled or Clio starts with and empty DB, `loader_` inside
cache is not created. So calling `CacheLoader::stop()` or
`CacheLoader::wait()` was causing crash.
2025-01-28 18:10:19 +00:00
Sergey Kuznetsov
540e938223 refactor: Use mutex from utils (#1851)
Fixes #1359.
2025-01-27 15:28:00 +00:00
Sergey Kuznetsov
6ef6ca9e65 chore: Fix issue found by clang-tidy (#1849)
Fixes #1848
2025-01-23 12:29:43 +00:00
github-actions[bot]
35b9a066e3 style: clang-tidy auto fixes (#1847)
Fixes #1846. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2025-01-23 09:34:00 +00:00
Sergey Kuznetsov
957028699b feat: Graceful shutdown (#1801)
Fixes #442.
2025-01-22 13:09:16 +00:00
cyan317
12e6fcc97e fix: gateway_balance discrepancy (#1839)
Fix https://github.com/XRPLF/clio/issues/1832

rippled code:

https://github.com/XRPLF/rippled/blob/develop/src/xrpld/rpc/handlers/GatewayBalances.cpp#L129
2025-01-22 09:48:13 +00:00
github-actions[bot]
f9d9879513 style: clang-tidy auto fixes (#1845)
Fixes #1844. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2025-01-22 09:46:37 +00:00
cyan317
278f7b1b58 feat: Block clio if migration is blocking (#1834)
Add:
- Block server if migration is blocking
- Initialise the migration related table when server starts against
empty DB

Add MigrationInspectorInterface. server uses inspector to check the
migrators status.
2025-01-21 14:10:01 +00:00
nkramer44
fbedeff697 fix: Remove InvalidHotWallet Error from gateway_balances RPC handler (#1830)
Fixes #1825 by removing the check in the gateway_balances RPC handler
that returns the RpcInvalidHotWallet error code if one of the addresses
supplied in the request's `hotwallet` array does not have a trustline
with the `account` from the request.

As stated in the original ticket, this change fixes a discrepancy in
behavior between Clio and rippled, as rippled does not check for
trustline existence when handling gateway_balances RPCs

Co-authored-by: Sergey Kuznetsov <skuznetsov@ripple.com>
2025-01-21 12:17:54 +00:00
cyan317
f64d8ecb77 fix: Copyright format (#1835)
Aligned the copyright notice to match the format used in other files.
Updated Copyright (c) 2022-2024 to Copyright (c) 2024 to ensure
consistency.
2025-01-16 14:36:03 +00:00
Peter Chen
3e38ea9b48 fix: Add more constraints to config (#1831)
Log file size and rotation should also not allowed to be 0.
2025-01-15 10:56:50 -05:00
Sergey Kuznetsov
7834b63b55 fix: Check result of parsing config (#1829) 2025-01-14 11:55:05 -05:00
Alex Kremer
2cf849dd12 feat: ETLng scheduling (#1820)
For #1596
2025-01-14 15:50:59 +00:00
Peter Chen
c47b96bc68 fix: comment from verify config PR (#1823)
PR here: https://github.com/XRPLF/clio/pull/1814#
2025-01-13 12:58:20 -05:00
Sergey Kuznetsov
9659d98140 fix: Reading log_channels levels from config (#1821) 2025-01-13 16:29:45 +00:00
Peter Chen
f1698c55ff feat: add config verify flag (#1814)
fixes #1806
2025-01-13 09:57:11 -05:00
Alex Kremer
91c00e781a fix: Silence expected use after move warnings (#1819)
Fixes #1818
2025-01-10 15:47:48 +00:00
github-actions[bot]
c0d52723c9 style: clang-tidy auto fixes (#1817)
Fixes #1816. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2025-01-10 09:06:05 +00:00
Alex Kremer
590c07ad84 fix: AsyncFramework RAII (#1815)
Fixes #1812
2025-01-09 15:26:25 +00:00
Alex Kremer
48c8d85d0c feat: ETLng loader basics (#1808)
For #1597
2025-01-09 14:47:08 +00:00
Alex Kremer
36a9f40a60 fix: Optimize ledger_range query (#1797) 2025-01-07 14:52:56 +00:00
Peter Chen
698718a02a fix: Incorrect log values in newconfig (#1807)
Additional fixes for #1627
2025-01-06 17:37:40 +00:00
Sergey Kuznetsov
0a9dbe1cc1 ci: Switch CI to macos 15 runners (#1761) 2025-01-06 13:19:03 +00:00
Peter Chen
cce7aa2893 style: Fix formatting via clang-format (#1809)
For #1760
2025-01-04 04:00:03 +00:00
Alex Kremer
820b32c6d7 chore: No ALL_CAPS (#1760)
Fixes #1680
2025-01-02 11:39:31 +00:00
github-actions[bot]
efe5d08205 style: clang-tidy auto fixes (#1803)
Fixes #1802. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-12-23 09:02:34 +00:00
Alex Kremer
285d4e6e9b feat: Repeating operations for util::async (#1776)
Async framework needed a way to do repeating operations (think simplest
cases like AmendmentBlockHandler).
This PR implements the **absolute minimum**, barebones repeating
operations that
- Can't return any values (void)
- Do not take any arguments in the user-provided function
- Can't be scheduled (i.e. a delay before starting repeating)
- Can't be stopped from inside the user block of code (i.e. does not
have stop token or anything like that)
- Can be stopped through the RepeatedOperation's `abort()` function (but
not from the user-provided repeating function)
2024-12-20 13:24:01 +00:00
github-actions[bot]
f2a89b095d style: clang-tidy auto fixes (#1799)
Fixes #1798.
2024-12-20 10:44:36 +00:00
Sergey Kuznetsov
7d4e3619b0 fix: Fix bugs in new webserver (#1780)
Fixes #919.

Fixes bugs for new webserver:
- Unhandled exception when closing already closed websocket
- No pings for plain websocket connection
- Server drops websocket connection when client responds to pings but
doesn't send anything

Also changing API of ng connections. Now timeout is set by a separate
method instead of providing it for each call.
2024-12-19 15:14:04 +00:00
Sergey Kuznetsov
c4b87d2a0a test: Remove request timeout from integration tests (#1794)
Fixes #1791.
2024-12-18 15:19:58 +00:00
Alex Kremer
2d0253bc4a feat: Upgrade to libxrpl 2.4.0-b1 (#1789) 2024-12-18 14:35:16 +00:00
github-actions[bot]
017cf2adc9 style: clang-tidy auto fixes (#1796)
Fixes #1795. Turning off noisy clang-tidy check.
2024-12-18 13:51:39 +00:00
github-actions[bot]
64b50b419f style: clang-tidy auto fixes (#1793)
Fixes #1792.
2024-12-18 11:43:53 +00:00
Sergey Kuznetsov
fc3e60f17f test: Fix integration tests (#1788)
Fixes #1784
2024-12-17 15:35:17 +00:00
cyan317
8dc7f16ef1 feat: Migration framework (#1768)
This PR implemented the migration framework, which contains the command
line interface to execute migration and helps to migrate data easily.
Please read README.md for more information about this framework.
2024-12-17 14:50:51 +00:00
github-actions[bot]
15a441b084 style: clang-tidy auto fixes (#1786)
Fixes #1785. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-12-17 09:45:14 +00:00
Peter Chen
3c4903a339 refactor: Replace all old instances of Config with New Config (#1627)
Fixes #1184 
Previous PR's found [here](https://github.com/XRPLF/clio/pull/1593) and
[here](https://github.com/XRPLF/clio/pull/1544)
2024-12-16 15:33:32 -08:00
Sergey Kuznetsov
b53cfd0ec1 fix: Improve Repeat implementation (#1775) 2024-12-11 15:07:48 +00:00
github-actions[bot]
c41399ef8e style: clang-tidy auto fixes (#1778)
Fixes #1777.
2024-12-11 11:33:03 +00:00
Sergey Kuznetsov
7bef13f913 feat: Add dosguard to new webserver (#1772)
For #919.
2024-12-10 14:59:12 +00:00
Alex Kremer
4ff2953257 fix: Fix and re-enable flaky test (#1773)
Fixes #1752
2024-12-09 16:30:51 +00:00
Alex Kremer
475e309f25 chore: Add clang-tidy 19 checks (#1774)
Fix #1664
2024-12-09 16:27:53 +00:00
Sergey Kuznetsov
a7074dbf0f fix: Fix broken tests (#1767)
Fixes #1764
2024-12-02 14:28:57 +00:00
github-actions[bot]
66691c45a0 style: clang-tidy auto fixes (#1766)
Fixes #1765.
2024-12-02 11:06:21 +00:00
Peter Chen
fe4f95dabd fix: Check ledger range in every handler (#1755)
fixes #1565
2024-11-29 10:11:07 -05:00
Peter Chen
f62fadc9f9 refactor: setRange in tests (#1763)
There are a few files that cannot move the setRange into constructor of
the test because either the place that calls setRange matters or tests
checks range doesn't exist
2024-11-29 09:27:45 -05:00
Alex Kremer
afb0c7fee2 feat: Add v3 support (#1754) 2024-11-27 17:39:57 +00:00
Alex Kremer
fd73b90416 feat: Healthcheck endpoint (#1751)
Fixes #1759
2024-11-26 13:56:25 +00:00
dependabot[bot]
541bf4395f ci: Bump wandalen/wretry.action from 3.7.2 to 3.7.3 (#1753)
Bumps [wandalen/wretry.action](https://github.com/wandalen/wretry.action) from 3.7.2 to 3.7.3.
2024-11-26 02:14:51 +00:00
Alex Kremer
63c80f2b7d feat: Upgrade to libxrpl 2.3.0 (#1756) 2024-11-26 02:12:06 +00:00
Alex Kremer
385d99c56e chore: Disable a flaky test (#1757)
For #1752
2024-11-26 02:11:37 +00:00
github-actions[bot]
b5da61931f style: clang-tidy auto fixes (#1749)
Fixes #1748.
2024-11-22 10:28:17 +00:00
Alex Kremer
6af86367fd feat: GrpcSource for ETL ng (#1745)
For #1596 and #1597
2024-11-21 17:03:37 +00:00
Peter Chen
9dc322fc7b fix: authorized_credential elements in array not objects bug (#1744) 2024-11-21 10:28:23 -05:00
Sergey Kuznetsov
c77154a5e6 feat: Integrate new webserver (#1722)
For #919.
The new web server is not using dosguard yet. It will be fixed by a
separate PR.
2024-11-21 14:48:32 +00:00
github-actions[bot]
fc3ba07f2e style: clang-tidy auto fixes (#1742)
Fixes #1741. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-11-19 09:06:58 +00:00
Peter Chen
229ba69b5d fix: Credential error message (#1738)
fixes #1737
2024-11-18 16:08:20 +00:00
github-actions[bot]
524d096777 style: clang-tidy auto fixes (#1740)
Fixes #1739. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-11-18 09:30:34 +00:00
Alex Kremer
815dfd672e feat: Extraction basics (#1733)
For #1596
2024-11-15 19:55:13 +00:00
Alex Kremer
a4b3877cb2 feat: Upgrade to libxrpl 2.3.0-rc2 (#1736) 2024-11-15 16:18:17 +00:00
github-actions[bot]
6bb5804bb8 style: clang-tidy auto fixes (#1735)
Fixes #1734. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-11-15 11:05:38 +00:00
Peter Chen
67d99457f2 feat: Add Support Credentials for Clio (#1712)
Rippled PR: [here](https://github.com/XRPLF/rippled/pull/5103)
2024-11-14 19:52:03 +00:00
github-actions[bot]
0e25c0cabc style: clang-tidy auto fixes (#1730)
Fixes #1729. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-11-12 09:33:53 +00:00
Shawn Xie
6b61984e0e feat: Implement MPT changes (#1147)
Implements https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0033d-multi-purpose-tokens
2024-11-11 16:02:02 +00:00
dependabot[bot]
891fd1e7bf ci: Bump wandalen/wretry.action from 3.7.0 to 3.7.2 (#1723)
Bumps
[wandalen/wretry.action](https://github.com/wandalen/wretry.action) from
3.7.0 to 3.7.2.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8ceaefd717"><code>8ceaefd</code></a>
version 3.7.2</li>
<li><a
href="ce976ac9e7"><code>ce976ac</code></a>
version 3.7.1</li>
<li><a
href="7a8f8d4bf2"><code>7a8f8d4</code></a>
Merge pull request <a
href="https://redirect.github.com/wandalen/wretry.action/issues/174">#174</a>
from dmvict/master</li>
<li><a
href="2103bce855"><code>2103bce</code></a>
Fix action, add option <code>pre_retry_command</code> to call of
subaction</li>
<li>See full diff in <a
href="https://github.com/wandalen/wretry.action/compare/v3.7.0...v3.7.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=wandalen/wretry.action&package-manager=github_actions&previous-version=3.7.0&new-version=3.7.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alex Kremer <akremer@ripple.com>
2024-11-11 15:21:13 +00:00
Alex Kremer
de6c17797f chore: Upgrade conan to use new libxrpl (#1724)
Forgotten part for #1718
2024-11-11 13:37:57 +00:00
Alex Kremer
0add6c6d90 feat: Upgrade to libxrpl 2.3.0-rc1 (#1718)
Fixes #1717
2024-11-08 18:18:58 +00:00
github-actions[bot]
e6cdb141c5 style: clang-tidy auto fixes (#1720)
Fixes #1719. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-11-08 08:58:20 +00:00
Alex Kremer
c435466fb0 feat: ETLng Registry (#1713)
For #1597
2024-11-07 17:56:29 +00:00
dependabot[bot]
f8df654d8e ci: Bump wandalen/wretry.action from 3.5.0 to 3.7.0 (#1714)
Bumps
[wandalen/wretry.action](https://github.com/wandalen/wretry.action) from
3.5.0 to 3.7.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f8754f7974"><code>f8754f7</code></a>
version 3.7.0</li>
<li><a
href="03db9837ed"><code>03db983</code></a>
Merge pull request <a
href="https://redirect.github.com/wandalen/wretry.action/issues/171">#171</a>
from dmvict/docker_readme</li>
<li><a
href="d80901cd5c"><code>d80901c</code></a>
Sync readme for new feature</li>
<li><a
href="e00d406ade"><code>e00d406</code></a>
version 3.6.0</li>
<li><a
href="e00deaa9ba"><code>e00deaa</code></a>
Merge pull request <a
href="https://redirect.github.com/wandalen/wretry.action/issues/170">#170</a>
from dmvict/pre_retry_action</li>
<li><a
href="8b50f3152e"><code>8b50f31</code></a>
Update action, add option <code>pre_retry_command</code> to run command
between retries</li>
<li><a
href="990f16983d"><code>990f169</code></a>
Merge pull request <a
href="https://redirect.github.com/wandalen/wretry.action/issues/167">#167</a>
from Vampire/add-typing</li>
<li><a
href="aeb34f4d13"><code>aeb34f4</code></a>
Add action typing</li>
<li>See full diff in <a
href="https://github.com/wandalen/wretry.action/compare/v3.5.0...v3.7.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=wandalen/wretry.action&package-manager=github_actions&previous-version=3.5.0&new-version=3.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alex Kremer <akremer@ripple.com>
2024-11-07 16:04:00 +00:00
Alex Kremer
f3e754398e chore: Fix compilation for upcoming libxrpl 2.3.0-rc1 (#1716)
Fixes #1715
2024-11-07 15:39:53 +00:00
Peter Chen
d04331d244 fix: Support Delete NFT (#1695)
Fixes #1677
2024-10-25 11:27:02 -04:00
cyan317
1c82d379d9 fix: Add queue size limit for websocket (#1701)
For slow clients, we will disconnect with it if the message queue is too
long.

---------

Co-authored-by: Sergey Kuznetsov <skuznetsov@ripple.com>
2024-10-25 13:30:52 +01:00
github-actions[bot]
f083c82557 style: clang-tidy auto fixes (#1711)
Fixes #1710.

---------

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
Co-authored-by: Sergey Kuznetsov <skuznetsov@ripple.com>
2024-10-25 13:06:58 +01:00
Sergey Kuznetsov
b6d5ec5cf7 ci: Fix nightly build (#1709)
Fixes #1703.
2024-10-25 12:20:26 +01:00
Sergey Kuznetsov
c62e9d56b8 fix: Fix issues clang-tidy found (#1708)
Fixes #1706.
2024-10-25 11:48:18 +01:00
github-actions[bot]
2a5d73730f style: clang-tidy auto fixes (#1705)
Fixes #1704. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-10-25 09:05:28 +01:00
Sergey Kuznetsov
cffda52ba6 refactor: Coroutine based webserver (#1699)
Code of new coroutine-based web server. The new server is not connected
to Clio and not ready to use yet.
For #919.
2024-10-24 16:50:26 +01:00
Sergey Kuznetsov
cf081e7e25 fix: Fix timer spurious calls (#1700)
Fixes #1634.
I also checked other timers and they don't have the issue.
2024-10-23 14:24:05 +01:00
Peter Chen
f351a4cc79 fix: example config syntax (#1696) 2024-10-22 12:21:19 +01:00
cyan317
d60654c3dc fix: Remove log (#1694) 2024-10-18 17:11:15 +01:00
cyan317
9b0b4f5ad7 chore: Add counter for total messages waiting to be sent (#1691) 2024-10-16 17:06:27 +01:00
Sergey Kuznetsov
a21011799b style: Fix include (#1687)
Fixes #1686
2024-10-16 11:39:23 +01:00
cyan317
2f40cde7f5 chore: Remove unused static variables (#1683) 2024-10-15 16:43:21 +01:00
github-actions[bot]
02a75356fb style: clang-tidy auto fixes (#1685)
Fixes #1684. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-10-15 10:05:03 +01:00
Alex Kremer
b761fffa2d style: Update code formatting (#1682)
For #1664
2024-10-14 17:15:36 +01:00
Alex Kremer
c3be155f8d chore: Upgrade to llvm 19 tooling (#1681)
For #1664
2024-10-14 16:43:49 +01:00
Peter Chen
11192c362e fix: deletion script will not OOM (#1679)
fixes #1676 and #1678
2024-10-09 12:11:55 -04:00
github-actions[bot]
2c18fd5465 style: clang-tidy auto fixes (#1674)
Fixes #1673. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-10-01 09:14:04 +01:00
cyan317
da76907279 feat: server info cache (#1671)
fix: #1181
2024-09-30 17:00:23 +01:00
dependabot[bot]
1b42466a0d chore: Bump ytanikin/PRConventionalCommits from 1.2.0 to 1.3.0 (#1670)
Bumps
[ytanikin/PRConventionalCommits](https://github.com/ytanikin/prconventionalcommits)
from 1.2.0 to 1.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ytanikin/prconventionalcommits/releases">ytanikin/PRConventionalCommits's
releases</a>.</em></p>
<blockquote>
<h2>1.3.0</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: Set breaking changes regex by <a
href="https://github.com/alexangas"><code>@​alexangas</code></a> in <a
href="https://redirect.github.com/ytanikin/PRConventionalCommits/pull/24">ytanikin/PRConventionalCommits#24</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/alexangas"><code>@​alexangas</code></a>
made their first contribution in <a
href="https://redirect.github.com/ytanikin/PRConventionalCommits/pull/24">ytanikin/PRConventionalCommits#24</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/ytanikin/PRConventionalCommits/compare/1.2.0...1.3.0">https://github.com/ytanikin/PRConventionalCommits/compare/1.2.0...1.3.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b628c5a234"><code>b628c5a</code></a>
test: enable &quot;breaking change&quot; test</li>
<li><a
href="e1b5683aa4"><code>e1b5683</code></a>
fix: Set breaking changes regex (<a
href="https://redirect.github.com/ytanikin/prconventionalcommits/issues/24">#24</a>)</li>
<li><a
href="92a7ab7dc6"><code>92a7ab7</code></a>
fix: upgrade dependencies (<a
href="https://redirect.github.com/ytanikin/prconventionalcommits/issues/26">#26</a>)</li>
<li><a
href="cc6cc0dddb"><code>cc6cc0d</code></a>
test: fix tests (<a
href="https://redirect.github.com/ytanikin/prconventionalcommits/issues/25">#25</a>)</li>
<li>See full diff in <a
href="https://github.com/ytanikin/prconventionalcommits/compare/1.2.0...1.3.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ytanikin/PRConventionalCommits&package-manager=github_actions&previous-version=1.2.0&new-version=1.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 08:59:38 +01:00
Sergey Kuznetsov
87f1c06b5b chore: Update libxrpl to 2.3.0-b4 (#1667) 2024-09-25 13:39:38 +01:00
Alex Kremer
d0c6b65870 fix: Workaround for gcc12 bug with defaulted destructors (#1666)
Fixes #1662
2024-09-23 21:39:55 +01:00
github-actions[bot]
3343c1fa6b style: clang-tidy auto fixes (#1663)
Fixes #1662.

---------

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
Co-authored-by: Peter Chen <ychen@ripple.com>
2024-09-23 15:24:20 +01:00
Peter Chen
c8e3da6470 fix: add no lint to ignore clang-tidy (#1660)
Fixes build for
[#1659](https://github.com/XRPLF/clio/actions/runs/10956058143/job/30421296417)
2024-09-21 10:47:37 -04:00
github-actions[bot]
c409f8b2d6 style: clang-tidy auto fixes (#1659)
Fixes #1658. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-09-20 09:39:21 +01:00
Peter Chen
13a9aef579 chore: Revert Cassandra driver upgrade (#1656)
Reverts XRPLF/clio#1646
2024-09-19 15:39:01 +01:00
Peter Chen
af4fde9a3a refactor: Clio Config (#1593)
Add constraint + parse json into Config
Second part of refactoring Clio Config; First PR found
[here](https://github.com/XRPLF/clio/pull/1544)

Steps that are left to implement:
- Replacing all the places where we fetch config values (by using
config.valueOr/MaybeValue) to instead get it from Config Definition
- Generate markdown file using Clio Config Description
2024-09-19 15:10:04 +01:00
cyan317
0282504f18 feat: add 'force_forward' field to request (#1647)
Fix #1141
2024-09-17 11:42:51 +01:00
Alex Kremer
bea905adcd feat: Delete-before support in data removal tool (#1649)
Fixes #1650
2024-09-16 16:47:29 +01:00
Peter Chen
7a9a1656f9 fix: Upgrade Cassandra driver (#1646)
Fixes #1296
2024-09-16 12:28:33 +01:00
Peter Chen
0ede0ed351 fix: pre-push tag (#1614)
Fix issue of git was verifying incorrect Tag
2024-09-11 09:44:42 -04:00
cyan317
ee6018186e fix: no restriction on type field (#1644)
'type' should not matter if 'full' or 'accounts' is false. Relax the
restriction for 'type'
2024-09-11 14:42:25 +01:00
cyan317
293af3f3b0 fix: Add more restrictions to admin fields (#1643) 2024-09-10 14:50:42 +01:00
dependabot[bot]
9600637edd ci: Bump peter-evans/create-pull-request from 6 to 7 (#1636)
Bumps
[peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request)
from 6 to 7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/peter-evans/create-pull-request/releases">peter-evans/create-pull-request's
releases</a>.</em></p>
<blockquote>
<h2>Create Pull Request v7.0.0</h2>
<p> Now supports commit signing with bot-generated tokens! See
&quot;What's new&quot; below. ✍️🤖</p>
<h3>Behaviour changes</h3>
<ul>
<li>Action input <code>git-token</code> has been renamed
<code>branch-token</code>, to be more clear about its purpose. The
<code>branch-token</code> is the token that the action will use to
create and update the branch.</li>
<li>The action now handles requests that have been rate-limited by
GitHub. Requests hitting a primary rate limit will retry twice, for a
total of three attempts. Requests hitting a secondary rate limit will
not be retried.</li>
<li>The <code>pull-request-operation</code> output now returns
<code>none</code> when no operation was executed.</li>
<li>Removed deprecated output environment variable
<code>PULL_REQUEST_NUMBER</code>. Please use the
<code>pull-request-number</code> action output instead.</li>
</ul>
<h3>What's new</h3>
<ul>
<li>The action can now sign commits as <code>github-actions[bot]</code>
when using <code>GITHUB_TOKEN</code>, or your own bot when using <a
href="https://github.com/peter-evans/create-pull-request/blob/HEAD/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens">GitHub
App tokens</a>. See <a
href="https://github.com/peter-evans/create-pull-request/blob/HEAD/docs/concepts-guidelines.md#commit-signature-verification-for-bots">commit
signing</a> for details.</li>
<li>Action input <code>draft</code> now accepts a new value
<code>always-true</code>. This will set the pull request to draft status
when the pull request is updated, as well as on creation.</li>
<li>A new action input <code>maintainer-can-modify</code> indicates
whether <a
href="https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork">maintainers
can modify</a> the pull request. The default is <code>true</code>, which
retains the existing behaviour of the action.</li>
<li>A new output <code>pull-request-commits-verified</code> returns
<code>true</code> or <code>false</code>, indicating whether GitHub
considers the signature of the branch's commits to be verified.</li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.36 to
18.19.39 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3000">peter-evans/create-pull-request#3000</a></li>
<li>build(deps-dev): bump ts-jest from 29.1.5 to 29.2.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3008">peter-evans/create-pull-request#3008</a></li>
<li>build(deps-dev): bump prettier from 3.3.2 to 3.3.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3018">peter-evans/create-pull-request#3018</a></li>
<li>build(deps-dev): bump ts-jest from 29.2.0 to 29.2.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3019">peter-evans/create-pull-request#3019</a></li>
<li>build(deps-dev): bump eslint-plugin-prettier from 5.1.3 to 5.2.1 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3035">peter-evans/create-pull-request#3035</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.39 to
18.19.41 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3037">peter-evans/create-pull-request#3037</a></li>
<li>build(deps): bump undici from 6.19.2 to 6.19.4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3036">peter-evans/create-pull-request#3036</a></li>
<li>build(deps-dev): bump ts-jest from 29.2.2 to 29.2.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3038">peter-evans/create-pull-request#3038</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.41 to
18.19.42 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3070">peter-evans/create-pull-request#3070</a></li>
<li>build(deps): bump undici from 6.19.4 to 6.19.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3086">peter-evans/create-pull-request#3086</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.42 to
18.19.43 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3087">peter-evans/create-pull-request#3087</a></li>
<li>build(deps-dev): bump ts-jest from 29.2.3 to 29.2.4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3088">peter-evans/create-pull-request#3088</a></li>
<li>build(deps): bump undici from 6.19.5 to 6.19.7 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3145">peter-evans/create-pull-request#3145</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.43 to
18.19.44 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3144">peter-evans/create-pull-request#3144</a></li>
<li>Update distribution by <a
href="https://github.com/actions-bot"><code>@​actions-bot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3154">peter-evans/create-pull-request#3154</a></li>
<li>build(deps): bump undici from 6.19.7 to 6.19.8 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3213">peter-evans/create-pull-request#3213</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.44 to
18.19.45 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3214">peter-evans/create-pull-request#3214</a></li>
<li>Update distribution by <a
href="https://github.com/actions-bot"><code>@​actions-bot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3221">peter-evans/create-pull-request#3221</a></li>
<li>build(deps-dev): bump eslint-import-resolver-typescript from 3.6.1
to 3.6.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3255">peter-evans/create-pull-request#3255</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.45 to
18.19.46 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3254">peter-evans/create-pull-request#3254</a></li>
<li>build(deps-dev): bump ts-jest from 29.2.4 to 29.2.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3256">peter-evans/create-pull-request#3256</a></li>
<li>v7 - signed commits by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3057">peter-evans/create-pull-request#3057</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/rustycl0ck"><code>@​rustycl0ck</code></a> made
their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3057">peter-evans/create-pull-request#3057</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v6.1.0...v7.0.0">https://github.com/peter-evans/create-pull-request/compare/v6.1.0...v7.0.0</a></p>
<h2>Create Pull Request v6.1.0</h2>
<p> Adds <code>pull-request-branch</code> as an action output.</p>
<h2>What's Changed</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8867c4aba1"><code>8867c4a</code></a>
fix: handle ambiguous argument failure on diff stat (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3312">#3312</a>)</li>
<li><a
href="6073f5434b"><code>6073f54</code></a>
build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code> (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3291">#3291</a>)</li>
<li><a
href="6d01b5601c"><code>6d01b56</code></a>
build(deps-dev): bump eslint-plugin-import from 2.29.1 to 2.30.0 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3290">#3290</a>)</li>
<li><a
href="25cf8451c3"><code>25cf845</code></a>
build(deps-dev): bump <code>@​typescript-eslint/parser</code> from
7.17.0 to 7.18.0 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3289">#3289</a>)</li>
<li><a
href="d87b980a0e"><code>d87b980</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.19.46 to
18.19.48 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3288">#3288</a>)</li>
<li><a
href="119d131ea9"><code>119d131</code></a>
build(deps): bump peter-evans/create-pull-request from 6 to 7 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3283">#3283</a>)</li>
<li><a
href="73e6230af4"><code>73e6230</code></a>
docs: update readme</li>
<li><a
href="c0348e860f"><code>c0348e8</code></a>
ci: add v7 to workflow</li>
<li><a
href="4320041ed3"><code>4320041</code></a>
feat: signed commits (v7) (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3057">#3057</a>)</li>
<li><a
href="0c2a66fe4a"><code>0c2a66f</code></a>
build(deps-dev): bump ts-jest from 29.2.4 to 29.2.5 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3256">#3256</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/peter-evans/create-pull-request/compare/v6...v7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=peter-evans/create-pull-request&package-manager=github_actions&previous-version=6&new-version=7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-10 10:56:28 +01:00
cyan317
7d0753f1da fix: Don't forward ledger API if 'full' is a string (#1640)
Fix #1635
2024-09-09 11:20:02 +01:00
github-actions[bot]
b04e090cbb style: clang-tidy auto fixes (#1639)
Fixes #1638. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-09-09 09:29:45 +01:00
Sergey Kuznetsov
7088ebad97 fix: Subscription source bugs fix (#1626) (#1633)
Fixes #1620.
Cherry pick of #1626 into develop.

- Add timeouts for websocket operations for connections to rippled.
Without these timeouts if connection hangs for some reason, clio
wouldn't know the connection is hanging.
- Fix potential data race in choosing new subscription source which will
forward messages to users.
- Optimise switching between subscription sources.
2024-09-06 14:35:18 +01:00
Sergey Kuznetsov
1d33b8e88a fix: Fix logging in SubscriptionSource (#1617) (#1632)
Fixes #1616. 
Cherry pick of #1617 into develop.
2024-09-06 13:48:07 +01:00
cyan317
44c07e7332 refactor: Remove SubscriptionManagerRunner (#1623) 2024-09-06 10:34:23 +01:00
github-actions[bot]
dbb8d9eedd style: clang-tidy auto fixes (#1631)
Fixes #1630. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-09-06 10:15:49 +01:00
Sergey Kuznetsov
bc9ca41bc1 test: Add test for WsConnection for ping response (#1619) 2024-09-05 16:33:04 +01:00
cyan317
e4736bf9d8 fix: not forward admin API (#1628) 2024-09-05 15:06:57 +01:00
Peter Chen
7360c4fd0e fix: AccountNFT with invalid marker (#1589)
Fixes [#1497](https://github.com/XRPLF/clio/issues/1497)
Mimics the behavior of the [fix on Rippled
side](https://github.com/XRPLF/rippled/pull/5045)
2024-08-27 14:13:52 -04:00
Alex Kremer
9a9de501e4 feat: Move/copy support in async framework (#1609)
Fixes #1608
2024-08-20 13:24:51 +01:00
github-actions[bot]
fb473f6d28 style: clang-tidy auto fixes (#1613)
Fixes #1612. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-08-19 09:30:39 +01:00
cyan317
4cbd3f5e18 refactor: Subscription Manager uses async framework (#1605)
Fix #1209
2024-08-16 13:46:14 +01:00
Sergey Kuznetsov
5332d3e9f0 test: Make ForwardingSource tests more stable (#1607)
Fixes #1606.
2024-08-15 14:58:08 +01:00
Sergey Kuznetsov
5499b892e6 feat: Add stop to WorkQueue (#1600)
For #442.
2024-08-14 12:00:13 +01:00
github-actions[bot]
0ff1edaac8 style: clang-tidy auto fixes (#1604)
Fixes #1603. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-08-14 08:48:23 +01:00
Sergey Kuznetsov
b7c8ed7e3a refactor: Create interface for DOSGuard (#1602)
For #919.
2024-08-13 17:26:47 +01:00
Rome Reginelli
49e9d5eda0 docs: Document how to build with custom libxrpl (#1572)
Fixes #1272
2024-08-09 09:26:42 +01:00
cyan317
d7605d1069 docs: Use non-admin WS port (#1592)
This PR is copied from #1533 , unblock it.
Help https://github.com/XRPLF/clio/pull/1533/files
2024-08-08 10:22:37 +01:00
github-actions[bot]
58045fb0b6 style: clang-tidy auto fixes (#1591)
Fixes #1590. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-08-08 10:13:43 +01:00
Sergey Kuznetsov
1b4eed3b2b refactor: Move interval timer into a separate class (#1588)
For #442.
2024-08-07 17:38:24 +01:00
Alex Kremer
27c9e2a530 fix: Support conan channels in check_libxrpl flow (#1583)
Fixes #1582
2024-08-07 15:41:41 +01:00
Alex Kremer
00026ebf5a fix: Use doxygen 1.12 (#1587)
Fixes #1431
2024-08-07 15:22:21 +01:00
github-actions[bot]
fa1e9da0de style: clang-tidy auto fixes (#1585)
Fixes #1584. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-08-07 09:01:11 +01:00
Peter Chen
2bd7ac346c refactor: Clio Config (#1544)
Implementation of new config definition + methods + UT

Steps that still need to be implemented: 
- Make ClioConfigDefinition and it's method to be as constexpr as
possible
- Getting User Config file and populating the values in ConfigDefinition
while checking for constraints on user values
- Replacing all the places where we fetch config values (by using
config.valueOr/MaybeValue) to instead get it from Config Definition
- Generate markdown file using Clio Config Description
2024-08-06 11:07:25 -04:00
github-actions[bot]
5abf912b5a style: clang-tidy auto fixes (#1581)
Fixes #1580. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-08-06 09:09:40 +01:00
cyan317
a7f34490b1 fix: account_objects returns error when filter does not make sense (#1579)
Fix #1488
2024-08-05 14:37:46 +01:00
Sergey Kuznetsov
2a74a65b22 ci: Fix nightly release workflow (#1577)
Fixes #1574.
2024-08-02 11:49:17 +01:00
github-actions[bot]
319cd3d67b style: clang-tidy auto fixes (#1576)
Fixes #1575. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-08-02 09:13:55 +01:00
Sergey Kuznetsov
2fef03d766 refactor: Refactor main (#1555)
For #442.
2024-08-01 10:53:17 +01:00
Sergey Kuznetsov
fb90fb27ae style: Fix clang-tidy issue (#1571)
Fixes #1569. Fixes #1573.
2024-07-31 11:06:42 +01:00
Sergey Kuznetsov
9607cff8a0 ci: Fix errors in docker image uploading (#1570) 2024-07-30 16:56:37 +01:00
cyan317
00c4287b3b fix: Remove cassandra from log (#1557)
Fix #1452
2024-07-30 14:38:19 +01:00
github-actions[bot]
3095f58dbe style: clang-tidy auto fixes (#1568)
Fixes #1567. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
2024-07-30 08:35:08 +01:00
cyan317
8d0e904ecb fix: LedgerEntryNotExist unittest failure (#1564) 2024-07-29 16:41:10 +01:00
dependabot[bot]
3a3d8d46dd ci: Bump wandalen/wretry.action from 1.4.10 to 3.5.0 (#1563)
Bumps
[wandalen/wretry.action](https://github.com/wandalen/wretry.action) from
1.4.10 to 3.5.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6feedb7ded"><code>6feedb7</code></a>
version 3.5.0</li>
<li><a
href="b5ca17cbcf"><code>b5ca17c</code></a>
Merge pull request <a
href="https://redirect.github.com/wandalen/wretry.action/issues/163">#163</a>
from dmvict/master</li>
<li><a
href="82f08e4ccd"><code>82f08e4</code></a>
Add dependency to build script</li>
<li><a
href="c14e35fac1"><code>c14e35f</code></a>
Merge pull request <a
href="https://redirect.github.com/wandalen/wretry.action/issues/162">#162</a>
from dmvict/master</li>
<li><a
href="979d4e538d"><code>979d4e5</code></a>
Synchronize info with <code>Readme</code> of <code>js_action</code>
branch</li>
<li><a
href="0dd1d5d77d"><code>0dd1d5d</code></a>
version 3.4.0</li>
<li><a
href="8e449ec3ce"><code>8e449ec</code></a>
Merge pull request <a
href="https://redirect.github.com/wandalen/wretry.action/issues/156">#156</a>
from dmvict/master</li>
<li><a
href="050710def1"><code>050710d</code></a>
Update action files, add option <code>steps_context</code>, update file
<code>Readme</code>, add op...</li>
<li><a
href="dfc978b430"><code>dfc978b</code></a>
version 3.3.0</li>
<li><a
href="b7882d347e"><code>b7882d3</code></a>
Merge pull request <a
href="https://redirect.github.com/wandalen/wretry.action/issues/154">#154</a>
from dmvict/master</li>
<li>Additional commits viewable in <a
href="https://github.com/wandalen/wretry.action/compare/v1.4.10...v3.5.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=wandalen/wretry.action&package-manager=github_actions&previous-version=1.4.10&new-version=3.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-25 16:18:46 +01:00
dependabot[bot]
b2f7983609 ci: Bump actions/configure-pages from 4 to 5 (#1562)
Bumps
[actions/configure-pages](https://github.com/actions/configure-pages)
from 4 to 5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/configure-pages/releases">actions/configure-pages's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.0</h2>
<h1>Breaking Changes</h1>
<p>⚠️ This version contains breaking changes! ⚠️</p>
<ul>
<li>When using the <a
href="983d7736d9/action.yml (L7-L10)">input
param <code>static_site_generator: next</code></a>:
<ul>
<li>Added support for Next.js &gt;= 13.3.0</li>
<li>Consequently, also dropped support for Next.js &lt; 13.3.0</li>
</ul>
</li>
</ul>
<h1>Full Changelog</h1>
<ul>
<li>Attempt to auto-detect configuration files with varying file
extensions <a
href="https://github.com/JamesMGreene"><code>@​JamesMGreene</code></a>
(<a
href="https://redirect.github.com/actions/configure-pages/issues/139">#139</a>)</li>
<li>Convert errors into Actions-compatible logging with annotations <a
href="https://github.com/JamesMGreene"><code>@​JamesMGreene</code></a>
(<a
href="https://redirect.github.com/actions/configure-pages/issues/138">#138</a>)</li>
<li>Bump <code>@​actions/github</code> from 5.1.1 to 6.0.0 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/123">#123</a>)</li>
<li>Bump the non-breaking-changes group with 2 updates <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/136">#136</a>)</li>
<li>Update the Next.js configuration for v14 <a
href="https://github.com/JamesMGreene"><code>@​JamesMGreene</code></a>
(<a
href="https://redirect.github.com/actions/configure-pages/issues/137">#137</a>)</li>
<li>Bump the non-breaking-changes group with 3 updates <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/132">#132</a>)</li>
<li>Bump release-drafter/release-drafter from 5 to 6 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/133">#133</a>)</li>
<li>Bump github/codeql-action from 2 to 3 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/127">#127</a>)</li>
<li>Bump actions/checkout from 3 to 4 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/120">#120</a>)</li>
<li>Bump actions/setup-node from 3 to 4 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/118">#118</a>)</li>
<li>Bump the non-breaking-changes group with 1 update <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/131">#131</a>)</li>
<li>Update Dependabot config to group non-breaking changes <a
href="https://github.com/JamesMGreene"><code>@​JamesMGreene</code></a>
(<a
href="https://redirect.github.com/actions/configure-pages/issues/130">#130</a>)</li>
</ul>
<p>See details of <a
href="https://github.com/actions/configure-pages/compare/v4.0.0...v5.0.0">all
code changes</a> since previous release.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="983d7736d9"><code>983d773</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/configure-pages/issues/139">#139</a>
from actions/config-auto-detect</li>
<li><a
href="9cf6e24f74"><code>9cf6e24</code></a>
Tweak comment</li>
<li><a
href="f304bd89be"><code>f304bd8</code></a>
Update distributables</li>
<li><a
href="215cd51eb0"><code>215cd51</code></a>
Attempt to detect existing config files matching the expected basename
plus o...</li>
<li><a
href="e9382ac9ad"><code>e9382ac</code></a>
Front-load the file extension warning</li>
<li><a
href="7781abd34b"><code>7781abd</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/configure-pages/issues/138">#138</a>
from actions/error-utils</li>
<li><a
href="fc47e3c838"><code>fc47e3c</code></a>
Update distributables</li>
<li><a
href="9c9f8a266f"><code>9c9f8a2</code></a>
Update tests to use the Octokit RequestError class</li>
<li><a
href="9a4705d653"><code>9a4705d</code></a>
Update distributables</li>
<li><a
href="f6ded38287"><code>f6ded38</code></a>
Fix syntax error and formatting</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/configure-pages/compare/v4...v5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/configure-pages&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-25 16:18:37 +01:00
dependabot[bot]
501e131061 ci: Bump crazy-max/ghaction-import-gpg from 5 to 6 (#1561)
Bumps
[crazy-max/ghaction-import-gpg](https://github.com/crazy-max/ghaction-import-gpg)
from 5 to 6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/crazy-max/ghaction-import-gpg/releases">crazy-max/ghaction-import-gpg's
releases</a>.</em></p>
<blockquote>
<h2>v6.0.0</h2>
<ul>
<li>Node 20 as default runtime (requires <a
href="https://github.com/actions/runner/releases/tag/v2.308.0">Actions
Runner v2.308.0</a> or later) by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/pull/183">crazy-max/ghaction-import-gpg#183</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/crazy-max/ghaction-import-gpg/compare/v5.4.0...v6.0.0">https://github.com/crazy-max/ghaction-import-gpg/compare/v5.4.0...v6.0.0</a></p>
<h2>v5.4.0</h2>
<ul>
<li>Fallback to gpg homedir if <code>HOME</code> not set by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/pull/181">crazy-max/ghaction-import-gpg#181</a></li>
<li>Bump openpgp from 5.8.0 to 5.10.1 in <a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/pull/177">crazy-max/ghaction-import-gpg#177</a>
<a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/pull/171">crazy-max/ghaction-import-gpg#171</a></li>
<li>Bump semver from 6.3.0 to 6.3.1 in <a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/pull/174">crazy-max/ghaction-import-gpg#174</a></li>
<li>Bump word-wrap from 1.2.3 to 1.2.4 in <a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/pull/175">crazy-max/ghaction-import-gpg#175</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/crazy-max/ghaction-import-gpg/compare/v5.3.0...v5.4.0">https://github.com/crazy-max/ghaction-import-gpg/compare/v5.3.0...v5.4.0</a></p>
<h2>v5.3.0</h2>
<ul>
<li>Add <code>trust_level</code> input to set private key trust level by
<a href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in
<a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/pull/168">crazy-max/ghaction-import-gpg#168</a></li>
<li>Missing <code>name</code> output to action metadata by <a
href="https://github.com/dtan4"><code>@​dtan4</code></a> in <a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/pull/154">crazy-max/ghaction-import-gpg#154</a></li>
<li>Update yarn to 3.5.1 by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/pull/165">crazy-max/ghaction-import-gpg#165</a></li>
<li>Update dev dependencies by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/pull/167">crazy-max/ghaction-import-gpg#167</a></li>
<li>Bump openpgp from 5.5.0 to 5.8.0 in <a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/pull/164">crazy-max/ghaction-import-gpg#164</a></li>
<li>Bump minimatch from 3.0.4 to 3.1.2 in <a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/pull/155">crazy-max/ghaction-import-gpg#155</a></li>
<li>Bump json5 from 2.1.3 to 2.2.3 in <a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/pull/157">crazy-max/ghaction-import-gpg#157</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/crazy-max/ghaction-import-gpg/compare/v5.2.0...v5.3.0">https://github.com/crazy-max/ghaction-import-gpg/compare/v5.2.0...v5.3.0</a></p>
<h2>v5.2.0</h2>
<ul>
<li>Remove <code>setOutput</code> workaround by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> (<a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/issues/152">#152</a>)</li>
<li>Bump <code>@​actions/core</code> from 1.9.0 to 1.10.0 (<a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/issues/147">#147</a>
<a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/issues/151">#151</a>)</li>
<li>Bump openpgp from 5.3.1 to 5.5.0 (<a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/issues/149">#149</a>)</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/crazy-max/ghaction-import-gpg/compare/v5.1.0...v5.2.0">https://github.com/crazy-max/ghaction-import-gpg/compare/v5.1.0...v5.2.0</a></p>
<h2>v5.1.0</h2>
<ul>
<li>Bump openpgp from 5.2.1 to 5.3.1 (<a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/issues/145">#145</a>)</li>
<li>Bump <code>@​actions/core</code> from 1.6.0 to 1.9.0 (<a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/issues/143">#143</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="01dd5d3ca4"><code>01dd5d3</code></a>
Merge pull request <a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/issues/186">#186</a>
from crazy-max/dependabot/npm_and_yarn/actions/core-1...</li>
<li><a
href="ab787acd76"><code>ab787ac</code></a>
chore: update generated content</li>
<li><a
href="c63a0195c8"><code>c63a019</code></a>
build(deps): bump <code>@​actions/core</code> from 1.10.0 to 1.10.1</li>
<li><a
href="81f63a86f4"><code>81f63a8</code></a>
Merge pull request <a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/issues/191">#191</a>
from crazy-max/dependabot/npm_and_yarn/babel/traverse...</li>
<li><a
href="98ff7fb2c6"><code>98ff7fb</code></a>
Merge pull request <a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/issues/190">#190</a>
from crazy-max/dependabot/npm_and_yarn/debug-4.3.4</li>
<li><a
href="e83a2eaa2f"><code>e83a2ea</code></a>
Merge pull request <a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/issues/193">#193</a>
from crazy-max/dependabot/github_actions/actions/gith...</li>
<li><a
href="2e40814c31"><code>2e40814</code></a>
Merge pull request <a
href="https://redirect.github.com/crazy-max/ghaction-import-gpg/issues/192">#192</a>
from crazy-max/dependabot/npm_and_yarn/openpgp-5.11.0</li>
<li><a
href="480319b8ff"><code>480319b</code></a>
chore: update generated content</li>
<li><a
href="019a31d476"><code>019a31d</code></a>
build(deps): bump actions/github-script from 6 to 7</li>
<li><a
href="24f4ba9d1e"><code>24f4ba9</code></a>
build(deps): bump openpgp from 5.10.1 to 5.11.0</li>
<li>Additional commits viewable in <a
href="https://github.com/crazy-max/ghaction-import-gpg/compare/v5...v6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crazy-max/ghaction-import-gpg&package-manager=github_actions&previous-version=5&new-version=6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-25 16:18:25 +01:00
dependabot[bot]
27cf62ca63 ci: Bump peter-evans/create-pull-request from 5 to 6 (#1560)
Bumps
[peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request)
from 5 to 6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/peter-evans/create-pull-request/releases">peter-evans/create-pull-request's
releases</a>.</em></p>
<blockquote>
<h2>Create Pull Request v6.0.0</h2>
<h2>Behaviour changes</h2>
<ul>
<li>The default values for <code>author</code> and
<code>committer</code> have changed. See &quot;What's new&quot; below
for details. If you are overriding the default values you will not be
affected by this change.</li>
<li>On completion, the action now removes the temporary git remote
configuration it adds when using <code>push-to-fork</code>. This should
not affect you unless you were using the temporary configuration for
some other purpose after the action completes.</li>
</ul>
<h2>What's new</h2>
<ul>
<li>Updated runtime to Node.js 20
<ul>
<li>The action now requires a minimum version of <a
href="https://github.com/actions/runner/releases/tag/v2.308.0">v2.308.0</a>
for the Actions runner. Update self-hosted runners to v2.308.0 or later
to ensure compatibility.</li>
</ul>
</li>
<li>The default value for <code>author</code> has been changed to
<code>${{ github.actor }} &lt;${{ github.actor_id }}+${{ github.actor
}}@users.noreply.github.com&gt;</code>. The change adds the <code>${{
github.actor_id }}+</code> prefix to the email address to align with
GitHub's standard format for the author email address.</li>
<li>The default value for <code>committer</code> has been changed to
<code>github-actions[bot]
&lt;41898282+github-actions[bot]@users.noreply.github.com&gt;</code>.
This is to align with the default GitHub Actions bot user account.</li>
<li>Adds input <code>git-token</code>, the <a
href="https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token">Personal
Access Token (PAT)</a> that the action will use for git operations. This
input defaults to the value of <code>token</code>. Use this input if you
would like the action to use a different token for git operations than
the one used for the GitHub API.</li>
<li><code>push-to-fork</code> now supports pushing to sibling
repositories in the same network.</li>
<li>Previously, when using <code>push-to-fork</code>, the action did not
remove temporary git remote configuration it adds during execution. This
has been fixed and the configuration is now removed when the action
completes.</li>
<li>If the pull request body is truncated due to exceeding the maximum
length, the action will now suffix the body with the message
&quot;...<em>[Pull request body truncated]</em>&quot; to indicate that
the body has been truncated.</li>
<li>The action now uses <code>--unshallow</code> only when necessary,
rather than as a default argument of <code>git fetch</code>. This should
improve performance, particularly for large git repositories with
extensive commit history.</li>
<li>The action can now be executed on one GitHub server and create pull
requests on a <em>different</em> GitHub server. Server products include
GitHub hosted (github.com), GitHub Enterprise Server (GHES), and GitHub
Enterprise Cloud (GHEC). For example, the action can be executed on
GitHub hosted and create pull requests on a GHES or GHEC instance.</li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>Update distribution by <a
href="https://github.com/actions-bot"><code>@​actions-bot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/2086">peter-evans/create-pull-request#2086</a></li>
<li>fix crazy-max/ghaction-import-gp parameters by <a
href="https://github.com/fharper"><code>@​fharper</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/2177">peter-evans/create-pull-request#2177</a></li>
<li>Update distribution by <a
href="https://github.com/actions-bot"><code>@​actions-bot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/2364">peter-evans/create-pull-request#2364</a></li>
<li>Use checkout v4 by <a
href="https://github.com/okuramasafumi"><code>@​okuramasafumi</code></a>
in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/2521">peter-evans/create-pull-request#2521</a></li>
<li>Note about <code>delete-branch</code> by <a
href="https://github.com/dezren39"><code>@​dezren39</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/2631">peter-evans/create-pull-request#2631</a></li>
<li>98 dependency updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/fharper"><code>@​fharper</code></a> made
their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/2177">peter-evans/create-pull-request#2177</a></li>
<li><a
href="https://github.com/okuramasafumi"><code>@​okuramasafumi</code></a>
made their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/2521">peter-evans/create-pull-request#2521</a></li>
<li><a href="https://github.com/dezren39"><code>@​dezren39</code></a>
made their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/2631">peter-evans/create-pull-request#2631</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v5.0.2...v6.0.0">https://github.com/peter-evans/create-pull-request/compare/v5.0.2...v6.0.0</a></p>
<h2>Create Pull Request v5.0.2</h2>
<p>⚙️ Fixes an issue that occurs when using <code>push-to-fork</code>
and both base and head repositories are in the same org/user
account.</p>
<h2>What's Changed</h2>
<ul>
<li>fix: specify head repo by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/2044">peter-evans/create-pull-request#2044</a></li>
<li>20 dependency updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v5.0.1...v5.0.2">https://github.com/peter-evans/create-pull-request/compare/v5.0.1...v5.0.2</a></p>
<h2>Create Pull Request v5.0.1</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: truncate body if exceeds max length by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/1915">peter-evans/create-pull-request#1915</a></li>
<li>12 dependency updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v5.0.0...v5.0.1">https://github.com/peter-evans/create-pull-request/compare/v5.0.0...v5.0.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c5a7806660"><code>c5a7806</code></a>
feat: add branch name output (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2995">#2995</a>)</li>
<li><a
href="4383ba9ef0"><code>4383ba9</code></a>
build: update distribution (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2990">#2990</a>)</li>
<li><a
href="36f7648874"><code>36f7648</code></a>
build(deps): bump undici from 6.18.2 to 6.19.2 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2977">#2977</a>)</li>
<li><a
href="5f7c1586fd"><code>5f7c158</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.19.34 to
18.19.36 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2976">#2976</a>)</li>
<li><a
href="db1713da3a"><code>db1713d</code></a>
build(deps-dev): bump ts-jest from 29.1.4 to 29.1.5 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2975">#2975</a>)</li>
<li><a
href="ca98a71ccc"><code>ca98a71</code></a>
build(deps-dev): bump ws from 8.11.0 to 8.17.1 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2970">#2970</a>)</li>
<li><a
href="ce008085c8"><code>ce00808</code></a>
build(deps-dev): bump braces from 3.0.2 to 3.0.3 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2962">#2962</a>)</li>
<li><a
href="7318c0b7b6"><code>7318c0b</code></a>
build(deps-dev): bump prettier from 3.3.0 to 3.3.2 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2959">#2959</a>)</li>
<li><a
href="e30bbbb3c9"><code>e30bbbb</code></a>
build: update distribution (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2947">#2947</a>)</li>
<li><a
href="bad19b8e0b"><code>bad19b8</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.19.33 to
18.19.34 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/2935">#2935</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/peter-evans/create-pull-request/compare/v5...v6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=peter-evans/create-pull-request&package-manager=github_actions&previous-version=5&new-version=6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-25 16:18:01 +01:00
Alex Kremer
638e2e28ab ci: Update clang-format and ccache (#1559)
Fixes #1212
Fixes #1558
2024-07-25 16:16:20 +01:00
Alex Kremer
f9bb62f670 ci: Setup dependabot for github-actions (#1556)
Fixes #1502
2024-07-25 15:35:42 +01:00
cyan317
895f3c0059 fix: nftData unique bug (#1550)
Fix: failed to unique the NFT data in one ledger as we wish.
2024-07-25 11:05:28 +01:00
Alex Kremer
77494245a9 fix: Static linkage (#1551)
Fixes #1507
2024-07-23 17:35:39 +01:00
github-actions[bot]
648cedcba5 style: clang-tidy auto fixes (#1548)
Fixes #1547. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-07-17 10:48:27 +01:00
cyan317
8a613c5de8 fix: Fail to deduplicate the same nfts in ttNFTOKEN_CANCEL_OFFER (#1542) 2024-07-16 10:50:20 +01:00
github-actions[bot]
d6ae890f83 style: clang-tidy auto fixes (#1546)
Fixes #1545. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-07-16 10:49:07 +01:00
Zhiyuan Wang
e16a9510f1 fix: Support deleted object in ledger_entry (#1483)
Fixes #1306
2024-07-15 18:07:09 +01:00
cyan317
d6598f30f1 fix: Add more account check (#1543)
Make sure all char is alphanumeric for account
2024-07-15 16:42:12 +01:00
Alex Kremer
b12d916276 fix: Relax error when full or accounts set to false (#1540)
Fixes #1537
2024-07-12 15:44:46 +01:00
Alex Kremer
4f6f717bfb fix: Compatible feature response (#1539)
Fixes #1538
2024-07-12 15:03:19 +01:00
github-actions[bot]
46a616cdad style: clang-tidy auto fixes (#1536)
Fixes #1535.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-07-12 09:40:12 +01:00
Alex Kremer
f771478da0 feat: Native Feature RPC (#1526) 2024-07-11 12:18:13 +01:00
cyan317
6e606cb7d8 fix: Change the field name from "close_time_iso" to "closed (#1531) 2024-07-10 13:47:02 +01:00
Sergey Kuznetsov
5bcc11b347 test: Add more tests for warnings (#1532)
For #1518.
2024-07-10 13:33:59 +01:00
github-actions[bot]
d227c53ef3 style: clang-tidy auto fixes (#1530)
Fixes #1529. 
---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sergey Kuznetsov <skuznetsov@ripple.com>
2024-07-10 11:42:39 +01:00
github-actions[bot]
e85f6cd9e4 style: clang-tidy auto fixes (#1528)
Fixes #1527. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-07-10 10:35:59 +01:00
Sergey Kuznetsov
46bd67a9ec feat: More verbose forwarding errors (#1523)
Fixes #1516.
2024-07-09 15:22:01 +01:00
cyan317
094ed8f299 fix: Fix the ledger_index timezone issue (#1522)
Fix unittest failures
2024-07-09 13:14:22 +01:00
Sergey Kuznetsov
d536433d64 ci: Fix bugs in nightly docker publishing (#1520) 2024-07-05 15:04:08 +01:00
Sergey Kuznetsov
29847caf0e fix: Fix extra brackets in warnings (#1519)
Fixes #1518
2024-07-05 12:03:22 +01:00
Sergey Kuznetsov
aa86075159 ci: Fix nightly (#1514) 2024-07-03 17:46:14 +01:00
Sergey Kuznetsov
4dd3254354 style: Fix clang-tidy issue (#1515)
Fixes #1513
2024-07-03 16:22:25 +01:00
github-actions[bot]
f55872d496 style: clang-tidy auto fixes (#1512)
Fixes #1511. 

---------

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
Co-authored-by: Sergey Kuznetsov <skuznetsov@ripple.com>
2024-07-03 11:23:08 +01:00
Sergey Kuznetsov
6cb63ed9b2 style: Fix clang-tidy issues (#1510)
Fixes #1508, #1506, #1500
2024-07-03 09:16:26 +01:00
Sergey Kuznetsov
f77186002a ci: Clio docker image (#1509)
Fixes #1051.
2024-07-02 18:04:38 +01:00
cyan317
66849432be feat: Ledger index (#1503)
Fixed #1052
2024-07-02 13:58:21 +01:00
github-actions[bot]
d26c93a711 style: clang-tidy auto fixes (#1505)
Fixes #1504. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-07-01 09:21:46 +01:00
yinyiqian1
54c9a6e7c0 refactor: separate fixtures (#1495)
refactor #945
2024-06-28 13:25:52 -04:00
github-actions[bot]
b24aadc898 style: clang-tidy auto fixes (#1499)
Fixes #1498. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-06-28 09:51:50 +01:00
Alex Kremer
7bd21345a1 feat: AmendmentCenter (#1418)
Fixes #1416
2024-06-27 18:21:30 +01:00
yinyiqian1
2ff51ff416 refactor: Structure global validators better (#1484)
refactor: #1170 Structure global validators better
2024-06-27 09:55:17 -04:00
cyan317
72f9a8fe78 fix: Remove unused file (#1496) 2024-06-27 14:25:38 +01:00
cyan317
b2eacf9868 build: Upgrade to libxrpl 2.3.0-b1 (#1489)
Update libxrpl and change include path
2024-06-25 15:05:01 +01:00
Sergey Kuznetsov
77cec26cc9 ci: Turn off PR labelling (#1492) 2024-06-25 14:52:26 +01:00
Sergey Kuznetsov
6a848649b3 ci: Add permissions to pr title check workflow (#1491) 2024-06-25 14:30:50 +01:00
Sergey Kuznetsov
c761b50fa4 docs: mention conventional commits (#1490)
Also add build type to the allowed types.
2024-06-25 12:55:08 +01:00
Sergey Kuznetsov
062ef9f0a5 ci: added conventional commits check (#1487)
Fixes #1366
2024-06-24 15:11:03 +01:00
cyan317
c7fee023e7 Fix issue: "Updating cache" prints in log when cache is disabled (#1479)
Fixed #1461
2024-06-24 13:05:07 +01:00
github-actions[bot]
e65351e9e6 [CI] clang-tidy auto fixes (#1486)
Fixes #1485. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-06-24 08:05:53 +01:00
cyan317
8cea9ee7e2 Fix empty currency (#1481) 2024-06-21 11:54:53 +01:00
Michael Legleux
9d299a1948 Make sure release commit signed and tagged (#1468)
Best practices, good housekeeping and help me look stuff up.

Looks like the annotated tag train has derailed. This is an attempt to
enforce it.
2024-06-20 15:30:25 -07:00
cyan317
132ec743e1 Add support for ltNEGATIVE_UNL (#1474)
Fixed #1369
2024-06-20 11:19:42 +01:00
github-actions[bot]
bdb72f91a2 [CI] clang-tidy auto fixes (#1478)
Fixes #1477. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-06-20 09:13:24 +01:00
Michael Legleux
0cdc24023f Ignore checking formatting if no formatted files are staged (#1469)
I'm constantly harassed to follow the rules when I'm not doing anything
relevant.

This is an attempt to ameliorate that rather than `--no-verify` or just
disabling hooks altogether. 🍄 ☁️

Somebody might want to confirm `basename` is included with macOS.
2024-06-18 10:11:06 -07:00
Peter Chen
c795cf371a Fix base_asset value in getAggregatePrice (#1467)
Fixes #1372
2024-06-18 09:04:33 -04:00
Peter Chen
e135aa49d5 Create generate free port class to avoid conflicting ports (#1439)
Fixes #1317
2024-06-18 11:29:05 +01:00
cyan317
5ba08b1d26 Improve etl check (#1465)
Fix #1444
2024-06-17 11:52:39 +01:00
github-actions[bot]
37cd79ceb0 [CI] clang-tidy auto fixes (#1464)
Fixes #1463. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-06-17 09:18:35 +01:00
Sergey Kuznetsov
1334bd05d9 Add forwarding timeout option (#1462)
Fixes #1454.
2024-06-14 16:53:08 +01:00
Peter Chen
437ea7bf98 Fix quoteAsset value in getAggregatePrice (#1449)
Fixes #1373
2024-06-12 11:16:11 -04:00
github-actions[bot]
f9f3bc928e [CI] clang-tidy auto fixes (#1459)
Fixes #1458. Please review and commit clang-tidy fixes.

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sergey Kuznetsov <skuznetsov@ripple.com>
2024-06-12 11:25:16 +01:00
cyan317
aa1f3efda2 Add trouble shooting md (#1455)
Fix #1284
2024-06-12 10:34:49 +01:00
github-actions[bot]
a6d21c1a02 [CI] clang-tidy auto fixes (#1457)
Fixes #1456. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-06-12 10:34:13 +01:00
cyan317
49b80c7ad8 Support string type integer for oracle_document_id (#1448)
Fix #1420
2024-06-12 10:31:32 +01:00
Sergey Kuznetsov
56ab943be5 Add option to set X-User header value for forwarded requests (#1425)
Fixes #1422.
2024-06-11 17:59:10 +01:00
Sergey Kuznetsov
9d3b4f0313 Add assertion to process method (#1453)
Also adjust clangd so it doesn't bother us with header files about `expected`.
2024-06-11 13:10:08 +01:00
Alex Kremer
42c970a2a3 Forward feature RPC (#1440)
Fixes #1436 

This is a temporary implementation of the `feature` RPC that will always
return `noPermission` iff `vetoed` is set.
If `vetoed` isn't specified, Clio will always forward the request to
`rippled` instead.

In the future, #1131 will implement a Clio-native `feature` RPC. This
requires specific support from `libxrpl` side and that is not going to
be available till at least 2.2.1, hence the temporary forwarding.

It would be great to review the error message and code so that we pick
the right one from the start.

Co-authored-by: Sergey Kuznetsov <skuznetsov@ripple.com>
2024-06-11 10:51:03 +01:00
Peter Chen
1125b09611 Allow tlsv13 in Clio (#1447)
Fixes #1419

Co-authored-by: Sergey Kuznetsov <skuznetsov@ripple.com>
2024-06-10 11:52:53 -04:00
Sergey Kuznetsov
ce94f0f513 Update libxrpl to 2.2.0 (#1446) 2024-06-10 14:52:35 +01:00
Peter Chen
d39fb20022 Update build documentation to address encountered errors (#1442) 2024-06-04 10:05:27 -04:00
Peter Chen
967b85ca33 Change ledgerInfo and replace with ledgerHeader (#1426)
Fixes [#1396](https://github.com/XRPLF/clio/issues/1396)
2024-06-03 13:11:31 -04:00
Peter Chen
55b8134e6d Comment out precommit hook for Doc (#1432)
Temporary Fix for #1431
2024-05-30 20:17:18 +01:00
Alex Kremer
66e8a65732 Flow to check new libXRPL version (#1433) 2024-05-29 17:31:15 +01:00
Peter Chen
067dd72aed Move NameGenerator to util (#1428)
Fixes for #876
2024-05-29 09:08:27 -04:00
Peter Chen
da5bf5c441 Fix invalid syntax in example-config.json (#1423)
remove "." fixes syntax for example-config; runs with ./clio_server
2024-05-24 09:22:08 -04:00
Sergey Kuznetsov
ff4bc5b0aa Load tool (#1421)
Simple tool to put a specific load on clio.
2024-05-24 13:01:36 +01:00
Alex Kremer
c56998477c Upgrade libxrpl to 2.2.0-rc3 (#1417)
Fixes #1414
2024-05-21 13:56:53 +01:00
cyan317
df17b429c5 Fix: Duplicate messages when subscribe both accounts and proposed_accounts (#1415)
Fix #1134
2024-05-21 09:04:46 +01:00
Michael Legleux
36c6caa7c0 Date of commit in version string; No git hash in release version (#1409)
A release's version string should be a signed annotated tag which Clio
has generally been following.

Uses the date of the commit since that seems like a more useful item to
track to not have identical source builds have different version
strings.
2024-05-17 14:40:41 -07:00
Alex Kremer
642aaf8902 Upgrade to xrpl 2.2.0-rc2 with temporary fixes (#1413)
For #1414
2024-05-17 18:57:37 +01:00
github-actions[bot]
99400d74ba [CI] clang-tidy auto fixes (#1412)
Fixes #1411. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-05-16 10:47:06 +01:00
Sergey Kuznetsov
da10535bc0 Cover LoadBalancer with tests (#1394)
Fixes #680. Fixes #1222.
2024-05-15 14:02:36 +01:00
Sergey Kuznetsov
f74b89cc8d Push CI docker image on manual workflow run (#1408) 2024-05-14 16:43:01 +01:00
github-actions[bot]
d229ff1811 [CI] clang-tidy auto fixes (#1407)
Fixes #1406. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-05-14 09:12:23 +01:00
cyan317
3a6390caf5 Fix bug: api version change does not affect the subscribed session (#1404)
Fix #1133
2024-05-13 09:12:35 +01:00
Alex Kremer
a8c90a31d9 Fix typo in nightly (#1403) 2024-05-09 04:10:26 +01:00
Alex Kremer
531b647b1e Attempt to fix nightly build (#1398)
Fixes #1363
2024-05-09 03:15:36 +01:00
Alex Kremer
cbc856b190 Separate unit tests and integration tests (#1393)
Fixes #1391
2024-05-07 15:12:48 +01:00
cyan317
98ef83d470 Fix missing tx from account_tx (#1390)
Fix #1389
Since our selectAccountTxForward is no longer inclusive, we should adjust this place.
2024-05-03 10:34:52 +01:00
Alex Kremer
d5ed0cff77 Use LLVM 18 tooling (#1382)
Fixes #1381
2024-05-03 09:57:16 +01:00
Alex Kremer
b18d73eef0 Combine requestStop and cancel as abort (#1379)
Fixes #1367
2024-05-01 15:34:59 +01:00
github-actions[bot]
8f47128424 [CI] clang-tidy auto fixes (#1385)
Fixes #1384. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-04-30 12:39:35 +01:00
Alex Kremer
b8cb60b7db Move docker CI to LLVM 18 tooling (#1381)
For #1343 

This is the first PR which only just meant to update our docker image on
docker hub.
2024-04-29 16:29:20 +01:00
Alex Kremer
0dcbbf9afa Static linkage (#1377)
Fixes #1300
2024-04-25 16:51:16 +01:00
Alex Kremer
c00342c792 Disable cache on missing data (#1368)
For #1354
2024-04-24 18:57:32 +01:00
github-actions[bot]
82b8316978 [CI] clang-tidy auto fixes (#1375)
Fixes #1374. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-04-24 09:04:53 +01:00
Sergey Kuznetsov
890e5bb4c2 Add signals handler (#1365)
For #442.
2024-04-23 14:14:15 +01:00
Alex Kremer
adadd70a05 Remove TTL usage (#1361)
Fixes #1322
2024-04-16 16:45:07 +01:00
Alex Kremer
e66cc7759e Remove full from ledger RPC forwarding (#1360)
Fixes #777
2024-04-15 18:53:14 +01:00
Alex Kremer
e931f27d3b Support clang 16 in docker CI (#1348)
Fixes #1175
2024-04-15 12:09:34 +01:00
cyan317
1fe42c88c3 Fix deletion script (#1357)
Because the slice has not done deep clone. All the _Data_ in
_deleteInfo_ will eventually refer to the last item in partition.

Please refer to "reuse slice session" from:
https://pkg.go.dev/github.com/gocql/gocql#hdr-Reusing_slices
2024-04-12 15:06:51 +01:00
Sergey Kuznetsov
6b9c8a12d0 Fix issue creation for nightly (#1355) 2024-04-12 12:25:28 +01:00
github-actions[bot]
3fa1df9117 [CI] clang-tidy auto fixes (#1352)
Fixes #1351. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
Co-authored-by: Sergey Kuznetsov <skuznetsov@ripple.com>
2024-04-12 11:45:20 +01:00
cyan317
25876aef9b Add detail to error log (#1353) 2024-04-12 10:56:37 +01:00
Sergey Kuznetsov
e744a5a8a9 Warn about deprecated fields (#1314)
Fixes #1251.
2024-04-11 15:23:59 +01:00
Alex Kremer
230212213b Remove Any wrapper (#1336)
Fixes #1174
2024-04-10 19:14:53 +01:00
Sergey Kuznetsov
7fcd3e48bd Turn off some clang-tidy checks (#1344) 2024-04-09 17:24:05 +01:00
github-actions[bot]
470585461d [CI] clang-tidy auto fixes (#1341)
Fixes #1340. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-04-09 11:36:17 +01:00
Sergey Kuznetsov
ec05b06370 Fix clang-tidy (#1339) 2024-04-09 11:03:34 +01:00
Sergey Kuznetsov
1b7d35b16c Create issue if nightly fails (#1333)
Fixes #1276.
2024-04-09 10:25:14 +01:00
Alex Kremer
6ff6956a53 Move to std::expected (#1288)
Fixes #1173
2024-04-08 16:13:33 +01:00
github-actions[bot]
dade122c6e [CI] clang-tidy auto fixes (#1335)
Fixes #1334. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-04-08 14:15:25 +01:00
cyan317
8095e6893d Change log level (#1319)
Fix #1205
2024-04-08 13:21:37 +01:00
Sergey Kuznetsov
48b0a7690c Fix docker update trigger (#1330) 2024-04-08 13:13:14 +01:00
Sergey Kuznetsov
7372442f3a Fix clang-tidy in CI (#1325)
Also removed old docker files and scripts.
2024-04-08 11:49:43 +01:00
cyan317
36a790d666 Implement get_aggregate_price (#1313)
Fix #1129
2024-04-03 13:26:56 +01:00
Sergey Kuznetsov
285dd008de Update ports to avoid conflicts (#1318)
Quick fix for conflicting ports. Better solution will be in #1317.
2024-04-03 12:52:00 +01:00
Alex Kremer
332b66dc4f Round 9 of gcc-12 attempts (#1305)
Fixes #1271
2024-03-28 13:45:07 +00:00
Alex Kremer
231556d850 Round 8 of gcc-12 attempts (#1301)
Fixes #1271
2024-03-28 03:22:03 +00:00
Alex Kremer
d2439cc8a9 Round 7 of gcc-12 attempts (#1298)
Fixes #1271
2024-03-27 16:00:46 +00:00
Alex Kremer
03d6b1a3b6 Round 6 of gcc-12 attempts (#1297)
Fixes #1271
2024-03-27 15:07:32 +00:00
Alex Kremer
ebdcca51a6 Round 5 of gcc-12 attempts (#1295)
Fixes #1271
2024-03-26 13:25:45 +00:00
Alex Kremer
7e5f94c3fd Round 4 of gcc-12 attempts (#1294)
Fixes #1271
2024-03-26 12:29:46 +00:00
Alex Kremer
1be4d5186d Round 3 of gcc-12 attempts (#1293)
Fixes #1271
2024-03-26 12:06:30 +00:00
Alex Kremer
8240508d19 Second attempt at gcc 12.3 (#1292)
Fixes #1271
2024-03-25 17:25:14 -07:00
Alex Kremer
03a01e55f9 Upgrade CI docker image to gcc-12 (#1289)
Fixes #1271
2024-03-25 18:19:34 +00:00
github-actions[bot]
828fea6e30 [CI] clang-tidy auto fixes (#1291)
Fixes #1290. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-03-25 08:55:57 +00:00
Alex Kremer
27a422369d Add support for Price Oracle in ledger_entry (#1287)
Fixes #1277
2024-03-22 16:51:06 +00:00
github-actions[bot]
b7d0fc0200 [CI] clang-tidy auto fixes (#1286)
Fixes #1285. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-03-21 09:39:59 +00:00
Maria Shodunke
6e8de0b64e Improve developer docs + formatting (#1278)
Fixes #1235.

Signed-off-by: Sergey Kuznetsov <skuznetsov@ripple.com>
Co-authored-by: Sergey Kuznetsov <skuznetsov@ripple.com>
2024-03-20 17:02:41 +00:00
Alex Kremer
8e75818b4f Support fields from XRPFees amendment (#1282)
Fixes #1280
2024-03-20 16:34:39 +00:00
Sergey Kuznetsov
27db183aff Fix conan on macos in CI (#1283) 2024-03-20 15:39:19 +00:00
Sergey Kuznetsov
d9362311ca Run tests in container for nightly workflow (#1281) 2024-03-20 15:02:49 +00:00
Sergey Kuznetsov
9d91fddce5 Make assertions to be printed even when logger is off (#1275) 2024-03-19 13:06:17 +00:00
Sergey Kuznetsov
6d9446bf87 Fix tests (#1274)
Fix tests broken by #1256.
2024-03-19 11:38:22 +00:00
github-actions[bot]
94706bfff9 [CI] clang-tidy auto fixes (#1270)
Fixes #1269. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-03-15 08:59:03 +00:00
cyan317
a1243da956 Cache loading update (#1254)
Fix #1199
2024-03-14 16:42:57 +00:00
Alex Kremer
8004a0e0ff Remove mentions of release docs from workflow (#1268)
Fixes #1239
2024-03-14 15:45:30 +00:00
Maria Shodunke
6978431c6a Update README.md with developer docs link (#1267)
Fixes #1252
2024-03-14 15:09:59 +00:00
mounikakun
8211440711 Add note on credentials to issue templates (#1263) 2024-03-14 14:42:40 +00:00
Maria Shodunke
041608b243 Add instructions on how to generate Doxygen docs (#1208)
Fixes #1194
2024-03-14 14:19:22 +00:00
Sergey Kuznetsov
e83dfcbcc3 Export etl metrics to prometheus (#1256)
Fixes #1248.
2024-03-14 11:37:31 +00:00
cyan317
010538d6fe Add 'oracle' to ledger object filter (#1264)
Fix #1265
2024-03-14 11:35:01 +00:00
Alex Kremer
c17cc37c1c Upgrade actions to newer versions (#1262)
Fixes #1245
2024-03-14 10:49:43 +00:00
Alex Kremer
9fa1740146 Fetch lfs files when generating docs (#1260)
Extra for #1258
2024-03-12 23:44:31 +00:00
Alex Kremer
7312b4af80 Add git-lfs to docker CI image (#1259)
Fixes #1258
2024-03-12 18:30:48 +00:00
Alex Kremer
c3125b4b1c Configure git-lfs (#1210) 2024-03-12 17:40:13 +00:00
Sergey Kuznetsov
43ced3bf9d Add debug symbols for all targets (#1250) 2024-03-11 13:35:52 +00:00
Sergey Kuznetsov
ecb7cdae88 Add workdir to safe directory in check format (#1247)
Fixes #1246.
2024-03-07 18:53:50 +00:00
Sergey Kuznetsov
7b84fab076 Add clean up workdir (#1244)
Fixes #1095.
2024-03-07 17:22:02 +00:00
Sergey Kuznetsov
74455f5b99 Fix forwarding bug and float support for config (#1243) 2024-03-07 14:39:25 +00:00
Sergey Kuznetsov
d47f3b71bd Refactor cmake (#1231)
Fixes #920.
2024-03-06 16:29:26 +00:00
github-actions[bot]
1842f26826 [CI] clang-tidy auto fixes (#1241)
Fixes #1240. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-03-06 10:09:07 +00:00
Alex Kremer
ee8a9f5ed0 Upgrade libxrpl to 2.2.0-b1 (#1237)
Fixes #1236
2024-03-05 23:46:35 +00:00
Sergey Kuznetsov
8dbdb9d8e3 Fix documentation comment (#1234) 2024-03-05 19:25:38 +00:00
Alex Kremer
644a1fdb43 Attempt at gh-pages deploy (#1233)
For #889
2024-03-05 18:13:22 +00:00
Sergey Kuznetsov
58a1833cf2 Add forwarding cache (#1204)
Fixes #51.
2024-03-05 18:09:29 +00:00
Alex Kremer
dc8d1658e3 Build docs and upload to gh-pages (#1232)
For #889
2024-03-05 17:08:35 +00:00
Alex Kremer
73d427c1cb Automatically detect missing doxygen comments (#1226)
Fixes #1216
2024-03-05 12:37:16 +00:00
github-actions[bot]
c7b637b3f3 [CI] clang-tidy auto fixes (#1228)
Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-03-04 09:16:08 +00:00
Alex Kremer
51150d8474 Add doxygen to CI docker image (#1225)
For #1216
2024-03-01 17:00:27 +00:00
Alex Kremer
a74970b81e Add missing doxygen comments (#1223)
Fixes #1218
2024-03-01 15:58:18 +00:00
Sergey Kuznetsov
b3e63b2491 Add a note about pre-commit hook dependencies (#1220) 2024-02-28 16:32:32 +00:00
cyan317
a7f61c3e68 remove _ from public member (#1217) 2024-02-27 15:56:01 +00:00
Alex Kremer
862fc48924 Use doxygen-awesome theme (#1214)
For #889
2024-02-27 15:22:44 +00:00
Sergey Kuznetsov
98ebc92bff Add cmake-format to precommit hook (#1215)
Fixes #1067.
2024-02-27 11:40:23 +00:00
Sergey Kuznetsov
e98e74d768 Add cmake-format to docker and mac runners (#1213)
For #1067
2024-02-26 23:08:31 +00:00
Sergey Kuznetsov
c94f55b7eb Add doc for Random and TerminationHandler (#1206)
Fixes #1010
2024-02-26 23:07:05 +00:00
Sergey Kuznetsov
0f5da4414c Turn on macOS runners in CI (#1185) 2024-02-23 13:22:03 +00:00
Alex Kremer
33700e3305 Update issue templates (#1202)
Fixes #1203
2024-02-22 13:39:35 +00:00
Alex Kremer
a7a1a724e2 Fix logo backdrop and alignment (#1198) 2024-02-21 15:17:08 +00:00
github-actions[bot]
656ab286b6 [CI] clang-tidy auto fixes (#1197)
Fixes #1196
2024-02-21 13:50:46 +00:00
Alex Kremer
190b5c6a37 Rewrite cache loader to async framework (#1193)
Fixes #1188
2024-02-20 19:24:49 +00:00
Maria Shodunke
27fe35a2d1 Cleanup location of docs and example files (#1195) 2024-02-20 18:40:03 +00:00
Sergey Kuznetsov
62f55a7dce Refactor source (#1171)
For #51
2024-02-20 14:07:27 +00:00
Maria Shodunke
26d663c0be Split README into separate files (#1191)
Fixes #1059
2024-02-20 11:52:32 +00:00
github-actions[bot]
9b0dab602f [CI] clang-tidy auto fixes (#1190) 2024-02-16 10:21:59 +00:00
Alex Kremer
97a63db51d Basic execution context framework (#1004)
Fixes #1187
2024-02-15 20:36:00 +00:00
Sergey Kuznetsov
75c6ad5c8d Improve Prometheus section in Readme (#1182) 2024-02-15 17:32:46 +00:00
github-actions[bot]
52d6d2c54f [CI] clang-tidy auto fixes (#1177)
Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-02-15 09:10:54 +00:00
cyan317
b89cdb26f2 Use json value_to<string> to do the string convert (#1172)
Fix #953
2024-02-14 13:26:00 +00:00
Alex Kremer
cce695c570 Rename all detail to impl (#1168)
Fixes #1084
2024-02-12 11:54:41 +00:00
Alex Kremer
cea9c41a88 Upload codecov in separate workflow (#1166)
Fixes #1165
2024-02-08 16:20:54 +00:00
Sergey Kuznetsov
8575f786a8 Comment out macOS CI (#1164) 2024-02-07 15:57:50 +00:00
Alex Kremer
08b02c64cb Fix amm_info amounts in output map to user input (#1162)
Fixes #1156
2024-02-06 21:12:57 +00:00
Alex Kremer
b358649cf9 Add missing include (#1161)
Fixes #1160
2024-02-06 12:35:35 +00:00
github-actions[bot]
6bd72355db [CI] clang-tidy auto fixes (#1159)
Fixes #1158
2024-02-06 12:08:44 +00:00
Alex Kremer
a1699d7484 Rename headers to .hpp (#1154)
Fixes #1153
2024-02-05 13:10:50 +00:00
Sergey Kuznetsov
957aadd25a Requests library (#1140)
For #51.

First part of improving forwarding - library for easy async requests.
2024-02-05 11:35:10 +00:00
Alex Kremer
8f89a5913d Fix paging bug in range deletion tool (#1150) 2024-02-02 16:29:17 +00:00
github-actions[bot]
ecfe5e84e5 [CI] clang-tidy auto fixes (#1152)
Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-02-02 09:34:08 +00:00
Alex Kremer
03c0940649 Fix most includes in headers (#1149)
Fixes #1146
2024-02-01 12:49:11 +00:00
cyan317
dc5aacfe39 Side chain ledgerentry (#1144)
Fix #861
2024-02-01 09:12:24 +00:00
Alex Kremer
3fda74e3f7 Cassandra data removal tool (#1142)
Fixes #1143
2024-01-30 13:27:42 +00:00
Santiago Reig
df27c4e629 Forward server_state to rippled (#1135)
Fixes #1138.
2024-01-25 15:56:31 +00:00
cyan317
37ee74c293 Fix bookbase (#1139)
Fix #1137
2024-01-25 14:01:01 +00:00
Bronek Kozicki
ec335176bb Fixes for gcc 13 (#1128)
* Add include <cstdint> where needed
* Add .devcontainer to .gitignore
* Document gcc-13 compilation fix for rocksdb
2024-01-25 12:01:11 +00:00
cyan317
ab33b26ec4 Fix ETL race condition problem (#1132)
Wait for previous publish being finished to switch to writer.
2024-01-24 16:55:08 +00:00
cyan317
28c8fa2a9a Ledger entry type filter for account_objects and ledger_data (#1116)
Fix #1109
2024-01-17 17:29:59 +00:00
Alex Kremer
12bbed194c Rerun clang tidy on fix merge (#1124) 2024-01-16 18:14:09 +00:00
Alex Kremer
1fa09006f8 Trigger clang-tidy restart via git commands (#1123) 2024-01-16 16:44:35 +00:00
Alex Kremer
e3b6fc4bd4 [CI] clang-tidy auto fixes (manual) (#1122)
Fixes #1121
2024-01-16 16:13:52 +00:00
Alex Kremer
34594ff8c0 [CI] clang-tidy auto fixes (FAKE4) (#1120) 2024-01-16 14:49:28 +00:00
Alex Kremer
40eeb57920 Add permission for actions (#1119) 2024-01-16 14:44:04 +00:00
Alex Kremer
3eb36c049c [CI] clang-tidy auto fixes (FAKE3) (#1118) 2024-01-16 14:32:40 +00:00
Alex Kremer
81602e8ae7 Change to running workflow via gh (#1117) 2024-01-16 14:27:21 +00:00
Alex Kremer
0cef9e0620 [CI] clang-tidy auto fixes (FAKE2) (#1115) 2024-01-16 12:50:07 +00:00
Alex Kremer
81d1b30607 Use contains syntax to grep for title (#1114) 2024-01-16 12:46:02 +00:00
Alex Kremer
923d021c83 [CI] clang-tidy auto fixes (FAKE) (#1113) 2024-01-16 12:36:29 +00:00
Alex Kremer
cd2b09ffb7 Use contains syntax to grep for label (#1112) 2024-01-16 12:28:48 +00:00
github-actions[bot]
3c62a1f42c [CI] clang-tidy auto fixes (#1111)
Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-01-16 09:19:57 +00:00
cyan317
f97e0690c8 Account tx type improvement (#1108)
Fix #1090
2024-01-16 09:18:47 +00:00
Alex Kremer
eeaccbabd9 Add attempt at auto rerun functionality (#1105)
Attempting to refactor clang-tidy as an action and reuse it from two workflows.
2024-01-15 19:48:59 +00:00
Alex Kremer
13d2d4e2ca Enable DB tests via ScyllaDB service (#1103)
Fixes #1092
2024-01-15 12:09:00 +00:00
cyan317
350a45e7e2 Fix unstable unittest (#1102)
Properly mock wsbase
2024-01-15 12:06:14 +00:00
Alex Kremer
ce86572274 Fix forwarded flag placement (#1101)
Fixes #1091
2024-01-12 14:02:50 +00:00
github-actions[bot]
ac97788db8 [CI] clang-tidy auto fixes (#1099)
Fixes #1098. Fixes #1100.

---------

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
Co-authored-by: Sergey Kuznetsov <skuznetsov@ripple.com>
2024-01-12 12:29:51 +00:00
Alex Kremer
2893492569 Remove legacy hook (#1097) 2024-01-11 17:49:00 +00:00
Alex Kremer
b63e98bda0 Update libxrpl to 2.0.0 (#1096) 2024-01-11 16:36:39 +00:00
Alex Kremer
f4df5c2185 Implement amm_info handler (#1060)
Fixes #283
2024-01-11 15:57:53 +00:00
github-actions[bot]
93d5c12b14 [CI] clang-tidy auto fixes (#1094)
Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-01-11 09:37:54 +00:00
cyan317
2514b7986e Fix unstable test (#1089) 2024-01-10 16:56:57 +00:00
cyan317
d30e63d49a add api_version to response (#1088)
Fix #1020
2024-01-09 15:53:09 +00:00
github-actions[bot]
61f1e0853d [CI] clang-tidy auto fixes (#1086)
Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-01-09 09:35:42 +00:00
cyan317
eb1831c489 New subscription manager (#1071)
Fix #886
2024-01-08 14:45:57 +00:00
Shi Cheng
07bd4b0760 upload clio_server artificat (#1083) 2024-01-08 10:49:53 +00:00
Alex Kremer
e26a1e37b5 Improve batching code (#1079)
Fixes #1077
2024-01-05 15:44:30 +00:00
Sergey Kuznetsov
e89640bcfb Add debug cache to ci (#1078)
Fixes #1066
2024-01-05 10:59:26 +00:00
github-actions[bot]
ae135759ef [CI] clang-tidy auto fixes (#1081)
Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-01-05 09:31:56 +00:00
Alex Kremer
28188aa0f9 Add batching to writes (#1076)
Fixes #1077
2024-01-04 15:17:15 +00:00
Sergey Kuznetsov
af485a0634 Add gcovr to CI docker image (#1072)
For #1066
2024-01-03 16:53:26 +00:00
github-actions[bot]
b609298870 [CI] clang-tidy auto fixes (#1070)
Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
2024-01-03 08:53:47 +00:00
Alex Kremer
d077093a8d Simplify backend mock access for unittests (#1062) 2024-01-02 13:35:57 +00:00
Alex Kremer
781f3b3c48 Bump libxrpl version to 2.0.0-rc6 (#1061)
Fixes #1063
2023-12-23 20:28:07 +00:00
Bronek Kozicki
a8bae96ad4 Add coverage_report target (#1058) 2023-12-21 15:08:32 +00:00
Bronek Kozicki
fe9649d872 Fix c++20 requires syntax (#1057) 2023-12-19 20:52:53 +00:00
Sergey Kuznetsov
431b5f5ab8 Add ccache mention in docs (#1055) 2023-12-18 16:43:15 +00:00
Sergey Kuznetsov
b1dc2775fb Remove exception text from error sending (#1048)
Fixes #1037
2023-12-13 16:30:16 +00:00
Elliot Lee
dd35a7cfd2 Update CONTRIBUTING.md (#1047) 2023-12-13 15:47:07 +00:00
github-actions[bot]
a9d685d5c0 [CI] clang-tidy auto fixes (#1046)
Fixes #1045.
2023-12-13 15:08:53 +00:00
Sergey Kuznetsov
6065d324b5 Remove push-to-fork in clang-tidy workflow 2023-12-13 14:23:21 +00:00
Sergey Kuznetsov
fe7b5fe18f Another try to sign commit in CI (#1043) 2023-12-13 13:54:28 +00:00
Sergey Kuznetsov
1c663988f5 Use different token to sign commits (#1041)
For #884
2023-12-13 13:23:24 +00:00
Sergey Kuznetsov
d11d566121 Fix wrong image (#1040)
For #884
2023-12-13 12:49:44 +00:00
Sergey Kuznetsov
a467cb2526 Add signing clang-tidy commit (#1036)
Fixes #884
2023-12-12 18:04:40 +00:00
Sergey Kuznetsov
f62e36dc94 Add status to readme (#1035)
For #844
2023-12-12 17:07:51 +00:00
Sergey Kuznetsov
d933ce2a29 Use clio_ci docker image (#1033)
Fixes #884
2023-12-12 16:03:08 +00:00
Sergey Kuznetsov
db751e3807 Make root default user in CI image (#1034)
For #884
2023-12-12 14:05:30 +00:00
Sergey Kuznetsov
3c4a8f0cfb Add conan setup into image (#1032)
For #884
2023-12-12 12:00:57 +00:00
Sergey Kuznetsov
397ce97175 Fix docker publish (#1027)
Fixes docker build for #884
2023-12-11 17:08:42 +00:00
Sergey Kuznetsov
ac6ad13f6c Fix release notes (#1022)
Fixes release notes for #884
2023-12-11 15:52:36 +00:00
Sergey Kuznetsov
7d1d1749bc Another fix of clang-tidy workflow (#1026)
Another fix for clang-tidy nightly check for #884
2023-12-11 15:11:30 +00:00
Sergey Kuznetsov
acf359d631 Fix permissions issue for clang-tidy (#1023)
Fixes issue creation for clang-tidy nightly checks for #884
2023-12-11 11:53:22 +00:00
Sergey Kuznetsov
a34e107b86 Add nightly builds (#1013)
Partially fixes #884.
Adds:
- Docker image for CI on Linux
- Nightly builds without cache and releases
- Nightly clang-tidy checks
- Fix typos in .clang-tidy
2023-12-08 18:22:22 +00:00
cyan317
b886586de3 Unify ledger_index type (#1019)
Fix #1014
2023-12-08 14:20:40 +00:00
cyan317
a57abb15a3 Fix example json format (#1018) 2023-12-05 12:45:01 +00:00
cyan317
c87586a265 Fix compiler error: header missing (#1016) 2023-12-04 13:45:48 +00:00
cyan317
8172670c93 Add close_time_iso to transaction stream (#1012)
Fix #1011
2023-11-30 13:32:50 +00:00
Sergey Kuznetsov
3fdcd3315b Make assert write to both log file and cerr (#1009) 2023-11-30 10:33:52 +00:00
cyan317
dd018f1c5e Fix ledger close_time_iso(#1008)
Fix #1007
2023-11-29 18:04:12 +00:00
Sergey Kuznetsov
c2b462da75 Fix paste on mac (#1006) 2023-11-29 15:41:45 +00:00
Sergey Kuznetsov
252920ec57 Fix CI 2023-11-29 15:24:50 +00:00
Sergey Kuznetsov
9ef6801c55 Fix git hook 2023-11-29 15:24:50 +00:00
Sergey Kuznetsov
24c562fa2a Add hostname resolving to dosguard (#1000)
Fixes #983.

Cassandra, ETL sorces and cache already support hostname resolving.

Also added config to show missing includes by clangd.
2023-11-29 15:13:40 +00:00
Sergey Kuznetsov
35f119a268 Switch to llvm 17 tools (#1002)
Fixes #952
2023-11-28 20:09:58 +00:00
Sergey Kuznetsov
1be368dcaf Fix wrong assert (#1003) 2023-11-28 14:06:17 +00:00
cyan317
a5fbb01299 fix (#999)
Fix #985
2023-11-24 16:01:27 +00:00
Sergey Kuznetsov
3b75d88a35 Add server_definitions to forwarding set (#996)
Fixes #942
2023-11-22 16:21:03 +00:00
cyan317
f0224581a5 Fix nfts_by_issuer's DB issue (#997)
Fix #988
2023-11-22 15:55:46 +00:00
Sergey Kuznetsov
b998473673 Add compression and histogram metric type for Prometheus (#987)
Fixes #932
Also fixes #966

Decided not to add Summary type because it has the same functionality as Histogram but makes more calculations on client side (Clio side). See https://prometheus.io/docs/practices/histograms for detailed comparison.
2023-11-22 12:55:06 +00:00
Sergey Kuznetsov
8ebe2d6a80 Add assertion that terminate clio (#994)
Fixes #893.

Also added termination handler to print backtrace on crash, so fixes #929.
2023-11-21 13:06:04 +00:00
Sergey Kuznetsov
3bab90ca7a Comment out gcc-only checks (#995) 2023-11-21 09:53:08 +00:00
cyan317
74660aebf1 binary (#993)
Fix #984
2023-11-20 17:53:34 +00:00
cyan317
db08de466a Unify json (#992)
Fix #962
2023-11-20 13:09:28 +00:00
1087 changed files with 143090 additions and 46769 deletions

View File

@@ -1,5 +1,5 @@
---
Language: Cpp
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: BlockIndent
AlignConsecutiveAssignments: false
@@ -22,30 +22,31 @@ BreakBeforeBinaryOperators: false
BreakBeforeBraces: WebKit
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
ColumnLimit: 120
CommentPragmas: "^ IWYU pragma:"
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros: [ Q_FOREACH, BOOST_FOREACH ]
ForEachMacros: [Q_FOREACH, BOOST_FOREACH]
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<(BeastConfig)'
Priority: 0
- Regex: '^<(ripple)/'
Priority: 2
- Regex: '^<(boost)/'
Priority: 3
- Regex: '.*'
Priority: 4
IncludeIsMainRegex: '$'
- Regex: '^".*"$'
Priority: 1
- Regex: '^<.*\.(h|hpp)>$'
Priority: 2
- Regex: "^<.*>$"
Priority: 3
- Regex: ".*"
Priority: 4
IncludeIsMainRegex: "$"
IndentCaseLabels: true
IndentFunctionDeclarationAfterType: false
IndentWidth: 4
IndentWidth: 4
IndentWrappedFunctionNames: false
IndentRequiresClause: true
RequiresClausePosition: OwnLine
@@ -62,18 +63,18 @@ PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
QualifierAlignment: Right
ReflowComments: true
SortIncludes: true
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 8
UseTab: Never
Standard: Cpp11
TabWidth: 8
UseTab: Never

View File

@@ -1,15 +1,22 @@
---
Checks: '-*,
Checks: "-*,
bugprone-argument-comment,
bugprone-assert-side-effect,
bugprone-bad-signal-to-kill-thread,
bugprone-bool-pointer-implicit-conversion,
bugprone-casting-through-void,
bugprone-chained-comparison,
bugprone-compare-pointer-to-member-virtual-function,
bugprone-copy-constructor-init,
bugprone-crtp-constructor-accessibility,
bugprone-dangling-handle,
bugprone-dynamic-static-initializers,
bugprone-empty-catch,
bugprone-fold-init-type,
bugprone-forward-declaration-namespace,
bugprone-inaccurate-erase,
bugprone-inc-dec-in-conditions,
bugprone-incorrect-enable-if,
bugprone-incorrect-roundings,
bugprone-infinite-loop,
bugprone-integer-division,
@@ -20,11 +27,18 @@ Checks: '-*,
bugprone-misplaced-pointer-arithmetic-in-alloc,
bugprone-misplaced-widening-cast,
bugprone-move-forwarding-reference,
bugprone-multi-level-implicit-pointer-conversion,
bugprone-multiple-new-in-one-expression,
bugprone-multiple-statement-macro,
bugprone-no-escape,
bugprone-non-zero-enum-to-bool-conversion,
bugprone-optional-value-conversion,
bugprone-parent-virtual-call,
bugprone-pointer-arithmetic-on-polymorphic-object,
bugprone-posix-return,
bugprone-redundant-branch-condition,
bugprone-reserved-identifier,
bugprone-return-const-ref-from-parameter,
bugprone-shared-ptr-array-mismatch,
bugprone-signal-handler,
bugprone-signed-char-misuse,
@@ -44,7 +58,9 @@ Checks: '-*,
bugprone-suspicious-realloc-usage,
bugprone-suspicious-semicolon,
bugprone-suspicious-string-compare,
bugprone-suspicious-stringview-data-usage,
bugprone-swapped-arguments,
bugprone-switch-missing-default-case,
bugprone-terminating-continue,
bugprone-throw-keyword-missing,
bugprone-too-small-loop-variable,
@@ -52,18 +68,27 @@ Checks: '-*,
bugprone-undelegated-constructor,
bugprone-unhandled-exception-at-new,
bugprone-unhandled-self-assignment,
bugprone-unique-ptr-array-mismatch,
bugprone-unsafe-functions,
bugprone-unused-local-non-trivial-variable,
bugprone-unused-raii,
bugprone-unused-return-value,
bugprone-use-after-move,
bugprone-virtual-near-miss,
cppcoreguidelines-init-variables,
cppcoreguidelines-prefer-member-initializer,
cppcoreguidelines-misleading-capture-default-by-value,
cppcoreguidelines-no-suspend-with-lock,
cppcoreguidelines-pro-type-member-init,
cppcoreguidelines-pro-type-static-cast-downcast,
cppcoreguidelines-rvalue-reference-param-not-moved,
cppcoreguidelines-use-default-member-init,
cppcoreguidelines-virtual-class-destructor,
hicpp-ignored-remove-result,
llvm-namespace-comment,
misc-const-correctness,
misc-definitions-in-headers,
misc-header-include-cycle,
misc-include-cleaner,
misc-misplaced-const,
misc-redundant-expression,
misc-static-assert,
@@ -75,10 +100,15 @@ Checks: '-*,
modernize-make-shared,
modernize-make-unique,
modernize-pass-by-value,
modernize-type-traits,
modernize-use-designated-initializers,
modernize-use-emplace,
modernize-use-equals-default,
modernize-use-equals-delete,
modernize-use-override,
modernize-use-ranges,
modernize-use-starts-ends-with,
modernize-use-std-numbers,
modernize-use-using,
performance-faster-string-find,
performance-for-range-copy,
@@ -88,7 +118,8 @@ Checks: '-*,
performance-move-constructor-init,
performance-no-automatic-move,
performance-trivially-destructible,
readability-avoid-const-params-in-decls,
readability-avoid-nested-conditional-operator,
readability-avoid-return-with-void-value,
readability-braces-around-statements,
readability-const-return-type,
readability-container-contains,
@@ -96,23 +127,65 @@ Checks: '-*,
readability-convert-member-functions-to-static,
readability-duplicate-include,
readability-else-after-return,
readability-enum-initial-value,
readability-implicit-bool-conversion,
readability-inconsistent-declaration-parameter-name,
readability-identifier-naming,
readability-make-member-function-const,
readability-math-missing-parentheses,
readability-misleading-indentation,
readability-non-const-parameter,
readability-redundant-casting,
readability-redundant-declaration,
readability-redundant-inline-specifier,
readability-redundant-member-init,
readability-redundant-string-init,
readability-reference-to-constructed-temporary,
readability-simplify-boolean-expr,
readability-static-accessed-through-instance,
readability-static-definition-in-anonymous-namespace,
readability-suspicious-call-argument
'
readability-suspicious-call-argument,
readability-use-std-min-max
"
CheckOptions:
readability-braces-around-statements.ShortStatementLines: 2
readability-identifier-naming.MacroDefinitionCase: UPPER_CASE
readability-identifier-naming.ClassCase: CamelCase
readability-identifier-naming.StructCase: CamelCase
readability-identifier-naming.UnionCase: CamelCase
readability-identifier-naming.EnumCase: CamelCase
readability-identifier-naming.EnumConstantCase: CamelCase
readability-identifier-naming.ScopedEnumConstantCase: CamelCase
readability-identifier-naming.GlobalConstantCase: UPPER_CASE
readability-identifier-naming.GlobalConstantPrefix: "k"
readability-identifier-naming.GlobalVariableCase: CamelCase
readability-identifier-naming.GlobalVariablePrefix: "g"
readability-identifier-naming.ConstexprFunctionCase: camelBack
readability-identifier-naming.ConstexprMethodCase: camelBack
readability-identifier-naming.ClassMethodCase: camelBack
readability-identifier-naming.ClassMemberCase: camelBack
readability-identifier-naming.ClassConstantCase: UPPER_CASE
readability-identifier-naming.ClassConstantPrefix: "k"
readability-identifier-naming.StaticConstantCase: UPPER_CASE
readability-identifier-naming.StaticConstantPrefix: "k"
readability-identifier-naming.StaticVariableCase: UPPER_CASE
readability-identifier-naming.StaticVariablePrefix: "k"
readability-identifier-naming.ConstexprVariableCase: UPPER_CASE
readability-identifier-naming.ConstexprVariablePrefix: "k"
readability-identifier-naming.LocalConstantCase: camelBack
readability-identifier-naming.LocalVariableCase: camelBack
readability-identifier-naming.TemplateParameterCase: CamelCase
readability-identifier-naming.ParameterCase: camelBack
readability-identifier-naming.FunctionCase: camelBack
readability-identifier-naming.MemberCase: camelBack
readability-identifier-naming.PrivateMemberSuffix: _
readability-identifier-naming.ProtectedMemberSuffix: _
readability-identifier-naming.PublicMemberSuffix: ""
readability-identifier-naming.FunctionIgnoredRegexp: ".*tag_invoke.*"
bugprone-unsafe-functions.ReportMoreUnsafeFunctions: true
bugprone-unused-return-value.CheckedReturnTypes: ::std::error_code;::std::error_condition;::std::errc
misc-include-cleaner.IgnoreHeaders: '.*/(detail|impl)/.*;.*(expected|unexpected).*;.*ranges_lower_bound\.h;time.h;stdlib.h;__chrono/.*;fmt/chrono.h;boost/uuid/uuid_hash.hpp'
HeaderFilterRegex: '^.*/(src|unitests)/.*\.(h|hpp)$'
WarningsAsErrors: '*'
HeaderFilterRegex: '^.*/(src|tests)/.*\.(h|hpp)$'
WarningsAsErrors: "*"

13
.clangd Normal file
View File

@@ -0,0 +1,13 @@
CompileFlags:
Add: [-D__cpp_concepts=202002]
Diagnostics:
UnusedIncludes: Strict
MissingIncludes: Strict
Includes:
IgnoreHeader:
- ".*/(detail|impl)/.*"
- ".*expected.*"
- ".*ranges_lower_bound.h"
- "time.h"
- "stdlib.h"

245
.cmake-format.yaml Normal file
View File

@@ -0,0 +1,245 @@
_help_parse: Options affecting listfile parsing
parse:
_help_additional_commands:
- Specify structure for custom cmake functions
additional_commands:
foo:
flags:
- BAR
- BAZ
kwargs:
HEADERS: "*"
SOURCES: "*"
DEPENDS: "*"
_help_override_spec:
- Override configurations per-command where available
override_spec: {}
_help_vartags:
- Specify variable tags.
vartags: []
_help_proptags:
- Specify property tags.
proptags: []
_help_format: Options affecting formatting.
format:
_help_disable:
- Disable formatting entirely, making cmake-format a no-op
disable: false
_help_line_width:
- How wide to allow formatted cmake files
line_width: 120
_help_tab_size:
- How many spaces to tab for indent
tab_size: 2
_help_use_tabchars:
- If true, lines are indented using tab characters (utf-8
- 0x09) instead of <tab_size> space characters (utf-8 0x20).
- In cases where the layout would require a fractional tab
- character, the behavior of the fractional indentation is
- governed by <fractional_tab_policy>
use_tabchars: false
_help_fractional_tab_policy:
- If <use_tabchars> is True, then the value of this variable
- indicates how fractional indentions are handled during
- whitespace replacement. If set to 'use-space', fractional
- indentation is left as spaces (utf-8 0x20). If set to
- "`round-up` fractional indentation is replaced with a single"
- tab character (utf-8 0x09) effectively shifting the column
- to the next tabstop
fractional_tab_policy: use-space
_help_max_subgroups_hwrap:
- If an argument group contains more than this many sub-groups
- (parg or kwarg groups) then force it to a vertical layout.
max_subgroups_hwrap: 4
_help_max_pargs_hwrap:
- If a positional argument group contains more than this many
- arguments, then force it to a vertical layout.
max_pargs_hwrap: 6
_help_max_rows_cmdline:
- If a cmdline positional group consumes more than this many
- lines without nesting, then invalidate the layout (and nest)
max_rows_cmdline: 2
_help_separate_ctrl_name_with_space:
- If true, separate flow control names from their parentheses
- with a space
separate_ctrl_name_with_space: true
_help_separate_fn_name_with_space:
- If true, separate function names from parentheses with a
- space
separate_fn_name_with_space: false
_help_dangle_parens:
- If a statement is wrapped to more than one line, than dangle
- the closing parenthesis on its own line.
dangle_parens: true
_help_dangle_align:
- If the trailing parenthesis must be 'dangled' on its on
- "line, then align it to this reference: `prefix`: the start"
- "of the statement, `prefix-indent`: the start of the"
- "statement, plus one indentation level, `child`: align to"
- the column of the arguments
dangle_align: prefix
_help_min_prefix_chars:
- If the statement spelling length (including space and
- parenthesis) is smaller than this amount, then force reject
- nested layouts.
min_prefix_chars: 4
_help_max_prefix_chars:
- If the statement spelling length (including space and
- parenthesis) is larger than the tab width by more than this
- amount, then force reject un-nested layouts.
max_prefix_chars: 10
_help_max_lines_hwrap:
- If a candidate layout is wrapped horizontally but it exceeds
- this many lines, then reject the layout.
max_lines_hwrap: 2
_help_line_ending:
- What style line endings to use in the output.
line_ending: unix
_help_command_case:
- Format command names consistently as 'lower' or 'upper' case
command_case: canonical
_help_keyword_case:
- Format keywords consistently as 'lower' or 'upper' case
keyword_case: unchanged
_help_always_wrap:
- A list of command names which should always be wrapped
always_wrap: []
_help_enable_sort:
- If true, the argument lists which are known to be sortable
- will be sorted lexicographicall
enable_sort: true
_help_autosort:
- If true, the parsers may infer whether or not an argument
- list is sortable (without annotation).
autosort: true
_help_require_valid_layout:
- By default, if cmake-format cannot successfully fit
- everything into the desired linewidth it will apply the
- last, most aggressive attempt that it made. If this flag is
- True, however, cmake-format will print error, exit with non-
- zero status code, and write-out nothing
require_valid_layout: false
_help_layout_passes:
- A dictionary mapping layout nodes to a list of wrap
- decisions. See the documentation for more information.
layout_passes: {}
_help_markup: Options affecting comment reflow and formatting.
markup:
_help_bullet_char:
- What character to use for bulleted lists
bullet_char: "*"
_help_enum_char:
- What character to use as punctuation after numerals in an
- enumerated list
enum_char: .
_help_first_comment_is_literal:
- If comment markup is enabled, don't reflow the first comment
- block in each listfile. Use this to preserve formatting of
- your copyright/license statements.
first_comment_is_literal: false
_help_literal_comment_pattern:
- If comment markup is enabled, don't reflow any comment block
- which matches this (regex) pattern. Default is `None`
- (disabled).
literal_comment_pattern: null
_help_fence_pattern:
- Regular expression to match preformat fences in comments
- default= ``r'^\s*([`~]{3}[`~]*)(.*)$'``
fence_pattern: ^\s*([`~]{3}[`~]*)(.*)$
_help_ruler_pattern:
- Regular expression to match rulers in comments default=
- '``r''^\s*[^\w\s]{3}.*[^\w\s]{3}$''``'
ruler_pattern: ^\s*[^\w\s]{3}.*[^\w\s]{3}$
_help_explicit_trailing_pattern:
- If a comment line matches starts with this pattern then it
- is explicitly a trailing comment for the preceding
- argument. Default is '#<'
explicit_trailing_pattern: "#<"
_help_hashruler_min_length:
- If a comment line starts with at least this many consecutive
- hash characters, then don't lstrip() them off. This allows
- for lazy hash rulers where the first hash char is not
- separated by space
hashruler_min_length: 10
_help_canonicalize_hashrulers:
- If true, then insert a space between the first hash char and
- remaining hash chars in a hash ruler, and normalize its
- length to fill the column
canonicalize_hashrulers: true
_help_enable_markup:
- enable comment markup parsing and reflow
enable_markup: true
_help_lint: Options affecting the linter
lint:
_help_disabled_codes:
- a list of lint codes to disable
disabled_codes: []
_help_function_pattern:
- regular expression pattern describing valid function names
function_pattern: "[0-9a-z_]+"
_help_macro_pattern:
- regular expression pattern describing valid macro names
macro_pattern: "[0-9A-Z_]+"
_help_global_var_pattern:
- regular expression pattern describing valid names for
- variables with global (cache) scope
global_var_pattern: "[A-Z][0-9A-Z_]+"
_help_internal_var_pattern:
- regular expression pattern describing valid names for
- variables with global scope (but internal semantic)
internal_var_pattern: _[A-Z][0-9A-Z_]+
_help_local_var_pattern:
- regular expression pattern describing valid names for
- variables with local scope
local_var_pattern: "[a-z][a-z0-9_]+"
_help_private_var_pattern:
- regular expression pattern describing valid names for
- privatedirectory variables
private_var_pattern: _[0-9a-z_]+
_help_public_var_pattern:
- regular expression pattern describing valid names for public
- directory variables
public_var_pattern: "[A-Z][0-9A-Z_]+"
_help_argument_var_pattern:
- regular expression pattern describing valid names for
- function/macro arguments and loop variables.
argument_var_pattern: "[a-z][a-z0-9_]+"
_help_keyword_pattern:
- regular expression pattern describing valid names for
- keywords used in functions or macros
keyword_pattern: "[A-Z][0-9A-Z_]+"
_help_max_conditionals_custom_parser:
- In the heuristic for C0201, how many conditionals to match
- within a loop in before considering the loop a parser.
max_conditionals_custom_parser: 2
_help_min_statement_spacing:
- Require at least this many newlines between statements
min_statement_spacing: 1
_help_max_statement_spacing:
- Require no more than this many newlines between statements
max_statement_spacing: 2
max_returns: 6
max_branches: 12
max_arguments: 5
max_localvars: 15
max_statements: 50
_help_encode: Options affecting file encoding
encode:
_help_emit_byteorder_mark:
- If true, emit the unicode byte-order mark (BOM) at the start
- of the file
emit_byteorder_mark: false
_help_input_encoding:
- Specify the encoding of the input file. Defaults to utf-8
input_encoding: utf-8
_help_output_encoding:
- Specify the encoding of the output file. Defaults to utf-8.
- Note that cmake only claims to support utf-8 so be careful
- when using anything else
output_encoding: utf-8
_help_misc: Miscellaneous configurations options.
misc:
_help_per_command:
- A dictionary containing any per-command configuration
- overrides. Currently only `command_case` is supported.
per_command: {}

23
.codecov.yml Normal file
View File

@@ -0,0 +1,23 @@
coverage:
status:
project:
default:
target: 50%
threshold: 2%
patch:
default:
target: 20% # Need to bump this number https://docs.codecov.com/docs/commit-status#patch-status
threshold: 2%
# `codecov/codecov-action` reruns `gcovr` if build files present
# That's why we run it in a separate workflow
# This ignore list is not currently used
#
# More info: https://github.com/XRPLF/clio/pull/2066
ignore:
- "benchmarks"
- "tests"
- "src/data/cassandra/"
- "src/data/CassandraBackend.hpp"
- "src/data/BackendFactory.*"

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
*.png filter=lfs diff=lfs merge=lfs -text
*.svg filter=lfs diff=lfs merge=lfs -text

View File

@@ -1,20 +0,0 @@
#!/bin/bash
# Pushing a release branch requires an annotated tag at the released commit
branch=$(git rev-parse --abbrev-ref HEAD)
if [[ $branch =~ master ]]; then
# check if HEAD commit is tagged
if ! git describe --exact-match HEAD; then
echo "Commits to master must be tagged"
exit 1
fi
elif [[ $branch =~ release/* ]]; then
IFS=/ read -r branch rel_ver <<< ${branch}
tag=$(git describe --tags --abbrev=0)
if [[ "${rel_ver}" != "${tag}" ]]; then
echo "release/${rel_ver} branches must have annotated tag ${rel_ver}"
echo "git tag -am\"${rel_ver}\" ${rel_ver}"
exit 1
fi
fi

View File

@@ -1,42 +0,0 @@
#!/bin/bash
exec 1>&2
# paths to check and re-format
sources="src unittests"
formatter="clang-format -i"
version=$($formatter --version | grep -o '[0-9\.]*')
if [[ "16.0.0" > "$version" ]]; then
cat <<EOF
ERROR
-----------------------------------------------------------------------------
A minimum of version 16 of `clang-format` is required.
Your version is $version.
Please fix paths and run again.
-----------------------------------------------------------------------------
EOF
exit 2
fi
first=$(git diff $sources)
find $sources -type f \( -name '*.cpp' -o -name '*.h' -o -name '*.ipp' \) -print0 | xargs -0 $formatter
second=$(git diff $sources)
changes=$(diff <(echo "$first") <(echo "$second") | wc -l | sed -e 's/^[[:space:]]*//')
if [ "$changes" != "0" ]; then
cat <<\EOF
WARNING
-----------------------------------------------------------------------------
Automatically re-formatted code with `clang-format` - commit was aborted.
Please manually add any updated files and commit again.
-----------------------------------------------------------------------------
EOF
exit 1
fi
.githooks/ensure_release_tag

36
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,36 @@
---
name: Bug report
about: Create a report to help us improve
title: "[Title with short description] (Version: [Clio version])"
labels: bug
assignees: ""
---
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Kindly refrain from posting any credentials or sensitive information in this issue -->
## Issue Description
<!-- Provide a summary for your issue/bug. -->
## Steps to Reproduce
<!-- List in detail the exact steps to reproduce the unexpected behavior of the software. -->
## Expected Result
<!-- Explain in detail what behavior you expected to happen. -->
## Actual Result
<!-- Explain in detail what behavior actually happened. -->
## Environment
<!-- Please describe your environment setup (such as Ubuntu 20.04.2 with Boost 1.82). -->
<!-- Please use the version returned by './clio_server --version' as the version number -->
## Supporting Files
<!-- If you have supporting files such as a log, feel free to post a link here using Github Gist. -->
<!-- Consider adding configuration files with private information removed via Github Gist. -->

View File

@@ -0,0 +1,26 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[Title with short description] (Version: [Clio version])"
labels: enhancement
assignees: ""
---
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Kindly refrain from posting any credentials or sensitive information in this issue -->
## Summary
<!-- Provide a summary to the feature request -->
## Motivation
<!-- Why do we need this feature? -->
## Solution
<!-- What is the solution? -->
## Paths Not Taken
<!-- What other alternatives have been considered? -->

19
.github/ISSUE_TEMPLATE/question.md vendored Normal file
View File

@@ -0,0 +1,19 @@
---
name: Question
about: A question in form of an issue
title: "[Title with short description] (Version: Clio version)"
labels: question
assignees: ""
---
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Consider starting a [discussion](https://github.com/XRPLF/clio/discussions) instead. -->
<!-- Kindly refrain from posting any credentials or sensitive information in this issue -->
## Question
<!-- Your question -->
## Paths Not Taken
<!-- If applicable, what other alternatives have been considered? -->

View File

@@ -1,37 +1,29 @@
name: Build clio
description: Build clio in build directory
inputs:
conan_profile:
description: Conan profile name
required: true
default: default
conan_cache_hit:
description: Whether conan cache has been downloaded
targets:
description: Space-separated build target names
default: all
subtract_threads:
description: An option for the action get_number_of_threads. See get_number_of_threads
required: true
default: "0"
runs:
using: composite
steps:
- name: Get number of threads on mac
id: mac_threads
if: ${{ runner.os == 'macOS' }}
shell: bash
run: echo "num=$(($(sysctl -n hw.logicalcpu) - 2))" >> $GITHUB_OUTPUT
- name: Get number of threads
uses: ./.github/actions/get_number_of_threads
id: number_of_threads
with:
subtract_threads: ${{ inputs.subtract_threads }}
- name: Get number of threads on Linux
id: linux_threads
if: ${{ runner.os == 'Linux' }}
- name: Build targets
shell: bash
run: echo "num=$(($(nproc) - 2))" >> $GITHUB_OUTPUT
- name: Build Clio
shell: bash
env:
BUILD_OPTION: "${{ inputs.conan_cache_hit == 'true' && 'missing' || '' }}"
LINT: "${{ runner.os == 'Linux' && 'True' || 'False' }}"
run: |
mkdir -p build
cd build
threads_num=${{ steps.mac_threads.outputs.num || steps.linux_threads.outputs.num }}
conan install .. -of . -b $BUILD_OPTION -s build_type=Release -o clio:tests=True -o clio:lint=$LINT --profile ${{ inputs.conan_profile }}
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release .. -G Ninja
cmake --build . --parallel $threads_num
cmake \
--build . \
--parallel "${{ steps.number_of_threads.outputs.threads_number }}" \
--target ${{ inputs.targets }}

View File

@@ -0,0 +1,67 @@
name: Build and push Docker image
description: Build and push Docker image to DockerHub and GitHub Container Registry
inputs:
images:
description: Name of the images to use as a base name
required: true
push_image:
description: Whether to push the image to the registry (true/false)
required: true
directory:
description: The directory containing the Dockerfile
required: true
tags:
description: Comma separated tags to apply to the image
required: true
platforms:
description: Platforms to build the image for (e.g. linux/amd64,linux/arm64)
required: true
build_args:
description: List of build-time variables
required: false
dockerhub_repo:
description: DockerHub repository name
required: false
dockerhub_description:
description: Short description of the image
required: false
runs:
using: composite
steps:
- name: Login to DockerHub
if: ${{ inputs.push_image == 'true' && inputs.dockerhub_repo != '' }}
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
with:
username: ${{ env.DOCKERHUB_USER }}
password: ${{ env.DOCKERHUB_PW }}
- name: Login to GitHub Container Registry
if: ${{ inputs.push_image == 'true' }}
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ env.GITHUB_TOKEN }}
- uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
with:
cache-image: false
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
id: meta
with:
images: ${{ inputs.images }}
tags: ${{ inputs.tags }}
- name: Build and push
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: ${{ inputs.directory }}
platforms: ${{ inputs.platforms }}
push: ${{ inputs.push_image == 'true' }}
tags: ${{ steps.meta.outputs.tags }}
build-args: ${{ inputs.build_args }}

View File

@@ -1,27 +0,0 @@
name: Check format
description: Check format using clang-format-16
runs:
using: composite
steps:
- name: Add llvm repo
run: |
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main' | sudo tee -a /etc/apt/sources.list
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
shell: bash
- name: Install packages
run: |
sudo apt update -qq
sudo apt install -y jq clang-format-16
shell: bash
- name: Run formatter
run: |
find src unittests -type f \( -name '*.cpp' -o -name '*.h' -o -name '*.ipp' \) -print0 | xargs -0 clang-format-16 -i
shell: bash
- name: Check for differences
id: assert
shell: bash
run: |
git diff --color --exit-code | tee "clang-format.patch"

View File

@@ -0,0 +1,31 @@
name: Generate code coverage report
description: Run tests, generate code coverage report and upload it to codecov.io
runs:
using: composite
steps:
- name: Run tests
shell: bash
run: |
build/clio_tests
# Please keep exclude list in sync with .codecov.yml
- name: Run gcovr
shell: bash
run: |
gcovr \
-e benchmarks \
-e tests \
-e src/data/cassandra \
-e src/data/CassandraBackend.hpp \
-e 'src/data/BackendFactory.*' \
--xml build/coverage_report.xml \
-j8 --exclude-throw-branches
- name: Archive coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report.xml
path: build/coverage_report.xml
retention-days: 30

41
.github/actions/create_issue/action.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: Create an issue
description: Create an issue
inputs:
title:
description: Issue title
required: true
body:
description: Issue body
required: true
labels:
description: Comma-separated list of labels
required: true
default: "bug"
assignees:
description: Comma-separated list of assignees
required: true
default: "godexsoft,kuznetsss,PeterChen13579,mathbunnyru"
outputs:
created_issue_id:
description: Created issue id
value: ${{ steps.create_issue.outputs.created_issue }}
runs:
using: composite
steps:
- name: Create an issue
id: create_issue
shell: bash
run: |
echo -e '${{ inputs.body }}' > issue.md
gh issue create \
--assignee '${{ inputs.assignees }}' \
--label '${{ inputs.labels }}' \
--title '${{ inputs.title }}' \
--body-file ./issue.md \
> create_issue.log
created_issue="$(sed 's|.*/||' create_issue.log)"
echo "created_issue=$created_issue" >> $GITHUB_OUTPUT
rm create_issue.log issue.md

93
.github/actions/generate/action.yml vendored Normal file
View File

@@ -0,0 +1,93 @@
name: Run conan and cmake
description: Run conan and cmake
inputs:
conan_profile:
description: Conan profile name
required: true
force_conan_source_build:
description: Whether conan should build all dependencies from source
required: true
default: "false"
build_type:
description: Build type for third-party libraries and clio. Could be 'Release', 'Debug'
required: true
default: "Release"
build_integration_tests:
description: Whether to build integration tests
required: true
default: "true"
build_benchmark:
description: Whether to build benchmark tests
required: true
default: "true"
code_coverage:
description: Whether conan's coverage option should be on or not
required: true
default: "false"
static:
description: Whether Clio is to be statically linked
required: true
default: "false"
time_trace:
description: Whether to enable compiler trace reports
required: true
default: "false"
use_mold:
description: Whether to use mold linker
required: true
default: "false"
runs:
using: composite
steps:
- name: Create build directory
shell: bash
run: mkdir -p build
- name: Run conan
shell: bash
env:
CONAN_BUILD_OPTION: "${{ inputs.force_conan_source_build == 'true' && '*' || 'missing' }}"
CODE_COVERAGE: "${{ inputs.code_coverage == 'true' && 'True' || 'False' }}"
STATIC_OPTION: "${{ inputs.static == 'true' && 'True' || 'False' }}"
INTEGRATION_TESTS_OPTION: "${{ inputs.build_integration_tests == 'true' && 'True' || 'False' }}"
BENCHMARK_OPTION: "${{ inputs.build_benchmark == 'true' && 'True' || 'False' }}"
TIME_TRACE: "${{ inputs.time_trace == 'true' && 'True' || 'False' }}"
USE_MOLD: "${{ inputs.use_mold == 'true' && 'True' || 'False' }}"
run: |
cd build
conan \
install .. \
-of . \
-b "$CONAN_BUILD_OPTION" \
-s "build_type=${{ inputs.build_type }}" \
-o "&:static=${STATIC_OPTION}" \
-o "&:tests=True" \
-o "&:integration_tests=${INTEGRATION_TESTS_OPTION}" \
-o "&:benchmark=${BENCHMARK_OPTION}" \
-o "&:lint=False" \
-o "&:coverage=${CODE_COVERAGE}" \
-o "&:time_trace=${TIME_TRACE}" \
-o "&:use_mold=${USE_MOLD}" \
--profile:all "${{ inputs.conan_profile }}"
- name: Run cmake
shell: bash
env:
BUILD_TYPE: "${{ inputs.build_type }}"
SANITIZER_OPTION: |-
${{ endsWith(inputs.conan_profile, '.asan') && '-Dsan=address' ||
endsWith(inputs.conan_profile, '.tsan') && '-Dsan=thread' ||
endsWith(inputs.conan_profile, '.ubsan') && '-Dsan=undefined' ||
'' }}
USE_MOLD_OPTION: "${{ inputs.use_mold == 'true' && '-DUSE_MOLD=ON' || '' }}"
run: |
cd build
cmake \
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
"${USE_MOLD_OPTION}" \
"${SANITIZER_OPTION}" \
.. \
-G Ninja

View File

@@ -0,0 +1,36 @@
name: Get number of threads
description: Determines number of threads to use on macOS and Linux
inputs:
subtract_threads:
description: How many threads to subtract from the calculated number
required: true
default: "0"
outputs:
threads_number:
description: Number of threads to use
value: ${{ steps.number_of_threads_export.outputs.num }}
runs:
using: composite
steps:
- name: Get number of threads on mac
id: mac_threads
if: ${{ runner.os == 'macOS' }}
shell: bash
run: echo "num=$(($(sysctl -n hw.logicalcpu) - 2))" >> $GITHUB_OUTPUT
- name: Get number of threads on Linux
id: linux_threads
if: ${{ runner.os == 'Linux' }}
shell: bash
run: echo "num=$(($(nproc) - 2))" >> $GITHUB_OUTPUT
- name: Shift and export number of threads
id: number_of_threads_export
shell: bash
run: |
num_of_threads="${{ steps.mac_threads.outputs.num || steps.linux_threads.outputs.num }}"
shift_by="${{ inputs.subtract_threads }}"
shifted="$((num_of_threads - shift_by))"
echo "num=$(( shifted > 1 ? shifted : 1 ))" >> $GITHUB_OUTPUT

View File

@@ -1,9 +1,11 @@
name: Git common ancestor
description: Find the closest common commit
outputs:
commit:
description: Hash of commit
value: ${{ steps.find_common_ancestor.outputs.commit }}
runs:
using: composite
steps:
@@ -11,4 +13,4 @@ runs:
id: find_common_ancestor
shell: bash
run: |
echo "commit=$(git merge-base --fork-point origin/develop)" >> $GITHUB_OUTPUT
echo "commit=\"$(git merge-base --fork-point origin/develop)\"" >> $GITHUB_OUTPUT

View File

@@ -0,0 +1,59 @@
name: Prepare runner
description: Install packages, set environment variables, create directories
inputs:
disable_ccache:
description: Whether ccache should be disabled
required: true
runs:
using: composite
steps:
- name: Install packages on mac
if: ${{ runner.os == 'macOS' }}
shell: bash
run: |
brew install --quiet \
bison \
ca-certificates \
ccache \
clang-build-analyzer \
cmake \
conan \
gh \
jq \
llvm@14 \
ninja \
pkg-config
echo "/opt/homebrew/opt/conan@2/bin" >> $GITHUB_PATH
- name: Fix git permissions on Linux
if: ${{ runner.os == 'Linux' }}
shell: bash
run: git config --global --add safe.directory "$PWD"
- name: Set env variables for macOS
if: ${{ runner.os == 'macOS' }}
shell: bash
run: |
echo "CCACHE_DIR=${{ github.workspace }}/.ccache" >> $GITHUB_ENV
echo "CONAN_HOME=${{ github.workspace }}/.conan2" >> $GITHUB_ENV
- name: Set env variables for Linux
if: ${{ runner.os == 'Linux' }}
shell: bash
run: |
echo "CCACHE_DIR=/root/.ccache" >> $GITHUB_ENV
echo "CONAN_HOME=/root/.conan2" >> $GITHUB_ENV
- name: Set CCACHE_DISABLE=1
if: ${{ inputs.disable_ccache == 'true' }}
shell: bash
run: |
echo "CCACHE_DISABLE=1" >> $GITHUB_ENV
- name: Create directories
shell: bash
run: |
mkdir -p "$CCACHE_DIR"
mkdir -p "$CONAN_HOME"

View File

@@ -1,22 +1,27 @@
name: Restore cache
description: Find and restores conan and ccache cache
description: Find and restores ccache cache
inputs:
conan_dir:
description: Path to .conan directory
conan_profile:
description: Conan profile name
required: true
ccache_dir:
description: Path to .ccache directory
required: true
build_type:
description: Current build type (e.g. Release, Debug)
required: true
default: Release
code_coverage:
description: Whether code coverage is on
required: true
default: "false"
outputs:
conan_hash:
description: Hash to use as a part of conan cache key
value: ${{ steps.conan_hash.outputs.hash }}
conan_cache_hit:
description: True if conan cache has been downloaded
value: ${{ steps.conan_cache.outputs.cache-hit }}
ccache_cache_hit:
description: True if ccache cache has been downloaded
value: ${{ steps.ccache_cache.outputs.cache-hit }}
runs:
using: composite
steps:
@@ -24,27 +29,10 @@ runs:
id: git_common_ancestor
uses: ./.github/actions/git_common_ancestor
- name: Calculate conan hash
id: conan_hash
shell: bash
run: |
conan info . -j info.json -o clio:tests=True
packages_info=$(cat info.json | jq '.[] | "\(.display_name): \(.id)"' | grep -v 'clio')
echo "$packages_info"
hash=$(echo "$packages_info" | shasum -a 256 | cut -d ' ' -f 1)
rm info.json
echo "hash=$hash" >> $GITHUB_OUTPUT
- name: Restore conan cache
uses: actions/cache/restore@v3
id: conan_cache
with:
path: ${{ inputs.conan_dir }}/data
key: clio-conan_data-${{ runner.os }}-develop-${{ steps.conan_hash.outputs.hash }}
- name: Restore ccache cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
id: ccache_cache
if: ${{ env.CCACHE_DISABLE != '1' }}
with:
path: ${{ inputs.ccache_dir }}
key: clio-ccache-${{ runner.os }}-develop-${{ steps.git_common_ancestor.outputs.commit }}
key: clio-ccache-${{ runner.os }}-${{ inputs.build_type }}${{ inputs.code_coverage == 'true' && '-code_coverage' || '' }}-${{ inputs.conan_profile }}-develop-${{ steps.git_common_ancestor.outputs.commit }}

View File

@@ -1,21 +1,28 @@
name: Save cache
description: Save conan and ccache cache for develop branch
description: Save ccache cache for develop branch
inputs:
conan_dir:
description: Path to .conan directory
required: true
conan_hash:
description: Hash to use as a part of conan cache key
required: true
conan_cache_hit:
description: Whether conan cache has been downloaded
conan_profile:
description: Conan profile name
required: true
ccache_dir:
description: Path to .ccache directory
required: true
ccache_cache_hit:
description: Whether conan cache has been downloaded
build_type:
description: Current build type (e.g. Release, Debug)
required: true
default: Release
code_coverage:
description: Whether code coverage is on
required: true
default: "false"
ccache_cache_hit:
description: Whether ccache cache has been downloaded
required: true
ccache_cache_miss_rate:
description: How many ccache cache misses happened
runs:
using: composite
steps:
@@ -23,24 +30,9 @@ runs:
id: git_common_ancestor
uses: ./.github/actions/git_common_ancestor
- name: Cleanup conan directory from extra data
if: ${{ inputs.conan_cache_hit != 'true' }}
shell: bash
run: |
conan remove "*" -s -b -f
- name: Save conan cache
if: ${{ inputs.conan_cache_hit != 'true' }}
uses: actions/cache/save@v3
with:
path: ${{ inputs.conan_dir }}/data
key: clio-conan_data-${{ runner.os }}-develop-${{ inputs.conan_hash }}
- name: Save ccache cache
if: ${{ inputs.ccache_cache_hit != 'true' }}
uses: actions/cache/save@v3
if: ${{ inputs.ccache_cache_hit != 'true' || inputs.ccache_cache_miss_rate == '100.0' }}
uses: actions/cache/save@v4
with:
path: ${{ inputs.ccache_dir }}
key: clio-ccache-${{ runner.os }}-develop-${{ steps.git_common_ancestor.outputs.commit }}
key: clio-ccache-${{ runner.os }}-${{ inputs.build_type }}${{ inputs.code_coverage == 'true' && '-code_coverage' || '' }}-${{ inputs.conan_profile }}-develop-${{ steps.git_common_ancestor.outputs.commit }}

View File

@@ -1,55 +0,0 @@
name: Setup conan
description: Setup conan profile and artifactory
outputs:
conan_profile:
description: Created conan profile name
value: ${{ steps.conan_export_output.outputs.conan_profile }}
runs:
using: composite
steps:
- name: On mac
if: ${{ runner.os == 'macOS' }}
shell: bash
env:
CONAN_PROFILE: clio_clang_14
id: conan_setup_mac
run: |
echo "Creating $CONAN_PROFILE conan profile";
clang_path="$(brew --prefix llvm@14)/bin/clang"
clang_cxx_path="$(brew --prefix llvm@14)/bin/clang++"
conan profile new $CONAN_PROFILE --detect --force
conan profile update settings.compiler=clang $CONAN_PROFILE
conan profile update settings.compiler.version=14 $CONAN_PROFILE
conan profile update settings.compiler.cppstd=20 $CONAN_PROFILE
conan profile update "conf.tools.build:compiler_executables={\"c\": \"$clang_path\", \"cpp\": \"$clang_cxx_path\"}" $CONAN_PROFILE
conan profile update env.CC="$clang_path" $CONAN_PROFILE
conan profile update env.CXX="$clang_cxx_path" $CONAN_PROFILE
echo "created_conan_profile=$CONAN_PROFILE" >> $GITHUB_OUTPUT
- name: On linux
if: ${{ runner.os == 'Linux' }}
shell: bash
id: conan_setup_linux
run: |
conan profile new default --detect
conan profile update settings.compiler.cppstd=20 default
conan profile update settings.compiler.libcxx=libstdc++11 default
echo "created_conan_profile=default" >> $GITHUB_OUTPUT
- name: Export output variable
shell: bash
id: conan_export_output
run: |
echo "conan_profile=${{ steps.conan_setup_mac.outputs.created_conan_profile || steps.conan_setup_linux.outputs.created_conan_profile }}" >> $GITHUB_OUTPUT
- name: Add conan-non-prod artifactory
shell: bash
run: |
if [[ -z $(conan remote list | grep conan-non-prod) ]]; then
echo "Adding conan-non-prod"
conan remote add --insert 0 conan-non-prod http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
else
echo "Conan-non-prod is available"
fi

View File

@@ -1,6 +0,0 @@
FROM cassandra:4.0.4
RUN apt-get update && apt-get install -y postgresql
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -1,8 +0,0 @@
#!/bin/bash
pg_ctlcluster 12 main start
su postgres -c"psql -c\"alter user postgres with password 'postgres'\""
su cassandra -c "/opt/cassandra/bin/cassandra -R"
sleep 90
chmod +x ./clio_tests
./clio_tests

144
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,144 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
day: monday
time: "04:00"
timezone: Etc/GMT
reviewers:
- XRPLF/clio-dev-team
commit-message:
prefix: "ci: [DEPENDABOT] "
target-branch: develop
- package-ecosystem: github-actions
directory: .github/actions/build_clio/
schedule:
interval: weekly
day: monday
time: "04:00"
timezone: Etc/GMT
reviewers:
- XRPLF/clio-dev-team
commit-message:
prefix: "ci: [DEPENDABOT] "
target-branch: develop
- package-ecosystem: github-actions
directory: .github/actions/build_docker_image/
schedule:
interval: weekly
day: monday
time: "04:00"
timezone: Etc/GMT
reviewers:
- XRPLF/clio-dev-team
commit-message:
prefix: "ci: [DEPENDABOT] "
target-branch: develop
- package-ecosystem: github-actions
directory: .github/actions/code_coverage/
schedule:
interval: weekly
day: monday
time: "04:00"
timezone: Etc/GMT
reviewers:
- XRPLF/clio-dev-team
commit-message:
prefix: "ci: [DEPENDABOT] "
target-branch: develop
- package-ecosystem: github-actions
directory: .github/actions/create_issue/
schedule:
interval: weekly
day: monday
time: "04:00"
timezone: Etc/GMT
reviewers:
- XRPLF/clio-dev-team
commit-message:
prefix: "ci: [DEPENDABOT] "
target-branch: develop
- package-ecosystem: github-actions
directory: .github/actions/generate/
schedule:
interval: weekly
day: monday
time: "04:00"
timezone: Etc/GMT
reviewers:
- XRPLF/clio-dev-team
commit-message:
prefix: "ci: [DEPENDABOT] "
target-branch: develop
- package-ecosystem: github-actions
directory: .github/actions/get_number_of_threads/
schedule:
interval: weekly
day: monday
time: "04:00"
timezone: Etc/GMT
reviewers:
- XRPLF/clio-dev-team
commit-message:
prefix: "ci: [DEPENDABOT] "
target-branch: develop
- package-ecosystem: github-actions
directory: .github/actions/git_common_ancestor/
schedule:
interval: weekly
day: monday
time: "04:00"
timezone: Etc/GMT
reviewers:
- XRPLF/clio-dev-team
commit-message:
prefix: "ci: [DEPENDABOT] "
target-branch: develop
- package-ecosystem: github-actions
directory: .github/actions/prepare_runner/
schedule:
interval: weekly
day: monday
time: "04:00"
timezone: Etc/GMT
reviewers:
- XRPLF/clio-dev-team
commit-message:
prefix: "ci: [DEPENDABOT] "
target-branch: develop
- package-ecosystem: github-actions
directory: .github/actions/restore_cache/
schedule:
interval: weekly
day: monday
time: "04:00"
timezone: Etc/GMT
reviewers:
- XRPLF/clio-dev-team
commit-message:
prefix: "ci: [DEPENDABOT] "
target-branch: develop
- package-ecosystem: github-actions
directory: .github/actions/save_cache/
schedule:
interval: weekly
day: monday
time: "04:00"
timezone: Etc/GMT
reviewers:
- XRPLF/clio-dev-team
commit-message:
prefix: "ci: [DEPENDABOT] "
target-branch: develop

View File

@@ -0,0 +1,8 @@
[settings]
arch={{detect_api.detect_arch()}}
build_type=Release
compiler=apple-clang
compiler.cppstd=20
compiler.libcxx=libc++
compiler.version=16
os=Macos

View File

@@ -0,0 +1,11 @@
[settings]
arch={{detect_api.detect_arch()}}
build_type=Release
compiler=apple-clang
compiler.cppstd=20
compiler.libcxx=libc++
compiler.version=17
os=Macos
[conf]
grpc/1.50.1:tools.build:cxxflags+=["-Wno-missing-template-arg-list-after-template-kw"]

39
.github/scripts/conan/generate_matrix.py vendored Executable file
View File

@@ -0,0 +1,39 @@
#!/usr/bin/env python3
import itertools
import json
LINUX_OS = ["heavy", "heavy-arm64"]
LINUX_CONTAINERS = ['{ "image": "ghcr.io/xrplf/clio-ci:a446d85297b3006e6d2c4dc7640368f096afecf5" }']
LINUX_COMPILERS = ["gcc", "clang"]
MACOS_OS = ["macos15"]
MACOS_CONTAINERS = [""]
MACOS_COMPILERS = ["apple-clang"]
BUILD_TYPES = ["Release", "Debug"]
SANITIZER_EXT = [".asan", ".tsan", ".ubsan", ""]
def generate_matrix():
configurations = []
for os, container, compiler in itertools.chain(
itertools.product(LINUX_OS, LINUX_CONTAINERS, LINUX_COMPILERS),
itertools.product(MACOS_OS, MACOS_CONTAINERS, MACOS_COMPILERS),
):
for sanitizer_ext, build_type in itertools.product(SANITIZER_EXT, BUILD_TYPES):
configurations.append(
{
"os": os,
"container": container,
"compiler": compiler,
"sanitizer_ext": sanitizer_ext,
"build_type": build_type,
}
)
return {"include": configurations}
if __name__ == "__main__":
print(f"matrix={json.dumps(generate_matrix())}")

47
.github/scripts/conan/init.sh vendored Executable file
View File

@@ -0,0 +1,47 @@
#!/bin/bash
set -ex
CURRENT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_DIR="$(cd "$CURRENT_DIR/../../../" && pwd)"
CONAN_DIR="${CONAN_HOME:-$HOME/.conan2}"
PROFILES_DIR="$CONAN_DIR/profiles"
if [[ -z "$CI" ]]; then
APPLE_CLANG_PROFILE="$CURRENT_DIR/apple-clang-local.profile"
else
APPLE_CLANG_PROFILE="$CURRENT_DIR/apple-clang-ci.profile"
fi
GCC_PROFILE="$REPO_DIR/docker/ci/conan/gcc.profile"
CLANG_PROFILE="$REPO_DIR/docker/ci/conan/clang.profile"
SANITIZER_TEMPLATE_FILE="$REPO_DIR/docker/ci/conan/sanitizer_template.profile"
rm -rf "$CONAN_DIR"
conan remote add --index 0 ripple https://conan.ripplex.io
cp "$REPO_DIR/docker/ci/conan/global.conf" "$CONAN_DIR/global.conf"
create_profile_with_sanitizers() {
profile_name="$1"
profile_source="$2"
cp "$profile_source" "$PROFILES_DIR/$profile_name"
cp "$SANITIZER_TEMPLATE_FILE" "$PROFILES_DIR/$profile_name.asan"
cp "$SANITIZER_TEMPLATE_FILE" "$PROFILES_DIR/$profile_name.tsan"
cp "$SANITIZER_TEMPLATE_FILE" "$PROFILES_DIR/$profile_name.ubsan"
}
mkdir -p "$PROFILES_DIR"
if [[ "$(uname)" == "Darwin" ]]; then
create_profile_with_sanitizers "apple-clang" "$APPLE_CLANG_PROFILE"
echo "include(apple-clang)" > "$PROFILES_DIR/default"
else
create_profile_with_sanitizers "clang" "$CLANG_PROFILE"
create_profile_with_sanitizers "gcc" "$GCC_PROFILE"
echo "include(gcc)" > "$PROFILES_DIR/default"
fi

45
.github/scripts/execute-tests-under-sanitizer vendored Executable file
View File

@@ -0,0 +1,45 @@
#!/bin/bash
set -o pipefail
# Note: This script is intended to be run from the root of the repository.
#
# This script runs each unit-test separately and generates reports from the currently active sanitizer.
# Output is saved in ./.sanitizer-report in the root of the repository
if [[ -z "$1" ]]; then
cat <<EOF
ERROR
-----------------------------------------------------------------------------
Path to clio_tests should be passed as first argument to the script.
-----------------------------------------------------------------------------
EOF
exit 1
fi
TEST_BINARY=$1
if [[ ! -f "$TEST_BINARY" ]]; then
echo "Test binary not found: $TEST_BINARY"
exit 1
fi
TESTS=$($TEST_BINARY --gtest_list_tests | awk '/^ / {print suite $1} !/^ / {suite=$1}')
OUTPUT_DIR="./.sanitizer-report"
mkdir -p "$OUTPUT_DIR"
for TEST in $TESTS; do
OUTPUT_FILE="$OUTPUT_DIR/${TEST//\//_}"
export TSAN_OPTIONS="log_path=\"$OUTPUT_FILE\" die_after_fork=0"
export ASAN_OPTIONS="log_path=\"$OUTPUT_FILE\""
export UBSAN_OPTIONS="log_path=\"$OUTPUT_FILE\""
export MallocNanoZone='0' # for MacOSX
$TEST_BINARY --gtest_filter="$TEST" > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "'$TEST' failed a sanitizer check."
fi
done

24
.github/scripts/prepare-release-artifacts.sh vendored Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
set -ex -o pipefail
BINARY_NAME="clio_server"
ARTIFACTS_DIR="$1"
if [ -z "${ARTIFACTS_DIR}" ]; then
echo "Usage: $0 <artifacts_directory>"
exit 1
fi
cd "${ARTIFACTS_DIR}" || exit 1
for artifact_name in $(ls); do
pushd "${artifact_name}" || exit 1
zip -r "../${artifact_name}.zip" ./${BINARY_NAME}
popd || exit 1
rm "${artifact_name}/${BINARY_NAME}"
rm -r "${artifact_name}"
sha256sum "./${artifact_name}.zip" > "./${artifact_name}.zip.sha256sum"
done

View File

@@ -1,159 +1,111 @@
name: Build Clio
name: Build
on:
push:
branches: [master, release/*, develop]
branches: [release/*, develop]
pull_request:
branches: [master, release/*, develop]
branches: [release/*, develop]
paths:
- .github/workflows/build.yml
- .github/workflows/build_and_test.yml
- .github/workflows/build_impl.yml
- .github/workflows/test_impl.yml
- .github/workflows/upload_coverage_report.yml
- ".github/actions/**"
- "!.github/actions/build_docker_image/**"
- "!.github/actions/create_issue/**"
- CMakeLists.txt
- conanfile.py
- conan.lock
- "cmake/**"
- "src/**"
- "tests/**"
- docs/config-description.md
workflow_dispatch:
concurrency:
# Develop branch: Each run gets unique group (using run_number) for parallel execution
# Other branches: Shared group with cancel-in-progress to stop old runs when new commits are pushed
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref == 'refs/heads/develop' && github.run_number || 'branch' }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Run clang-format
uses: ./.github/actions/clang_format
build-and-test:
name: Build and Test
build_mac:
name: Build macOS
needs: lint
runs-on: [self-hosted, macOS]
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
CONAN_USER_HOME: ${{ github.workspace }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
strategy:
fail-fast: false
matrix:
os: [heavy]
conan_profile: [gcc, clang]
build_type: [Release, Debug]
container:
[
'{ "image": "ghcr.io/xrplf/clio-ci:a446d85297b3006e6d2c4dc7640368f096afecf5" }',
]
static: [true]
- name: Install packages
run: |
brew install llvm@14 pkg-config ninja bison cmake ccache jq
include:
- os: macos15
conan_profile: apple-clang
build_type: Release
container: ""
static: false
- name: Setup conan
uses: ./.github/actions/setup_conan
id: conan
uses: ./.github/workflows/build_and_test.yml
with:
runs_on: ${{ matrix.os }}
container: ${{ matrix.container }}
conan_profile: ${{ matrix.conan_profile }}
build_type: ${{ matrix.build_type }}
static: ${{ matrix.static }}
run_unit_tests: true
run_integration_tests: false
upload_clio_server: true
- name: Restore cache
uses: ./.github/actions/restore_cache
id: restore_cache
with:
conan_dir: ${{ env.CONAN_USER_HOME }}/.conan
ccache_dir: ${{ env.CCACHE_DIR }}
code_coverage:
name: Run Code Coverage
- name: Build Clio
uses: ./.github/actions/build_clio
with:
conan_profile: ${{ steps.conan.outputs.conan_profile }}
conan_cache_hit: ${{ steps.restore_cache.outputs.conan_cache_hit }}
uses: ./.github/workflows/build_impl.yml
with:
runs_on: heavy
container: '{ "image": "ghcr.io/xrplf/clio-ci:a446d85297b3006e6d2c4dc7640368f096afecf5" }'
conan_profile: gcc
build_type: Debug
disable_cache: false
code_coverage: true
static: true
upload_clio_server: false
targets: all
analyze_build_time: false
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Strip tests
run: strip build/clio_tests
- name: Upload clio_tests
uses: actions/upload-artifact@v3
with:
name: clio_tests_mac
path: build/clio_tests
- name: Save cache
uses: ./.github/actions/save_cache
with:
conan_dir: ${{ env.CONAN_USER_HOME }}/.conan
conan_hash: ${{ steps.restore_cache.outputs.conan_hash }}
conan_cache_hit: ${{ steps.restore_cache.outputs.conan_cache_hit }}
ccache_dir: ${{ env.CCACHE_DIR }}
ccache_cache_hit: ${{ steps.restore_cache.outputs.ccache_cache_hit }}
build_linux:
name: Build linux
needs: lint
runs-on: [self-hosted, Linux]
check_config:
name: Check Config Description
needs: build-and-test
runs-on: heavy
container:
image: conanio/gcc11:1.61.0
options: --user root
env:
CCACHE_DIR: /root/.ccache
CONAN_USER_HOME: /root/
image: ghcr.io/xrplf/clio-ci:a446d85297b3006e6d2c4dc7640368f096afecf5
steps:
- name: Get Clio
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/checkout@v4
- name: Add llvm repo
- uses: actions/download-artifact@v5
with:
name: clio_server_Linux_Release_gcc
- name: Compare Config Description
shell: bash
run: |
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main' >> /etc/apt/sources.list
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
repoConfigFile=docs/config-description.md
configDescriptionFile=config_description_new.md
- name: Install packages
run: |
apt update -qq
apt install -y jq clang-tidy-16
chmod +x ./clio_server
./clio_server -d "${configDescriptionFile}"
- name: Install ccache
run: |
wget https://github.com/ccache/ccache/releases/download/v4.8.3/ccache-4.8.3-linux-x86_64.tar.xz
tar xf ./ccache-4.8.3-linux-x86_64.tar.xz
mv ./ccache-4.8.3-linux-x86_64/ccache /usr/bin/ccache
- name: Fix git permissions
run: git config --global --add safe.directory $PWD
- name: Setup conan
uses: ./.github/actions/setup_conan
- name: Restore cache
uses: ./.github/actions/restore_cache
id: restore_cache
with:
conan_dir: ${{ env.CONAN_USER_HOME }}/.conan
ccache_dir: ${{ env.CCACHE_DIR }}
- name: Build Clio
uses: ./.github/actions/build_clio
with:
conan_cache_hit: ${{ steps.restore_cache.outputs.conan_cache_hit }}
- name: Strip tests
run: strip build/clio_tests
- name: Upload clio_tests
uses: actions/upload-artifact@v3
with:
name: clio_tests_linux
path: build/clio_tests
- name: Save cache
uses: ./.github/actions/save_cache
with:
conan_dir: ${{ env.CONAN_USER_HOME }}/.conan
conan_hash: ${{ steps.restore_cache.outputs.conan_hash }}
conan_cache_hit: ${{ steps.restore_cache.outputs.conan_cache_hit }}
ccache_dir: ${{ env.CCACHE_DIR }}
ccache_cache_hit: ${{ steps.restore_cache.outputs.ccache_cache_hit }}
test_mac:
needs: build_mac
runs-on: [self-hosted, macOS]
steps:
- uses: actions/download-artifact@v3
with:
name: clio_tests_mac
- name: Run clio_tests
run: |
chmod +x ./clio_tests
./clio_tests --gtest_filter="-BackendCassandraBaseTest*:BackendCassandraTest*:BackendCassandraFactoryTestWithDB*"
test_linux:
needs: build_linux
runs-on: [self-hosted, x-heavy]
steps:
- uses: actions/download-artifact@v3
with:
name: clio_tests_linux
- name: Run clio_tests
run: |
chmod +x ./clio_tests
./clio_tests --gtest_filter="-BackendCassandraBaseTest*:BackendCassandraTest*:BackendCassandraFactoryTestWithDB*"
diff -u "${repoConfigFile}" "${configDescriptionFile}"

91
.github/workflows/build_and_test.yml vendored Normal file
View File

@@ -0,0 +1,91 @@
name: Reusable build and test
on:
workflow_call:
inputs:
runs_on:
description: Runner to run the job on
required: true
type: string
container:
description: "The container object as a JSON string (leave empty to run natively)"
required: true
type: string
conan_profile:
description: Conan profile to use
required: true
type: string
build_type:
description: Build type
required: true
type: string
disable_cache:
description: Whether ccache should be disabled
required: false
type: boolean
default: false
static:
description: Whether to build static binaries
required: true
type: boolean
default: true
run_unit_tests:
description: Whether to run unit tests
required: true
type: boolean
run_integration_tests:
description: Whether to run integration tests
required: true
type: boolean
default: false
upload_clio_server:
description: Whether to upload clio_server
required: true
type: boolean
targets:
description: Space-separated build target names
required: false
type: string
default: all
expected_version:
description: Expected version of the clio_server binary
required: false
type: string
default: ""
jobs:
build:
uses: ./.github/workflows/build_impl.yml
with:
runs_on: ${{ inputs.runs_on }}
container: ${{ inputs.container }}
conan_profile: ${{ inputs.conan_profile }}
build_type: ${{ inputs.build_type }}
disable_cache: ${{ inputs.disable_cache }}
code_coverage: false
static: ${{ inputs.static }}
upload_clio_server: ${{ inputs.upload_clio_server }}
targets: ${{ inputs.targets }}
analyze_build_time: false
expected_version: ${{ inputs.expected_version }}
test:
needs: build
uses: ./.github/workflows/test_impl.yml
with:
runs_on: ${{ inputs.runs_on }}
container: ${{ inputs.container }}
conan_profile: ${{ inputs.conan_profile }}
build_type: ${{ inputs.build_type }}
run_unit_tests: ${{ inputs.run_unit_tests }}
run_integration_tests: ${{ inputs.run_integration_tests }}

View File

@@ -0,0 +1,101 @@
name: Build and publish Clio docker image
on:
workflow_call:
inputs:
tags:
required: true
type: string
description: Comma separated tags for docker image
artifact_name:
type: string
description: Name of Github artifact to put into docker image
strip_binary:
type: boolean
description: Whether to strip clio binary
default: true
publish_image:
type: boolean
description: Whether to publish docker image
required: true
workflow_dispatch:
inputs:
tags:
required: true
type: string
description: Comma separated tags for docker image
clio_server_binary_url:
required: true
type: string
description: Url to download clio_server binary from
binary_sha256:
required: true
type: string
description: sha256 hash of the binary
strip_binary:
type: boolean
description: Whether to strip clio binary
default: true
jobs:
build_and_publish_image:
name: Build and publish image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download Clio binary from artifact
if: ${{ inputs.artifact_name != null }}
uses: actions/download-artifact@v5
with:
name: ${{ inputs.artifact_name }}
path: ./docker/clio/artifact/
- name: Download Clio binary from url
if: ${{ inputs.clio_server_binary_url != null }}
shell: bash
run: |
wget "${{inputs.clio_server_binary_url}}" -P ./docker/clio/artifact/
if [ "$(sha256sum ./docker/clio/clio_server | awk '{print $1}')" != "${{inputs.binary_sha256}}" ]; then
echo "Binary sha256 sum doesn't match"
exit 1
fi
- name: Unpack binary
shell: bash
run: |
sudo apt update && sudo apt install -y tar unzip
cd docker/clio/artifact
artifact=$(find . -type f)
if [[ $artifact == *.zip ]]; then
unzip $artifact
elif [[ $artifact == *.tar.gz ]]; then
tar -xvf $artifact
fi
chmod +x ./clio_server
mv ./clio_server ../
cd ../
rm -rf ./artifact
- name: Strip binary
if: ${{ inputs.strip_binary }}
shell: bash
run: strip ./docker/clio/clio_server
- name: Build Docker image
uses: ./.github/actions/build_docker_image
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_PW: ${{ secrets.DOCKERHUB_PW }}
with:
images: |
ghcr.io/xrplf/clio
rippleci/clio
push_image: ${{ inputs.publish_image }}
directory: docker/clio
tags: ${{ inputs.tags }}
platforms: linux/amd64
dockerhub_repo: rippleci/clio
dockerhub_description: Clio is an XRP Ledger API server.

218
.github/workflows/build_impl.yml vendored Normal file
View File

@@ -0,0 +1,218 @@
name: Reusable build
on:
workflow_call:
inputs:
runs_on:
description: Runner to run the job on
required: true
type: string
container:
description: "The container object as a JSON string (leave empty to run natively)"
required: true
type: string
conan_profile:
description: Conan profile to use
required: true
type: string
build_type:
description: Build type
required: true
type: string
disable_cache:
description: Whether ccache should be disabled
required: false
type: boolean
code_coverage:
description: Whether to enable code coverage
required: true
type: boolean
static:
description: Whether to build static binaries
required: true
type: boolean
upload_clio_server:
description: Whether to upload clio_server
required: true
type: boolean
targets:
description: Space-separated build target names
required: true
type: string
analyze_build_time:
description: Whether to enable build time analysis
required: true
type: boolean
expected_version:
description: Expected version of the clio_server binary
required: false
type: string
default: ""
secrets:
CODECOV_TOKEN:
required: false
jobs:
build:
name: Build
runs-on: ${{ inputs.runs_on }}
container: ${{ inputs.container != '' && fromJson(inputs.container) || null }}
steps:
- name: Clean workdir
if: ${{ runner.os == 'macOS' }}
uses: kuznetsss/workspace-cleanup@80b9863b45562c148927c3d53621ef354e5ae7ce # v1.0
- uses: actions/checkout@v4
with:
fetch-depth: 0
# We need to fetch tags to have correct version in the release
# The workaround is based on https://github.com/actions/checkout/issues/1467
fetch-tags: true
ref: ${{ github.ref }}
- name: Prepare runner
uses: ./.github/actions/prepare_runner
with:
disable_ccache: ${{ inputs.disable_cache }}
- name: Setup conan on macOS
if: runner.os == 'macOS'
shell: bash
run: ./.github/scripts/conan/init.sh
- name: Restore cache
if: ${{ !inputs.disable_cache }}
uses: ./.github/actions/restore_cache
id: restore_cache
with:
conan_profile: ${{ inputs.conan_profile }}
ccache_dir: ${{ env.CCACHE_DIR }}
build_type: ${{ inputs.build_type }}
code_coverage: ${{ inputs.code_coverage }}
- name: Run conan and cmake
uses: ./.github/actions/generate
with:
conan_profile: ${{ inputs.conan_profile }}
build_type: ${{ inputs.build_type }}
code_coverage: ${{ inputs.code_coverage }}
static: ${{ inputs.static }}
time_trace: ${{ inputs.analyze_build_time }}
use_mold: ${{ runner.os != 'macOS' }}
- name: Build Clio
uses: ./.github/actions/build_clio
with:
targets: ${{ inputs.targets }}
- name: Show build time analyze report
if: ${{ inputs.analyze_build_time }}
run: |
ClangBuildAnalyzer --all build/ build_time_report.bin
ClangBuildAnalyzer --analyze build_time_report.bin > build_time_report.txt
cat build_time_report.txt
shell: bash
- name: Upload build time analyze report
if: ${{ inputs.analyze_build_time }}
uses: actions/upload-artifact@v4
with:
name: build_time_report_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
path: build_time_report.txt
- name: Show ccache's statistics
if: ${{ !inputs.disable_cache }}
shell: bash
id: ccache_stats
run: |
ccache -s > /tmp/ccache.stats
miss_rate=$(cat /tmp/ccache.stats | grep 'Misses' | head -n1 | sed 's/.*(\(.*\)%).*/\1/')
echo "miss_rate=${miss_rate}" >> $GITHUB_OUTPUT
cat /tmp/ccache.stats
- name: Strip unit_tests
if: ${{ !endsWith(inputs.conan_profile, 'san') && !inputs.code_coverage && !inputs.analyze_build_time }}
run: strip build/clio_tests
- name: Strip integration_tests
if: ${{ !endsWith(inputs.conan_profile, 'san') && !inputs.code_coverage && !inputs.analyze_build_time }}
run: strip build/clio_integration_tests
- name: Upload clio_server
if: inputs.upload_clio_server && !inputs.code_coverage && !inputs.analyze_build_time
uses: actions/upload-artifact@v4
with:
name: clio_server_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
path: build/clio_server
- name: Upload clio_tests
if: ${{ !inputs.code_coverage && !inputs.analyze_build_time }}
uses: actions/upload-artifact@v4
with:
name: clio_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
path: build/clio_tests
- name: Upload clio_integration_tests
if: ${{ !inputs.code_coverage && !inputs.analyze_build_time }}
uses: actions/upload-artifact@v4
with:
name: clio_integration_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
path: build/clio_integration_tests
- name: Save cache
if: ${{ !inputs.disable_cache && github.ref == 'refs/heads/develop' }}
uses: ./.github/actions/save_cache
with:
conan_profile: ${{ inputs.conan_profile }}
ccache_dir: ${{ env.CCACHE_DIR }}
build_type: ${{ inputs.build_type }}
code_coverage: ${{ inputs.code_coverage }}
ccache_cache_hit: ${{ steps.restore_cache.outputs.ccache_cache_hit }}
ccache_cache_miss_rate: ${{ steps.ccache_stats.outputs.miss_rate }}
# This is run as part of the build job, because it requires the following:
# - source code
# - conan packages
# - .gcno files in build directory
#
# It's all available in the build job, but not in the test job
- name: Run code coverage
if: ${{ inputs.code_coverage }}
uses: ./.github/actions/code_coverage
- name: Verify expected version
if: ${{ inputs.expected_version != '' }}
shell: bash
run: |
set -e
EXPECTED_VERSION="clio-${{ inputs.expected_version }}"
actual_version=$(./build/clio_server --version)
if [[ "$actual_version" != "$EXPECTED_VERSION" ]]; then
echo "Expected version '$EXPECTED_VERSION', but got '$actual_version'"
exit 1
fi
# `codecov/codecov-action` will rerun `gcov` if it's available and build directory is present
# To prevent this from happening, we run this action in a separate workflow
#
# More info: https://github.com/XRPLF/clio/pull/2066
upload_coverage_report:
if: ${{ inputs.code_coverage }}
name: Codecov
needs: build
uses: ./.github/workflows/upload_coverage_report.yml
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

100
.github/workflows/check_libxrpl.yml vendored Normal file
View File

@@ -0,0 +1,100 @@
name: Check new libXRPL
on:
repository_dispatch:
types: [check_libxrpl]
concurrency:
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CONAN_PROFILE: gcc
jobs:
build:
name: Build Clio / `libXRPL ${{ github.event.client_payload.version }}`
runs-on: heavy
container:
image: ghcr.io/xrplf/clio-ci:a446d85297b3006e6d2c4dc7640368f096afecf5
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Prepare runner
uses: ./.github/actions/prepare_runner
with:
disable_ccache: true
- name: Update libXRPL version requirement
shell: bash
run: |
sed -i.bak -E "s|'xrpl/[a-zA-Z0-9\\.\\-]+'|'xrpl/${{ github.event.client_payload.version }}'|g" conanfile.py
rm -f conanfile.py.bak
- name: Update conan lockfile
shell: bash
run: |
conan lock create . -o '&:tests=True' -o '&:benchmark=True' --profile:all ${{ env.CONAN_PROFILE }}
- name: Run conan and cmake
uses: ./.github/actions/generate
with:
conan_profile: ${{ env.CONAN_PROFILE }}
- name: Build Clio
uses: ./.github/actions/build_clio
- name: Strip tests
run: strip build/clio_tests
- name: Upload clio_tests
uses: actions/upload-artifact@v4
with:
name: clio_tests_check_libxrpl
path: build/clio_tests
run_tests:
name: Run tests
needs: build
runs-on: heavy
container:
image: ghcr.io/xrplf/clio-ci:a446d85297b3006e6d2c4dc7640368f096afecf5
steps:
- uses: actions/download-artifact@v5
with:
name: clio_tests_check_libxrpl
- name: Run clio_tests
run: |
chmod +x ./clio_tests
./clio_tests
create_issue_on_failure:
name: Create an issue on failure
needs: [build, run_tests]
if: ${{ always() && contains(needs.*.result, 'failure') }}
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
steps:
- uses: actions/checkout@v4
- name: Create an issue
uses: ./.github/actions/create_issue
env:
GH_TOKEN: ${{ github.token }}
with:
labels: "compatibility,bug"
title: "Proposed libXRPL check failed"
body: >
Clio build or tests failed against `libXRPL ${{ github.event.client_payload.version }}`.
Workflow: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/

17
.github/workflows/check_pr_title.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: Check PR title
on:
pull_request:
types: [opened, edited, reopened, synchronize]
branches: [develop]
jobs:
check_title:
runs-on: ubuntu-latest
steps:
- uses: ytanikin/pr-conventional-commits@b72758283dcbee706975950e96bc4bf323a8d8c0 # v1.4.2
with:
task_types: '["build","feat","fix","docs","test","ci","style","refactor","perf","chore"]'
add_label: false
custom_labels: '{"build":"build", "feat":"enhancement", "fix":"bug", "docs":"documentation", "test":"testability", "ci":"ci", "style":"refactoring", "refactor":"refactoring", "perf":"performance", "chore":"tooling"}'

122
.github/workflows/clang-tidy.yml vendored Normal file
View File

@@ -0,0 +1,122 @@
name: Clang-tidy check
on:
schedule:
- cron: "0 9 * * 1-5"
workflow_dispatch:
pull_request:
branches: [develop]
paths:
- .github/workflows/clang-tidy.yml
- .clang_tidy
concurrency:
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CONAN_PROFILE: clang
LLVM_TOOLS_VERSION: 20
jobs:
clang_tidy:
runs-on: heavy
container:
image: ghcr.io/xrplf/clio-ci:a446d85297b3006e6d2c4dc7640368f096afecf5
permissions:
contents: write
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Prepare runner
uses: ./.github/actions/prepare_runner
with:
disable_ccache: true
- name: Restore cache
uses: ./.github/actions/restore_cache
id: restore_cache
with:
conan_profile: ${{ env.CONAN_PROFILE }}
ccache_dir: ${{ env.CCACHE_DIR }}
- name: Run conan and cmake
uses: ./.github/actions/generate
with:
conan_profile: ${{ env.CONAN_PROFILE }}
- name: Get number of threads
uses: ./.github/actions/get_number_of_threads
id: number_of_threads
- name: Run clang-tidy
continue-on-error: true
shell: bash
id: run_clang_tidy
run: |
run-clang-tidy-${{ env.LLVM_TOOLS_VERSION }} -p build -j "${{ steps.number_of_threads.outputs.threads_number }}" -fix -quiet 1>output.txt
- name: Fix local includes and clang-format style
if: ${{ steps.run_clang_tidy.outcome != 'success' }}
shell: bash
run: |
pre-commit run --all-files fix-local-includes || true
pre-commit run --all-files clang-format || true
- name: Print issues found
if: ${{ steps.run_clang_tidy.outcome != 'success' }}
shell: bash
run: |
sed -i '/error\||/!d' ./output.txt
cat output.txt
rm output.txt
- name: Create an issue
if: ${{ steps.run_clang_tidy.outcome != 'success' && github.event_name != 'pull_request' }}
id: create_issue
uses: ./.github/actions/create_issue
env:
GH_TOKEN: ${{ github.token }}
with:
title: "Clang-tidy found bugs in code 🐛"
body: >
Clang-tidy found issues in the code:
List of the issues found: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/
- uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
if: ${{ steps.run_clang_tidy.outcome != 'success' && github.event_name != 'pull_request' }}
with:
gpg_private_key: ${{ secrets.ACTIONS_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.ACTIONS_GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Create PR with fixes
if: ${{ steps.run_clang_tidy.outcome != 'success' && github.event_name != 'pull_request' }}
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
with:
commit-message: "[CI] clang-tidy auto fixes"
committer: Clio CI <skuznetsov@ripple.com>
branch: "clang_tidy/autofix"
branch-suffix: timestamp
delete-branch: true
title: "style: clang-tidy auto fixes"
body: "Fixes #${{ steps.create_issue.outputs.created_issue_id }}. Please review and commit clang-tidy fixes."
reviewers: "godexsoft,kuznetsss,PeterChen13579,mathbunnyru"
- name: Fail the job
if: ${{ steps.run_clang_tidy.outcome != 'success' }}
shell: bash
run: exit 1

View File

@@ -0,0 +1,30 @@
name: Restart clang-tidy workflow
on:
push:
branches: [develop]
workflow_dispatch:
jobs:
restart_clang_tidy:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: actions/checkout@v4
- name: Check last commit matches clang-tidy auto fixes
id: check
shell: bash
run: |
passed=$(if [[ "$(git log -1 --pretty=format:%s | grep 'style: clang-tidy auto fixes')" ]]; then echo 'true' ; else echo 'false' ; fi)
echo "passed=\"$passed\"" >> $GITHUB_OUTPUT
- name: Run clang-tidy workflow
if: ${{ contains(steps.check.outputs.passed, 'true') }}
shell: bash
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: gh workflow run clang-tidy.yml

67
.github/workflows/docs.yml vendored Normal file
View File

@@ -0,0 +1,67 @@
name: Documentation
on:
push:
branches: [develop]
workflow_dispatch:
concurrency:
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/xrplf/clio-ci:a446d85297b3006e6d2c4dc7640368f096afecf5
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
- name: Prepare runner
uses: ./.github/actions/prepare_runner
with:
disable_ccache: true
- name: Create build directory
run: mkdir build_docs
- name: Configure CMake
working-directory: build_docs
run: cmake ../docs
- name: Build
working-directory: build_docs
run: cmake --build . --target docs
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: build_docs/html
name: docs-develop
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: docs-develop

142
.github/workflows/nightly.yml vendored Normal file
View File

@@ -0,0 +1,142 @@
name: Nightly release
on:
schedule:
- cron: "0 8 * * 1-5"
workflow_dispatch:
pull_request:
paths:
- .github/workflows/nightly.yml
- .github/workflows/release_impl.yml
- .github/workflows/build_and_test.yml
- .github/workflows/build_impl.yml
- .github/workflows/test_impl.yml
- .github/workflows/build_clio_docker_image.yml
- ".github/actions/**"
- "!.github/actions/code_coverage/**"
- .github/scripts/prepare-release-artifacts.sh
concurrency:
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
name: Build and Test
strategy:
fail-fast: false
matrix:
include:
- os: macos15
conan_profile: apple-clang
build_type: Release
static: false
- os: heavy
conan_profile: gcc
build_type: Release
static: true
container: '{ "image": "ghcr.io/xrplf/clio-ci:a446d85297b3006e6d2c4dc7640368f096afecf5" }'
- os: heavy
conan_profile: gcc
build_type: Debug
static: true
container: '{ "image": "ghcr.io/xrplf/clio-ci:a446d85297b3006e6d2c4dc7640368f096afecf5" }'
- os: heavy
conan_profile: gcc.ubsan
build_type: Release
static: false
container: '{ "image": "ghcr.io/xrplf/clio-ci:a446d85297b3006e6d2c4dc7640368f096afecf5" }'
uses: ./.github/workflows/build_and_test.yml
with:
runs_on: ${{ matrix.os }}
container: ${{ matrix.container }}
conan_profile: ${{ matrix.conan_profile }}
build_type: ${{ matrix.build_type }}
static: ${{ matrix.static }}
run_unit_tests: true
run_integration_tests: true
upload_clio_server: true
disable_cache: true
analyze_build_time:
name: Analyze Build Time
strategy:
fail-fast: false
matrix:
include:
- os: heavy
conan_profile: clang
container: '{ "image": "ghcr.io/xrplf/clio-ci:a446d85297b3006e6d2c4dc7640368f096afecf5" }'
static: true
- os: macos15
conan_profile: apple-clang
container: ""
static: false
uses: ./.github/workflows/build_impl.yml
with:
runs_on: ${{ matrix.os }}
container: ${{ matrix.container }}
conan_profile: ${{ matrix.conan_profile }}
build_type: Release
disable_cache: true
code_coverage: false
static: ${{ matrix.static }}
upload_clio_server: false
targets: all
analyze_build_time: true
nightly_release:
needs: build-and-test
uses: ./.github/workflows/release_impl.yml
with:
overwrite_release: true
prerelease: true
title: "Clio development (nightly) build"
version: nightly
header: >
> **Note:** Please remember that this is a development release and it is not recommended for production use.
Changelog (including previous releases): <https://github.com/XRPLF/clio/commits/nightly>
generate_changelog: false
draft: false
build_and_publish_docker_image:
uses: ./.github/workflows/build_clio_docker_image.yml
needs: build-and-test
secrets: inherit
with:
tags: |
type=raw,value=nightly
type=raw,value=${{ github.sha }}
artifact_name: clio_server_Linux_Release_gcc
strip_binary: true
publish_image: ${{ github.event_name != 'pull_request' }}
create_issue_on_failure:
needs: [build-and-test, nightly_release, build_and_publish_docker_image]
if: ${{ always() && contains(needs.*.result, 'failure') && github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
steps:
- uses: actions/checkout@v4
- name: Create an issue
uses: ./.github/actions/create_issue
env:
GH_TOKEN: ${{ github.token }}
with:
title: "Nightly release failed 🌙"
body: >
Nightly release failed:
Workflow: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/

View File

@@ -0,0 +1,50 @@
name: Pre-commit auto-update
on:
# every first day of the month
schedule:
- cron: "0 0 1 * *"
# on demand
workflow_dispatch:
jobs:
auto-update:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: pip install pre-commit
- run: pre-commit autoupdate --freeze
- run: pre-commit run --all-files || true
- uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
if: github.event_name != 'pull_request'
with:
gpg_private_key: ${{ secrets.ACTIONS_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.ACTIONS_GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
if: always()
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
with:
commit-message: "style: Update pre-commit hooks"
committer: Clio CI <skuznetsov@ripple.com>
branch: update/pre-commit-hooks
branch-suffix: timestamp
delete-branch: true
title: "style: Update pre-commit hooks"
body: Update versions of pre-commit hooks to latest version.
reviewers: "godexsoft,kuznetsss,PeterChen13579,mathbunnyru"

27
.github/workflows/pre-commit.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: Run pre-commit hooks
on:
pull_request:
push:
branches: [develop]
workflow_dispatch:
jobs:
run-hooks:
runs-on: heavy
container:
image: ghcr.io/xrplf/clio-ci:a446d85297b3006e6d2c4dc7640368f096afecf5
steps:
- name: Checkout Repo ⚡️
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Prepare runner
uses: ./.github/actions/prepare_runner
with:
disable_ccache: true
- name: Run pre-commit ✅
run: pre-commit run --all-files

58
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,58 @@
name: Create release
on:
push:
tags:
- "*.*.*"
pull_request:
paths:
- .github/workflows/release.yml
concurrency:
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
name: Build and Test
strategy:
fail-fast: false
matrix:
include:
- os: macos15
conan_profile: apple-clang
build_type: Release
static: false
- os: heavy
conan_profile: gcc
build_type: Release
static: true
container: '{ "image": "ghcr.io/xrplf/clio-ci:a446d85297b3006e6d2c4dc7640368f096afecf5" }'
uses: ./.github/workflows/build_and_test.yml
with:
runs_on: ${{ matrix.os }}
container: ${{ matrix.container }}
conan_profile: ${{ matrix.conan_profile }}
build_type: ${{ matrix.build_type }}
static: ${{ matrix.static }}
run_unit_tests: true
run_integration_tests: true
upload_clio_server: true
disable_cache: true
expected_version: ${{ github.event_name == 'push' && github.ref_name || '' }}
release:
needs: build-and-test
uses: ./.github/workflows/release_impl.yml
with:
overwrite_release: false
prerelease: ${{ contains(github.ref_name, '-') }}
title: "${{ github.ref_name}}"
version: "${{ github.ref_name }}"
header: >
${{ contains(github.ref_name, '-') && '> **Note:** Please remember that this is a release candidate and it is not recommended for production use.' || '' }}
generate_changelog: ${{ !contains(github.ref_name, '-') }}
draft: true

112
.github/workflows/release_impl.yml vendored Normal file
View File

@@ -0,0 +1,112 @@
name: Make release
on:
workflow_call:
inputs:
overwrite_release:
description: "Overwrite the current release and tag"
required: true
type: boolean
prerelease:
description: "Create a prerelease"
required: true
type: boolean
title:
description: "Release title"
required: true
type: string
version:
description: "Release version"
required: true
type: string
header:
description: "Release notes header"
required: true
type: string
generate_changelog:
description: "Generate changelog"
required: true
type: boolean
draft:
description: "Create a draft release"
required: true
type: boolean
jobs:
release:
runs-on: heavy
container:
image: ghcr.io/xrplf/clio-ci:a446d85297b3006e6d2c4dc7640368f096afecf5
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Prepare runner
uses: ./.github/actions/prepare_runner
with:
disable_ccache: true
- uses: actions/download-artifact@v5
with:
path: release_artifacts
pattern: clio_server_*
- name: Create release notes
shell: bash
run: |
echo "# Release notes" > "${RUNNER_TEMP}/release_notes.md"
echo "" >> "${RUNNER_TEMP}/release_notes.md"
printf '%s\n' "${{ inputs.header }}" >> "${RUNNER_TEMP}/release_notes.md"
- name: Generate changelog
shell: bash
if: ${{ inputs.generate_changelog }}
run: |
LAST_TAG="$(gh release view --json tagName -q .tagName)"
LAST_TAG_COMMIT="$(git rev-parse $LAST_TAG)"
BASE_COMMIT="$(git merge-base HEAD $LAST_TAG_COMMIT)"
git-cliff "${BASE_COMMIT}..HEAD" --ignore-tags "nightly|-b|-rc"
cat CHANGELOG.md >> "${RUNNER_TEMP}/release_notes.md"
- name: Prepare release artifacts
shell: bash
run: .github/scripts/prepare-release-artifacts.sh release_artifacts
- name: Upload release notes
uses: actions/upload-artifact@v4
with:
name: release_notes_${{ inputs.version }}
path: "${RUNNER_TEMP}/release_notes.md"
- name: Remove current release and tag
if: ${{ github.event_name != 'pull_request' && inputs.overwrite_release }}
shell: bash
run: |
gh release delete ${{ inputs.version }} --yes || true
git push origin :${{ inputs.version }} || true
- name: Publish release
if: ${{ github.event_name != 'pull_request' }}
shell: bash
run: |
gh release create "${{ inputs.version }}" \
${{ inputs.prerelease && '--prerelease' || '' }} \
--title "${{ inputs.title }}" \
--target "${GITHUB_SHA}" \
${{ inputs.draft && '--draft' || '' }} \
--notes-file "${RUNNER_TEMP}/release_notes.md" \
./release_artifacts/clio_server*

56
.github/workflows/sanitizers.yml vendored Normal file
View File

@@ -0,0 +1,56 @@
name: Run tests with sanitizers
on:
schedule:
- cron: "0 4 * * 1-5"
workflow_dispatch:
pull_request:
paths:
- .github/workflows/sanitizers.yml
- .github/workflows/build_and_test.yml
- .github/workflows/build_impl.yml
- .github/workflows/test_impl.yml
- ".github/actions/**"
- "!.github/actions/build_docker_image/**"
- "!.github/actions/create_issue/**"
- .github/scripts/execute-tests-under-sanitizer
- CMakeLists.txt
- conanfile.py
- conan.lock
- "cmake/**"
# We don't run sanitizer on code change, because it takes too long
# - "src/**"
# - "tests/**"
concurrency:
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
name: Build and Test
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]
sanitizer_ext: [.asan, .tsan, .ubsan]
build_type: [Release, Debug]
uses: ./.github/workflows/build_and_test.yml
with:
runs_on: heavy
container: '{ "image": "ghcr.io/xrplf/clio-ci:a446d85297b3006e6d2c4dc7640368f096afecf5" }'
disable_cache: true
conan_profile: ${{ matrix.compiler }}${{ matrix.sanitizer_ext }}
build_type: ${{ matrix.build_type }}
static: false
# Currently, both gcc.tsan and clang.tsan unit tests hang
run_unit_tests: ${{ matrix.sanitizer_ext != '.tsan' }}
run_integration_tests: false
upload_clio_server: false
targets: clio_tests clio_integration_tests

160
.github/workflows/test_impl.yml vendored Normal file
View File

@@ -0,0 +1,160 @@
name: Reusable test
on:
workflow_call:
inputs:
runs_on:
description: Runner to run the job on
required: true
type: string
container:
description: "The container object as a JSON string (leave empty to run natively)"
required: true
type: string
conan_profile:
description: Conan profile to use
required: true
type: string
build_type:
description: Build type
required: true
type: string
run_unit_tests:
description: Whether to run unit tests
required: true
type: boolean
run_integration_tests:
description: Whether to run integration tests
required: true
type: boolean
jobs:
unit_tests:
name: Unit testing
runs-on: ${{ inputs.runs_on }}
container: ${{ inputs.container != '' && fromJson(inputs.container) || null }}
if: inputs.run_unit_tests
env:
# TODO: remove completely when we have fixed all currently existing issues with sanitizers
SANITIZER_IGNORE_ERRORS: ${{ endsWith(inputs.conan_profile, '.asan') || endsWith(inputs.conan_profile, '.tsan') }}
steps:
- name: Clean workdir
if: ${{ runner.os == 'macOS' }}
uses: kuznetsss/workspace-cleanup@80b9863b45562c148927c3d53621ef354e5ae7ce # v1.0
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v5
with:
name: clio_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
- name: Make clio_tests executable
shell: bash
run: chmod +x ./clio_tests
- name: Run clio_tests (regular)
if: env.SANITIZER_IGNORE_ERRORS == 'false'
run: ./clio_tests
- name: Run clio_tests (sanitizer errors ignored)
if: env.SANITIZER_IGNORE_ERRORS == 'true'
run: ./.github/scripts/execute-tests-under-sanitizer ./clio_tests
- name: Check for sanitizer report
if: env.SANITIZER_IGNORE_ERRORS == 'true'
shell: bash
id: check_report
run: |
if ls .sanitizer-report/* 1> /dev/null 2>&1; then
echo "found_report=true" >> $GITHUB_OUTPUT
else
echo "found_report=false" >> $GITHUB_OUTPUT
fi
- name: Upload sanitizer report
if: env.SANITIZER_IGNORE_ERRORS == 'true' && steps.check_report.outputs.found_report == 'true'
uses: actions/upload-artifact@v4
with:
name: sanitizer_report_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
path: .sanitizer-report/*
include-hidden-files: true
- name: Create an issue
if: false && env.SANITIZER_IGNORE_ERRORS == 'true' && steps.check_report.outputs.found_report == 'true'
uses: ./.github/actions/create_issue
env:
GH_TOKEN: ${{ github.token }}
with:
labels: "bug"
title: "[${{ inputs.conan_profile }}] reported issues"
body: >
Clio tests failed one or more sanitizer checks when built with ${{ inputs.conan_profile }}`.
Workflow: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/
Reports are available as artifacts.
integration_tests:
name: Integration testing
runs-on: ${{ inputs.runs_on }}
container: ${{ inputs.container != '' && fromJson(inputs.container) || null }}
if: inputs.run_integration_tests
services:
scylladb:
image: ${{ inputs.container != '' && 'scylladb/scylla' || '' }}
options: >-
--health-cmd "cqlsh -e 'describe cluster'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Clean workdir
if: ${{ runner.os == 'macOS' }}
uses: kuznetsss/workspace-cleanup@80b9863b45562c148927c3d53621ef354e5ae7ce # v1.0
- name: Spin up scylladb
if: ${{ runner.os == 'macOS' }}
timeout-minutes: 3
run: |
docker rm --force scylladb || true
docker run \
--detach \
--name scylladb \
--health-cmd "cqlsh -e 'describe cluster'" \
--health-interval 10s \
--health-timeout 5s \
--health-retries 5 \
--publish 9042:9042 \
--memory 16G \
scylladb/scylla
until [ "$(docker inspect -f '{{.State.Health.Status}}' scylladb)" == "healthy" ]; do
sleep 5
done
- uses: actions/download-artifact@v5
with:
name: clio_integration_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
- name: Run clio_integration_tests
run: |
chmod +x ./clio_integration_tests
./clio_integration_tests ${{ runner.os != 'macOS' && '--backend_host=scylladb' || '' }}
- name: Show docker logs and stop scylladb
if: ${{ always() && runner.os == 'macOS' }}
run: |
docker logs scylladb
docker rm --force scylladb || true

332
.github/workflows/update_docker_ci.yml vendored Normal file
View File

@@ -0,0 +1,332 @@
name: Update CI docker image
on:
pull_request:
paths:
- .github/workflows/update_docker_ci.yml
- ".github/actions/build_docker_image/**"
- "docker/ci/**"
- "docker/compilers/**"
- "docker/tools/**"
push:
branches: [develop]
paths:
- .github/workflows/update_docker_ci.yml
- ".github/actions/build_docker_image/**"
- "docker/ci/**"
- "docker/compilers/**"
- "docker/tools/**"
workflow_dispatch:
concurrency:
# Only matches runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
# We want to execute all builds sequentially in develop
cancel-in-progress: false
env:
CLANG_MAJOR_VERSION: 19
GCC_MAJOR_VERSION: 14
GCC_VERSION: 14.3.0
jobs:
repo:
name: Calculate repo name
runs-on: ubuntu-latest
outputs:
GHCR_REPO: ${{ steps.set-ghcr-repo.outputs.GHCR_REPO }}
steps:
- name: Set GHCR_REPO
id: set-ghcr-repo
run: |
echo "GHCR_REPO=$(echo ghcr.io/${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_OUTPUT}
gcc-amd64:
name: Build and push GCC docker image (amd64)
runs-on: heavy
needs: repo
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
with:
files: "docker/compilers/gcc/**"
- uses: ./.github/actions/build_docker_image
if: steps.changed-files.outputs.any_changed == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_PW: ${{ secrets.DOCKERHUB_PW }}
with:
images: |
${{ needs.repo.outputs.GHCR_REPO }}/clio-gcc
rippleci/clio_gcc
push_image: ${{ github.event_name != 'pull_request' }}
directory: docker/compilers/gcc
tags: |
type=raw,value=amd64-latest
type=raw,value=amd64-${{ env.GCC_MAJOR_VERSION }}
type=raw,value=amd64-${{ env.GCC_VERSION }}
type=raw,value=amd64-${{ github.sha }}
platforms: linux/amd64
build_args: |
GCC_MAJOR_VERSION=${{ env.GCC_MAJOR_VERSION }}
GCC_VERSION=${{ env.GCC_VERSION }}
dockerhub_repo: rippleci/clio_gcc
dockerhub_description: GCC compiler for XRPLF/clio.
gcc-arm64:
name: Build and push GCC docker image (arm64)
runs-on: heavy-arm64
needs: repo
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
with:
files: "docker/compilers/gcc/**"
- uses: ./.github/actions/build_docker_image
if: steps.changed-files.outputs.any_changed == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_PW: ${{ secrets.DOCKERHUB_PW }}
with:
images: |
${{ needs.repo.outputs.GHCR_REPO }}/clio-gcc
rippleci/clio_gcc
push_image: ${{ github.event_name != 'pull_request' }}
directory: docker/compilers/gcc
tags: |
type=raw,value=arm64-latest
type=raw,value=arm64-${{ env.GCC_MAJOR_VERSION }}
type=raw,value=arm64-${{ env.GCC_VERSION }}
type=raw,value=arm64-${{ github.sha }}
platforms: linux/arm64
build_args: |
GCC_MAJOR_VERSION=${{ env.GCC_MAJOR_VERSION }}
GCC_VERSION=${{ env.GCC_VERSION }}
dockerhub_repo: rippleci/clio_gcc
dockerhub_description: GCC compiler for XRPLF/clio.
gcc-merge:
name: Merge and push multi-arch GCC docker image
runs-on: heavy
needs: [repo, gcc-amd64, gcc-arm64]
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
with:
files: "docker/compilers/gcc/**"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PW }}
- name: Create and push multi-arch manifest
if: github.event_name != 'pull_request' && steps.changed-files.outputs.any_changed == 'true'
run: |
for image in ${{ needs.repo.outputs.GHCR_REPO }}/clio-gcc rippleci/clio_gcc; do
docker buildx imagetools create \
-t $image:latest \
-t $image:${{ env.GCC_MAJOR_VERSION }} \
-t $image:${{ env.GCC_VERSION }} \
-t $image:${{ github.sha }} \
$image:arm64-latest \
$image:amd64-latest
done
clang:
name: Build and push Clang docker image
runs-on: heavy
needs: repo
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
with:
files: "docker/compilers/clang/**"
- uses: ./.github/actions/build_docker_image
if: steps.changed-files.outputs.any_changed == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_PW: ${{ secrets.DOCKERHUB_PW }}
with:
images: |
${{ needs.repo.outputs.GHCR_REPO }}/clio-clang
rippleci/clio_clang
push_image: ${{ github.event_name != 'pull_request' }}
directory: docker/compilers/clang
tags: |
type=raw,value=latest
type=raw,value=${{ env.CLANG_MAJOR_VERSION }}
type=raw,value=${{ github.sha }}
platforms: linux/amd64,linux/arm64
build_args: |
CLANG_MAJOR_VERSION=${{ env.CLANG_MAJOR_VERSION }}
dockerhub_repo: rippleci/clio_clang
dockerhub_description: Clang compiler for XRPLF/clio.
tools-amd64:
name: Build and push tools docker image (amd64)
runs-on: heavy
needs: [repo, gcc-merge]
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
with:
files: "docker/tools/**"
- uses: ./.github/actions/build_docker_image
if: steps.changed-files.outputs.any_changed == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
images: |
${{ needs.repo.outputs.GHCR_REPO }}/clio-tools
push_image: ${{ github.event_name != 'pull_request' }}
directory: docker/tools
tags: |
type=raw,value=amd64-latest
type=raw,value=amd64-${{ github.sha }}
platforms: linux/amd64
build_args: |
GHCR_REPO=${{ needs.repo.outputs.GHCR_REPO }}
GCC_VERSION=${{ env.GCC_VERSION }}
tools-arm64:
name: Build and push tools docker image (arm64)
runs-on: heavy-arm64
needs: [repo, gcc-merge]
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
with:
files: "docker/tools/**"
- uses: ./.github/actions/build_docker_image
if: steps.changed-files.outputs.any_changed == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
images: |
${{ needs.repo.outputs.GHCR_REPO }}/clio-tools
push_image: ${{ github.event_name != 'pull_request' }}
directory: docker/tools
tags: |
type=raw,value=arm64-latest
type=raw,value=arm64-${{ github.sha }}
platforms: linux/arm64
build_args: |
GHCR_REPO=${{ needs.repo.outputs.GHCR_REPO }}
GCC_VERSION=${{ env.GCC_VERSION }}
tools-merge:
name: Merge and push multi-arch tools docker image
runs-on: heavy
needs: [repo, tools-amd64, tools-arm64]
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
with:
files: "docker/tools/**"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create and push multi-arch manifest
if: github.event_name != 'pull_request' && steps.changed-files.outputs.any_changed == 'true'
run: |
image=${{ needs.repo.outputs.GHCR_REPO }}/clio-tools
docker buildx imagetools create \
-t $image:latest \
-t $image:${{ github.sha }} \
$image:arm64-latest \
$image:amd64-latest
ci:
name: Build and push CI docker image
runs-on: heavy
needs: [repo, gcc-merge, clang, tools-merge]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build_docker_image
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_PW: ${{ secrets.DOCKERHUB_PW }}
with:
images: |
${{ needs.repo.outputs.GHCR_REPO }}/clio-ci
rippleci/clio_ci
push_image: ${{ github.event_name != 'pull_request' }}
directory: docker/ci
tags: |
type=raw,value=latest
type=raw,value=gcc_${{ env.GCC_MAJOR_VERSION }}_clang_${{ env.CLANG_MAJOR_VERSION }}
type=raw,value=${{ github.sha }}
platforms: linux/amd64,linux/arm64
build_args: |
GHCR_REPO=${{ needs.repo.outputs.GHCR_REPO }}
CLANG_MAJOR_VERSION=${{ env.CLANG_MAJOR_VERSION }}
GCC_MAJOR_VERSION=${{ env.GCC_MAJOR_VERSION }}
GCC_VERSION=${{ env.GCC_VERSION }}
dockerhub_repo: rippleci/clio_ci
dockerhub_description: CI image for XRPLF/clio.

105
.github/workflows/upload_conan_deps.yml vendored Normal file
View File

@@ -0,0 +1,105 @@
name: Upload Conan Dependencies
on:
schedule:
- cron: "0 9 * * 1-5"
workflow_dispatch:
inputs:
force_source_build:
description: "Force source build of all dependencies"
required: false
default: false
type: boolean
force_upload:
description: "Force upload of all dependencies"
required: false
default: false
type: boolean
pull_request:
branches: [develop]
paths:
- .github/workflows/upload_conan_deps.yml
- .github/actions/generate/action.yml
- .github/actions/prepare_runner/action.yml
- ".github/scripts/conan/**"
- "!.github/scripts/conan/apple-clang-local.profile"
- conanfile.py
- conan.lock
push:
branches: [develop]
paths:
- .github/workflows/upload_conan_deps.yml
- .github/actions/generate/action.yml
- .github/actions/prepare_runner/action.yml
- ".github/scripts/conan/**"
- "!.github/scripts/conan/apple-clang-local.profile"
- conanfile.py
- conan.lock
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
generate-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- name: Calculate conan matrix
id: set-matrix
run: .github/scripts/conan/generate_matrix.py >> "${GITHUB_OUTPUT}"
upload-conan-deps:
name: Build ${{ matrix.compiler }}${{ matrix.sanitizer_ext }} ${{ matrix.build_type }}
needs: generate-matrix
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
runs-on: ${{ matrix.os }}
container: ${{ matrix.container != '' && fromJson(matrix.container) || null }}
env:
CONAN_PROFILE: ${{ matrix.compiler }}${{ matrix.sanitizer_ext }}
steps:
- uses: actions/checkout@v4
- name: Prepare runner
uses: ./.github/actions/prepare_runner
with:
disable_ccache: true
- name: Setup conan on macOS
if: runner.os == 'macOS'
shell: bash
run: ./.github/scripts/conan/init.sh
- name: Show conan profile
run: conan profile show --profile:all ${{ env.CONAN_PROFILE }}
- name: Run conan and cmake
uses: ./.github/actions/generate
with:
conan_profile: ${{ env.CONAN_PROFILE }}
# We check that everything builds fine from source on scheduled runs
# But we do build and upload packages with build=missing by default
force_conan_source_build: ${{ github.event_name == 'schedule' || github.event.inputs.force_source_build == 'true' }}
build_type: ${{ matrix.build_type }}
- name: Login to Conan
if: github.event_name != 'pull_request'
run: conan remote login -p ${{ secrets.CONAN_PASSWORD }} ripple ${{ secrets.CONAN_USERNAME }}
- name: Upload Conan packages
if: github.event_name != 'pull_request' && github.event_name != 'schedule'
run: conan upload "*" -r=ripple --confirm ${{ github.event.inputs.force_upload == 'true' && '--force' || '' }}

View File

@@ -0,0 +1,33 @@
name: Upload report
on:
workflow_dispatch:
workflow_call:
secrets:
CODECOV_TOKEN:
required: true
jobs:
upload_report:
name: Upload report
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download report artifact
uses: actions/download-artifact@v5
with:
name: coverage-report.xml
path: build
- name: Upload coverage report
if: ${{ hashFiles('build/coverage_report.xml') != '' }}
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
with:
files: build/coverage_report.xml
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}

4
.gitignore vendored
View File

@@ -1,9 +1,11 @@
*clio*.log
/build*/
.devcontainer
.build
.cache
.vscode
.python-version
.DS_Store
.sanitizer-report
CMakeUserPresets.json
config.json
src/main/impl/Build.cpp

6
.hadolint.yml Normal file
View File

@@ -0,0 +1,6 @@
---
ignored:
- DL3003
- DL3007
- DL3008
- DL3013

6
.markdownlint.yaml Normal file
View File

@@ -0,0 +1,6 @@
# Default state for all rules
default: true
# MD013/line-length - Line length
MD013:
line_length: 1000

129
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,129 @@
---
# pre-commit is a tool to perform a predefined set of tasks manually and/or
# automatically before git commits are made.
#
# Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level
#
# Common tasks
#
# - Run on all files: pre-commit run --all-files
# - Register git hooks: pre-commit install --hook-type pre-commit --hook-type pre-push
#
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: ^(docs/doxygen-awesome-theme/|conan\.lock$)
repos:
# `pre-commit sample-config` default hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
hooks:
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: end-of-file-fixer
- id: trailing-whitespace
# Autoformat: YAML, JSON, Markdown, etc.
- repo: https://github.com/rbubley/mirrors-prettier
rev: 5ba47274f9b181bce26a5150a725577f3c336011 # frozen: v3.6.2
hooks:
- id: prettier
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: 192ad822316c3a22fb3d3cc8aa6eafa0b8488360 # frozen: v0.45.0
hooks:
- id: markdownlint-fix
exclude: LICENSE.md
- repo: https://github.com/hadolint/hadolint
rev: c3dc18df7a501f02a560a2cc7ba3c69a85ca01d3 # frozen: v2.13.1-beta
hooks:
- id: hadolint-docker
# hadolint-docker is a special hook that runs hadolint in a Docker container
# Docker is not installed in the environment where pre-commit is run
stages: [manual]
entry: hadolint/hadolint:v2.12.1-beta hadolint
- repo: https://github.com/codespell-project/codespell
rev: 63c8f8312b7559622c0d82815639671ae42132ac # frozen: v2.4.1
hooks:
- id: codespell
args:
[
--write-changes,
--ignore-words=pre-commit-hooks/codespell_ignore.txt,
]
- repo: https://github.com/trufflesecurity/trufflehog
rev: a05cf0859455b5b16317ee22d809887a4043cdf0 # frozen: v3.90.2
hooks:
- id: trufflehog
entry: trufflehog git file://. --since-commit HEAD --max-depth=1 --no-verification --fail
# Running some C++ hooks before clang-format
# to ensure that the style is consistent.
- repo: local
hooks:
- id: json-in-cpp
name: Fix JSON style in C++
entry: pre-commit-hooks/json_in_cpp.py
types: [c++]
language: python
exclude: |
(?x)^(
tests/unit/etl/SubscriptionSourceTests.cpp|
tests/unit/web/ServerTests.cpp|
tests/unit/web/impl/ErrorHandlingTests.cpp|
tests/unit/web/ng/ServerTests.cpp|
tests/unit/web/ng/impl/ErrorHandlingTests.cpp
)$
- id: fix-local-includes
name: Fix Local Includes
entry: pre-commit-hooks/fix-local-includes.sh
types: [c++]
language: script
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 182152eb8c5ce1cf5299b956b04392c86bd8a126 # frozen: v20.1.8
hooks:
- id: clang-format
args: [--style=file]
types: [c++]
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: e2c2116d86a80e72e7146a06e68b7c228afc6319 # frozen: v0.6.13
hooks:
- id: cmake-format
additional_dependencies: [PyYAML]
- repo: local
hooks:
- id: check-no-h-files
name: No .h files
entry: There should be no .h files in this repository
language: fail
files: \.h$
- repo: local
hooks:
- id: gofmt
name: Go Format
entry: pre-commit-hooks/run-go-fmt.sh
types: [go]
language: golang
description: "Runs `gofmt`, requires golang"
- id: check-docs
name: Check Doxygen Documentation
entry: pre-commit-hooks/check-doxygen-docs.sh
types: [text]
language: script
pass_filenames: false
- id: verify-commits
name: Verify Commits
entry: pre-commit-hooks/verify-commits.sh
always_run: true
stages: [pre-push]
language: script
pass_filenames: false

View File

@@ -1,5 +0,0 @@
find_program (CCACHE_PATH "ccache")
if (CCACHE_PATH)
set (CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PATH}")
message (STATUS "Using ccache: ${CCACHE_PATH}")
endif ()

View File

@@ -1,42 +0,0 @@
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14)
message (FATAL_ERROR "Clang 14+ required for building clio")
endif ()
set (is_clang TRUE)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14)
message (FATAL_ERROR "AppleClang 14+ required for building clio")
endif ()
set (is_appleclang TRUE)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11)
message (FATAL_ERROR "GCC 11+ required for building clio")
endif ()
set (is_gcc TRUE)
else ()
message (FATAL_ERROR "Supported compilers: AppleClang 14+, Clang 14+, GCC 11+")
endif ()
if (san)
string (TOLOWER ${san} san)
set (SAN_FLAG "-fsanitize=${san}")
set (SAN_LIB "")
if (is_gcc)
if (san STREQUAL "address")
set (SAN_LIB "asan")
elseif (san STREQUAL "thread")
set (SAN_LIB "tsan")
elseif (san STREQUAL "memory")
set (SAN_LIB "msan")
elseif (san STREQUAL "undefined")
set (SAN_LIB "ubsan")
endif ()
endif ()
set (_saved_CRL ${CMAKE_REQUIRED_LIBRARIES})
set (CMAKE_REQUIRED_LIBRARIES "${SAN_FLAG};${SAN_LIB}")
CHECK_CXX_COMPILER_FLAG (${SAN_FLAG} COMPILER_SUPPORTS_SAN)
set (CMAKE_REQUIRED_LIBRARIES ${_saved_CRL})
if (NOT COMPILER_SUPPORTS_SAN)
message (FATAL_ERROR "${san} sanitizer does not seem to be supported by your compiler")
endif ()
endif ()

View File

@@ -1,31 +0,0 @@
if (lint)
# Find clang-tidy binary
if (DEFINED ENV{CLIO_CLANG_TIDY_BIN})
set (_CLANG_TIDY_BIN $ENV{CLIO_CLANG_TIDY_BIN})
if ((NOT EXISTS ${_CLANG_TIDY_BIN}) OR IS_DIRECTORY ${_CLANG_TIDY_BIN})
message (FATAL_ERROR "$ENV{CLIO_CLANG_TIDY_BIN} no such file. Check CLIO_CLANG_TIDY_BIN env variable")
endif ()
message (STATUS "Using clang-tidy from CLIO_CLANG_TIDY_BIN")
else ()
find_program (_CLANG_TIDY_BIN NAMES "clang-tidy-16" "clang-tidy" REQUIRED)
endif ()
if (NOT _CLANG_TIDY_BIN)
message (FATAL_ERROR
"clang-tidy binary not found. Please set the CLIO_CLANG_TIDY_BIN environment variable or install clang-tidy.")
endif ()
# Support for https://github.com/matus-chochlik/ctcache
find_program (CLANG_TIDY_CACHE_PATH NAMES "clang-tidy-cache")
if (CLANG_TIDY_CACHE_PATH)
set (_CLANG_TIDY_CMD
"${CLANG_TIDY_CACHE_PATH};${_CLANG_TIDY_BIN}"
CACHE STRING "A combined command to run clang-tidy with caching wrapper")
else ()
set(_CLANG_TIDY_CMD "${_CLANG_TIDY_BIN}")
endif ()
set (CMAKE_CXX_CLANG_TIDY "${_CLANG_TIDY_CMD};--quiet")
message (STATUS "Using clang-tidy: ${CMAKE_CXX_CLANG_TIDY}")
endif ()

View File

@@ -1,39 +0,0 @@
#[===================================================================[
write version to source
#]===================================================================]
find_package (Git REQUIRED)
set (GIT_COMMAND rev-parse --short HEAD)
execute_process (COMMAND ${GIT_EXECUTABLE} ${GIT_COMMAND}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE REV OUTPUT_STRIP_TRAILING_WHITESPACE)
set (GIT_COMMAND branch --show-current)
execute_process (COMMAND ${GIT_EXECUTABLE} ${GIT_COMMAND}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE)
if (BRANCH STREQUAL "")
set (BRANCH "dev")
endif ()
if (NOT (BRANCH MATCHES master OR BRANCH MATCHES release/*)) # for develop and any other branch name YYYYMMDDHMS-<branch>-<git-rev>
execute_process (COMMAND date +%Y%m%d%H%M%S OUTPUT_VARIABLE DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
set (VERSION "${DATE}-${BRANCH}-${REV}")
else ()
set (GIT_COMMAND describe --tags)
execute_process (COMMAND ${GIT_EXECUTABLE} ${GIT_COMMAND}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE TAG_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
set (VERSION "${TAG_VERSION}-${REV}")
endif ()
if (CMAKE_BUILD_TYPE MATCHES Debug)
set (VERSION "${VERSION}+DEBUG")
endif ()
message (STATUS "Build version: ${VERSION}")
set (clio_version "${VERSION}")
configure_file (CMake/Build.cpp.in ${CMAKE_SOURCE_DIR}/src/main/impl/Build.cpp)

View File

@@ -1,125 +0,0 @@
# call add_coverage(module_name) to add coverage targets for the given module
function (add_coverage module)
if ("${CMAKE_C_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang"
OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang")
message ("[Coverage] Building with llvm Code Coverage Tools")
# Using llvm gcov ; llvm install by xcode
set (LLVM_COV_PATH /Library/Developer/CommandLineTools/usr/bin)
if (NOT EXISTS ${LLVM_COV_PATH}/llvm-cov)
message (FATAL_ERROR "llvm-cov not found! Aborting.")
endif ()
# set Flags
target_compile_options (${module} PRIVATE
-fprofile-instr-generate
-fcoverage-mapping)
target_link_options (${module} PUBLIC
-fprofile-instr-generate
-fcoverage-mapping)
target_compile_options (clio PRIVATE
-fprofile-instr-generate
-fcoverage-mapping)
target_link_options (clio PUBLIC
-fprofile-instr-generate
-fcoverage-mapping)
# llvm-cov
add_custom_target (${module}-ccov-preprocessing
COMMAND LLVM_PROFILE_FILE=${module}.profraw $<TARGET_FILE:${module}>
COMMAND ${LLVM_COV_PATH}/llvm-profdata merge -sparse ${module}.profraw -o
${module}.profdata
DEPENDS ${module})
add_custom_target (${module}-ccov-show
COMMAND ${LLVM_COV_PATH}/llvm-cov show $<TARGET_FILE:${module}>
-instr-profile=${module}.profdata -show-line-counts-or-regions
DEPENDS ${module}-ccov-preprocessing)
# add summary for CI parse
add_custom_target (${module}-ccov-report
COMMAND
${LLVM_COV_PATH}/llvm-cov report $<TARGET_FILE:${module}>
-instr-profile=${module}.profdata
-ignore-filename-regex=".*_makefiles|.*unittests|.*_deps"
-show-region-summary=false
DEPENDS ${module}-ccov-preprocessing)
# exclude libs and unittests self
add_custom_target (${module}-ccov
COMMAND
${LLVM_COV_PATH}/llvm-cov show $<TARGET_FILE:${module}>
-instr-profile=${module}.profdata -show-line-counts-or-regions
-output-dir=${module}-llvm-cov -format="html"
-ignore-filename-regex=".*_makefiles|.*unittests|.*_deps" > /dev/null 2>&1
DEPENDS ${module}-ccov-preprocessing)
add_custom_command (
TARGET ${module}-ccov
POST_BUILD
COMMENT
"Open ${module}-llvm-cov/index.html in your browser to view the coverage report."
)
elseif ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
message ("[Coverage] Building with Gcc Code Coverage Tools")
find_program (GCOV_PATH gcov)
if (NOT GCOV_PATH)
message (FATAL_ERROR "gcov not found! Aborting...")
endif () # NOT GCOV_PATH
find_program (GCOVR_PATH gcovr)
if (NOT GCOVR_PATH)
message (FATAL_ERROR "gcovr not found! Aborting...")
endif () # NOT GCOVR_PATH
set (COV_OUTPUT_PATH ${module}-gcc-cov)
target_compile_options (${module} PRIVATE -fprofile-arcs -ftest-coverage
-fPIC)
target_link_libraries (${module} PRIVATE gcov)
target_compile_options (clio PRIVATE -fprofile-arcs -ftest-coverage
-fPIC)
target_link_libraries (clio PRIVATE gcov)
# this target is used for CI as well generate the summary out.xml will send
# to github action to generate markdown, we can paste it to comments or
# readme
add_custom_target (${module}-ccov
COMMAND ${module} ${TEST_PARAMETER}
COMMAND rm -rf ${COV_OUTPUT_PATH}
COMMAND mkdir ${COV_OUTPUT_PATH}
COMMAND
gcovr -r ${CMAKE_SOURCE_DIR} --object-directory=${PROJECT_BINARY_DIR} -x
${COV_OUTPUT_PATH}/out.xml --exclude='${CMAKE_SOURCE_DIR}/unittests/'
--exclude='${PROJECT_BINARY_DIR}/'
COMMAND
gcovr -r ${CMAKE_SOURCE_DIR} --object-directory=${PROJECT_BINARY_DIR}
--html ${COV_OUTPUT_PATH}/report.html
--exclude='${CMAKE_SOURCE_DIR}/unittests/'
--exclude='${PROJECT_BINARY_DIR}/'
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
COMMENT "Running gcovr to produce Cobertura code coverage report.")
# generate the detail report
add_custom_target (${module}-ccov-report
COMMAND ${module} ${TEST_PARAMETER}
COMMAND rm -rf ${COV_OUTPUT_PATH}
COMMAND mkdir ${COV_OUTPUT_PATH}
COMMAND
gcovr -r ${CMAKE_SOURCE_DIR} --object-directory=${PROJECT_BINARY_DIR}
--html-details ${COV_OUTPUT_PATH}/index.html
--exclude='${CMAKE_SOURCE_DIR}/unittests/'
--exclude='${PROJECT_BINARY_DIR}/'
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
COMMENT "Running gcovr to produce Cobertura code coverage report.")
add_custom_command (
TARGET ${module}-ccov-report
POST_BUILD
COMMENT
"Open ${COV_OUTPUT_PATH}/index.html in your browser to view the coverage report."
)
else ()
message (FATAL_ERROR "Complier not support yet")
endif ()
endfunction ()

View File

@@ -1,11 +0,0 @@
find_package (Doxygen REQUIRED)
set (DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile)
set (DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
configure_file (${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
add_custom_target (docs
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM)

View File

@@ -1,45 +0,0 @@
set(COMPILER_FLAGS
-Wall
-Wcast-align
-Wdouble-promotion
-Wextra
-Werror
-Wformat=2
-Wimplicit-fallthrough
-Wmisleading-indentation
-Wno-narrowing
-Wno-deprecated-declarations
-Wno-dangling-else
-Wno-unused-but-set-variable
-Wnon-virtual-dtor
-Wnull-dereference
-Wold-style-cast
-pedantic
-Wpedantic
-Wunused
)
if (is_gcc AND NOT lint)
list(APPEND COMPILER_FLAGS
-Wduplicated-branches
-Wduplicated-cond
-Wlogical-op
-Wuseless-cast
)
endif ()
if (is_clang)
list(APPEND COMPILER_FLAGS
-Wshadow # gcc is to aggressive with shadowing https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78147
)
endif ()
if (is_appleclang)
list(APPEND COMPILER_FLAGS
-Wreorder-init-list
)
endif ()
# See https://github.com/cpp-best-practices/cppbestpractices/blob/master/02-Use_the_Tools_Available.md#gcc--clang for the flags description
target_compile_options (clio PUBLIC ${COMPILER_FLAGS})

View File

@@ -1,11 +0,0 @@
include (CheckIncludeFileCXX)
check_include_file_cxx ("source_location" SOURCE_LOCATION_AVAILABLE)
if (SOURCE_LOCATION_AVAILABLE)
target_compile_definitions (clio PUBLIC "HAS_SOURCE_LOCATION")
endif ()
check_include_file_cxx ("experimental/source_location" EXPERIMENTAL_SOURCE_LOCATION_AVAILABLE)
if (EXPERIMENTAL_SOURCE_LOCATION_AVAILABLE)
target_compile_definitions (clio PUBLIC "HAS_EXPERIMENTAL_SOURCE_LOCATION")
endif ()

View File

@@ -1,11 +0,0 @@
set (Boost_USE_STATIC_LIBS ON)
set (Boost_USE_STATIC_RUNTIME ON)
find_package (Boost 1.82 REQUIRED
COMPONENTS
program_options
coroutine
system
log
log_setup
)

View File

@@ -1,5 +0,0 @@
find_package (OpenSSL 1.1.1 REQUIRED)
set_target_properties (OpenSSL::SSL PROPERTIES
INTERFACE_COMPILE_DEFINITIONS OPENSSL_NO_SSL2
)

View File

@@ -1,2 +0,0 @@
set (THREADS_PREFER_PTHREAD_FLAG ON)
find_package (Threads)

View File

@@ -1 +0,0 @@
find_package (cassandra-cpp-driver REQUIRED)

View File

@@ -1,4 +0,0 @@
find_package (GTest REQUIRED)
enable_testing ()
include (GoogleTest)

View File

@@ -1 +0,0 @@
find_package (fmt REQUIRED)

View File

@@ -1 +0,0 @@
find_package (xrpl REQUIRED)

View File

@@ -1,14 +0,0 @@
set (CLIO_INSTALL_DIR "/opt/clio")
set (CMAKE_INSTALL_PREFIX ${CLIO_INSTALL_DIR})
install (TARGETS clio_server DESTINATION bin)
file (READ example-config.json config)
string (REGEX REPLACE "./clio_log" "/var/log/clio/" config "${config}")
file (WRITE ${CMAKE_BINARY_DIR}/install-config.json "${config}")
install (FILES ${CMAKE_BINARY_DIR}/install-config.json DESTINATION etc RENAME config.json)
configure_file ("${CMAKE_SOURCE_DIR}/CMake/install/clio.service.in" "${CMAKE_BINARY_DIR}/clio.service")
install (FILES "${CMAKE_BINARY_DIR}/clio.service" DESTINATION /lib/systemd/system)

View File

@@ -1,291 +1,102 @@
cmake_minimum_required(VERSION 3.16.3)
project(clio)
cmake_minimum_required(VERSION 3.20)
project(clio VERSION ${CLIO_VERSION} HOMEPAGE_URL "https://github.com/XRPLF/clio"
DESCRIPTION "An XRP Ledger API Server"
)
# =========================== Options ====================================== #
option(verbose "Verbose build" FALSE)
option(tests "Build unit tests" FALSE)
option(integration_tests "Build integration tests" FALSE)
option(benchmark "Build benchmarks" FALSE)
option(docs "Generate doxygen docs" FALSE)
option(coverage "Build test coverage report" FALSE)
option(packaging "Create distribution packages" FALSE)
option(lint "Run clang-tidy checks during compilation" FALSE)
option(static "Statically linked Clio" FALSE)
option(snapshot "Build snapshot tool" FALSE)
option(time_trace "Build using -ftime-trace to create compiler trace reports" FALSE)
option(use_mold "Use mold linker" FALSE)
# ========================================================================== #
# Options #
# ========================================================================== #
option (verbose "Verbose build" FALSE)
option (tests "Build tests" FALSE)
option (docs "Generate doxygen docs" FALSE)
option (coverage "Build test coverage report" FALSE)
option (packaging "Create distribution packages" FALSE)
option (lint "Run clang-tidy checks during compilation" FALSE)
# ========================================================================== #
set (san "" CACHE STRING "Add sanitizer instrumentation")
set (CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
set_property (CACHE san PROPERTY STRINGS ";undefined;memory;address;thread")
set(san "" CACHE STRING "Add sanitizer instrumentation")
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
set_property(CACHE san PROPERTY STRINGS ";undefined;memory;address;thread")
# ========================================================================== #
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
# Include required modules
include (CMake/Ccache.cmake)
include (CheckCXXCompilerFlag)
include (CMake/ClangTidy.cmake)
include(Ccache)
include(CheckCXXCompilerFlag)
include(ClangTidy)
include(Linker)
add_library(clio_options INTERFACE)
target_compile_features(clio_options INTERFACE cxx_std_23) # Clio needs c++23 but deps can remain c++20 for now
target_include_directories(clio_options INTERFACE ${CMAKE_SOURCE_DIR}/src)
if (verbose)
set (CMAKE_VERBOSE_MAKEFILE TRUE)
set(CMAKE_VERBOSE_MAKEFILE TRUE)
endif ()
if (packaging)
add_definitions (-DPKG=1)
add_definitions(-DPKG=1)
target_compile_definitions(clio_options INTERFACE PKG=1)
endif ()
add_library (clio)
# Clio tweaks and checks
include (CMake/CheckCompiler.cmake)
include (CMake/Settings.cmake)
include (CMake/ClioVersion.cmake)
include (CMake/SourceLocation.cmake)
include(CheckCompiler)
include(Settings)
include(SourceLocation)
# Clio deps
include (CMake/deps/libxrpl.cmake)
include (CMake/deps/Boost.cmake)
include (CMake/deps/OpenSSL.cmake)
include (CMake/deps/Threads.cmake)
include (CMake/deps/libfmt.cmake)
include (CMake/deps/cassandra.cmake)
include(deps/libxrpl)
include(deps/Boost)
include(deps/OpenSSL)
include(deps/Threads)
include(deps/libfmt)
include(deps/cassandra)
include(deps/libbacktrace)
# TODO: Include directory will be wrong when installed.
target_include_directories (clio PUBLIC src)
target_compile_features (clio PUBLIC cxx_std_20)
add_subdirectory(src)
add_subdirectory(tests)
target_link_libraries (clio
PUBLIC Boost::boost
PUBLIC Boost::coroutine
PUBLIC Boost::program_options
PUBLIC Boost::system
PUBLIC Boost::log
PUBLIC Boost::log_setup
PUBLIC cassandra-cpp-driver::cassandra-cpp-driver
PUBLIC fmt::fmt
PUBLIC OpenSSL::Crypto
PUBLIC OpenSSL::SSL
PUBLIC xrpl::libxrpl
INTERFACE Threads::Threads
)
if (is_gcc)
# FIXME: needed on gcc for now
target_compile_definitions (clio PUBLIC BOOST_ASIO_DISABLE_CONCEPTS)
endif ()
target_sources (clio PRIVATE
## Main
src/main/impl/Build.cpp
## Backend
src/data/BackendCounters.cpp
src/data/BackendInterface.cpp
src/data/LedgerCache.cpp
src/data/cassandra/impl/Future.cpp
src/data/cassandra/impl/Cluster.cpp
src/data/cassandra/impl/Batch.cpp
src/data/cassandra/impl/Result.cpp
src/data/cassandra/impl/Tuple.cpp
src/data/cassandra/impl/SslContext.cpp
src/data/cassandra/Handle.cpp
src/data/cassandra/SettingsProvider.cpp
## ETL
src/etl/Source.cpp
src/etl/ProbingSource.cpp
src/etl/NFTHelpers.cpp
src/etl/ETLService.cpp
src/etl/ETLState.cpp
src/etl/LoadBalancer.cpp
src/etl/impl/ForwardCache.cpp
## Feed
src/feed/SubscriptionManager.cpp
## Web
src/web/impl/AdminVerificationStrategy.cpp
src/web/IntervalSweepHandler.cpp
## RPC
src/rpc/Errors.cpp
src/rpc/Factories.cpp
src/rpc/RPCHelpers.cpp
src/rpc/Counters.cpp
src/rpc/WorkQueue.cpp
src/rpc/common/Specs.cpp
src/rpc/common/Validators.cpp
src/rpc/common/MetaProcessors.cpp
src/rpc/common/impl/APIVersionParser.cpp
src/rpc/common/impl/HandlerProvider.cpp
## RPC handlers
src/rpc/handlers/AccountChannels.cpp
src/rpc/handlers/AccountCurrencies.cpp
src/rpc/handlers/AccountInfo.cpp
src/rpc/handlers/AccountLines.cpp
src/rpc/handlers/AccountNFTs.cpp
src/rpc/handlers/AccountObjects.cpp
src/rpc/handlers/AccountOffers.cpp
src/rpc/handlers/AccountTx.cpp
src/rpc/handlers/BookChanges.cpp
src/rpc/handlers/BookOffers.cpp
src/rpc/handlers/DepositAuthorized.cpp
src/rpc/handlers/GatewayBalances.cpp
src/rpc/handlers/Ledger.cpp
src/rpc/handlers/LedgerData.cpp
src/rpc/handlers/LedgerEntry.cpp
src/rpc/handlers/LedgerRange.cpp
src/rpc/handlers/NFTsByIssuer.cpp
src/rpc/handlers/NFTBuyOffers.cpp
src/rpc/handlers/NFTHistory.cpp
src/rpc/handlers/NFTInfo.cpp
src/rpc/handlers/NFTOffersCommon.cpp
src/rpc/handlers/NFTSellOffers.cpp
src/rpc/handlers/NoRippleCheck.cpp
src/rpc/handlers/Random.cpp
src/rpc/handlers/TransactionEntry.cpp
## Util
src/util/config/Config.cpp
src/util/log/Logger.cpp
src/util/prometheus/Http.cpp
src/util/prometheus/Label.cpp
src/util/prometheus/Metrics.cpp
src/util/prometheus/Prometheus.cpp
src/util/Random.cpp
src/util/Taggable.cpp)
# Clio server
add_executable (clio_server src/main/Main.cpp)
target_link_libraries (clio_server PRIVATE clio)
target_link_options(clio_server
PRIVATE
$<$<AND:$<NOT:$<BOOL:${APPLE}>>,$<NOT:$<BOOL:${san}>>>:-static-libstdc++ -static-libgcc>
)
# Unittesting
if (tests)
set (TEST_TARGET clio_tests)
add_executable (${TEST_TARGET}
# Common
unittests/Main.cpp
unittests/Playground.cpp
unittests/LoggerTests.cpp
unittests/ConfigTests.cpp
unittests/ProfilerTests.cpp
unittests/JsonUtilTests.cpp
unittests/DOSGuardTests.cpp
unittests/SubscriptionTests.cpp
unittests/SubscriptionManagerTests.cpp
unittests/util/TestObject.cpp
unittests/util/StringUtils.cpp
unittests/util/prometheus/CounterTests.cpp
unittests/util/prometheus/GaugeTests.cpp
unittests/util/prometheus/HttpTests.cpp
unittests/util/prometheus/LabelTests.cpp
unittests/util/prometheus/MetricsTests.cpp
# ETL
unittests/etl/ExtractionDataPipeTests.cpp
unittests/etl/ExtractorTests.cpp
unittests/etl/TransformerTests.cpp
unittests/etl/CacheLoaderTests.cpp
unittests/etl/AmendmentBlockHandlerTests.cpp
unittests/etl/LedgerPublisherTests.cpp
unittests/etl/ETLStateTests.cpp
# RPC
unittests/rpc/ErrorTests.cpp
unittests/rpc/BaseTests.cpp
unittests/rpc/RPCHelpersTests.cpp
unittests/rpc/CountersTests.cpp
unittests/rpc/APIVersionTests.cpp
unittests/rpc/ForwardingProxyTests.cpp
unittests/rpc/WorkQueueTests.cpp
unittests/rpc/AmendmentsTests.cpp
unittests/rpc/JsonBoolTests.cpp
## RPC handlers
unittests/rpc/handlers/DefaultProcessorTests.cpp
unittests/rpc/handlers/TestHandlerTests.cpp
unittests/rpc/handlers/AccountCurrenciesTests.cpp
unittests/rpc/handlers/AccountLinesTests.cpp
unittests/rpc/handlers/AccountTxTests.cpp
unittests/rpc/handlers/AccountOffersTests.cpp
unittests/rpc/handlers/AccountInfoTests.cpp
unittests/rpc/handlers/AccountChannelsTests.cpp
unittests/rpc/handlers/AccountNFTsTests.cpp
unittests/rpc/handlers/BookOffersTests.cpp
unittests/rpc/handlers/DepositAuthorizedTests.cpp
unittests/rpc/handlers/GatewayBalancesTests.cpp
unittests/rpc/handlers/TxTests.cpp
unittests/rpc/handlers/TransactionEntryTests.cpp
unittests/rpc/handlers/LedgerEntryTests.cpp
unittests/rpc/handlers/LedgerRangeTests.cpp
unittests/rpc/handlers/NoRippleCheckTests.cpp
unittests/rpc/handlers/ServerInfoTests.cpp
unittests/rpc/handlers/PingTests.cpp
unittests/rpc/handlers/RandomTests.cpp
unittests/rpc/handlers/NFTInfoTests.cpp
unittests/rpc/handlers/NFTBuyOffersTests.cpp
unittests/rpc/handlers/NFTsByIssuerTest.cpp
unittests/rpc/handlers/NFTSellOffersTests.cpp
unittests/rpc/handlers/NFTHistoryTests.cpp
unittests/rpc/handlers/SubscribeTests.cpp
unittests/rpc/handlers/UnsubscribeTests.cpp
unittests/rpc/handlers/LedgerDataTests.cpp
unittests/rpc/handlers/AccountObjectsTests.cpp
unittests/rpc/handlers/BookChangesTests.cpp
unittests/rpc/handlers/LedgerTests.cpp
unittests/rpc/handlers/VersionHandlerTests.cpp
# Backend
unittests/data/BackendFactoryTests.cpp
unittests/data/BackendCountersTests.cpp
unittests/data/cassandra/BaseTests.cpp
unittests/data/cassandra/BackendTests.cpp
unittests/data/cassandra/RetryPolicyTests.cpp
unittests/data/cassandra/SettingsProviderTests.cpp
unittests/data/cassandra/ExecutionStrategyTests.cpp
unittests/data/cassandra/AsyncExecutorTests.cpp
# Webserver
unittests/web/AdminVerificationTests.cpp
unittests/web/ServerTests.cpp
unittests/web/RPCServerHandlerTests.cpp
unittests/web/WhitelistHandlerTests.cpp
unittests/web/SweepHandlerTests.cpp)
include (CMake/deps/gtest.cmake)
# See https://github.com/google/googletest/issues/3475
gtest_discover_tests (clio_tests DISCOVERY_TIMEOUT 10)
# Fix for dwarf5 bug on ci
target_compile_options (clio PUBLIC -gdwarf-4)
target_compile_definitions (${TEST_TARGET} PUBLIC UNITTEST_BUILD)
target_include_directories (${TEST_TARGET} PRIVATE unittests)
target_link_libraries (${TEST_TARGET} PUBLIC clio gtest::gtest)
# Generate `clio_tests-ccov` if coverage is enabled
# Note: use `make clio_tests-ccov` to generate report
if (coverage)
target_compile_definitions(${TEST_TARGET} PRIVATE COVERAGE_ENABLED)
include (CMake/Coverage.cmake)
add_coverage (${TEST_TARGET})
endif ()
if (benchmark)
add_subdirectory(benchmarks)
endif ()
# Enable selected sanitizer if enabled via `san`
if (san)
target_compile_options (clio
PUBLIC
# Sanitizers recommend minimum of -O1 for reasonable performance
$<$<CONFIG:Debug>:-O1>
${SAN_FLAG}
-fno-omit-frame-pointer)
target_compile_definitions (clio
PUBLIC
$<$<STREQUAL:${san},address>:SANITIZER=ASAN>
$<$<STREQUAL:${san},thread>:SANITIZER=TSAN>
$<$<STREQUAL:${san},memory>:SANITIZER=MSAN>
$<$<STREQUAL:${san},undefined>:SANITIZER=UBSAN>)
target_link_libraries (clio INTERFACE ${SAN_FLAG} ${SAN_LIB})
set(SUPPORTED_SANITIZERS "address" "thread" "memory" "undefined")
if (NOT san IN_LIST SUPPORTED_SANITIZERS)
message(FATAL_ERROR "Error: Unsupported sanitizer '${san}'. Supported values are: ${SUPPORTED_SANITIZERS}.")
endif ()
# Sanitizers recommend minimum of -O1 for reasonable performance so we enable it for debug builds
set(SAN_OPTIMIZATION_FLAG "")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(SAN_OPTIMIZATION_FLAG -O1)
endif ()
target_compile_options(clio_options INTERFACE ${SAN_OPTIMIZATION_FLAG} ${SAN_FLAG} -fno-omit-frame-pointer)
target_compile_definitions(
clio_options INTERFACE $<$<STREQUAL:${san},address>:SANITIZER=ASAN> $<$<STREQUAL:${san},thread>:SANITIZER=TSAN>
$<$<STREQUAL:${san},memory>:SANITIZER=MSAN> $<$<STREQUAL:${san},undefined>:SANITIZER=UBSAN>
)
target_link_libraries(clio_options INTERFACE ${SAN_FLAG} ${SAN_LIB})
endif ()
# Generate `docs` target for doxygen documentation if enabled
# Note: use `make docs` to generate the documentation
# Generate `docs` target for doxygen documentation if enabled Note: use `make docs` to generate the documentation
if (docs)
include (CMake/Docs.cmake)
add_subdirectory(docs)
endif ()
include (CMake/install/install.cmake)
include(install/install)
if (packaging)
include (CMake/packaging.cmake) # This file exists only in build runner
include(cmake/packaging.cmake) # This file exists only in build runner
endif ()
if (snapshot)
add_subdirectory(tools/snapshot)
endif ()

View File

@@ -1,33 +1,57 @@
# Contributing
Thank you for your interest in contributing to the `clio` project 🙏
## Workflow
To contribute, please:
1. Fork the repository under your own user.
2. Create a new branch on which to commit/push your changes.
3. Write and test your code.
4. Ensure that your code compiles with the provided build engine and update the provided build engine as part of your PR where needed and where appropriate.
5. Where applicable, write test cases for your code and include those in `unittests`.
6. Ensure your code passes automated checks (e.g. clang-format)
5. Where applicable, write test cases for your code and include those in the relevant subfolder under `tests`.
6. Ensure your code passes [automated checks](#pre-commit-hooks)
7. Squash your commits (i.e. rebase) into as few commits as is reasonable to describe your changes at a high level (typically a single commit for a small change). See below for more details.
8. Open a PR to the main repository onto the _develop_ branch, and follow the provided template.
> **Note:** Please read the [Style guide](#style-guide).
## Install git hooks
Please run the following command in order to use git hooks that are helpful for `clio` development.
### `git lfs` hooks
``` bash
git config --local core.hooksPath .githooks
Install `git lfs` hooks using the following command:
```bash
git lfs install
```
## Git commands
This sections offers a detailed look at the git commands you will need to use to get your PR submitted.
> **Note:** You need to install Git LFS hooks before installing `pre-commit` hooks.
### `pre-commit` hooks
To ensure code quality and style, we use [`pre-commit`](https://pre-commit.com/).
Run the following command to enable `pre-commit` hooks that help with Clio development:
```bash
pip3 install pre-commit
pre-commit install --hook-type pre-commit --hook-type pre-push
```
`pre-commit` takes care of running each tool in [`.pre-commit-config.yaml`](https://github.com/XRPLF/clio/blob/develop/.pre-commit-config.yaml) in a separate environment.
`pre-commit` also attempts to automatically use Doxygen to verify that everything public in the codebase has doc comments.
If Doxygen is not installed, the hook issues a warning and recommends installing Doxygen for future commits.
### Git commands
This sections offers a detailed look at the git commands you will need to use to get your PR submitted.
Please note that there are more than one way to do this and these commands are provided for your convenience.
At this point it's assumed that you have already finished working on your feature/bug.
> **Important:** Before you issue any of the commands below, please hit the `Sync fork` button and make sure your fork's `develop` branch is up-to-date with the main `clio` repository.
``` bash
```bash
# Create a backup of your branch
git branch <your feature branch>_bk
@@ -37,18 +61,20 @@ git pull origin develop
git checkout <your feature branch>
git rebase -i develop
```
For each commit in the list other than the first one, enter `s` to squash.
After this is done, you will have the opportunity to write a message for the squashed commit.
> **Hint:** Please use **imperative mood** in the commit message, and capitalize the first word.
``` bash
```bash
# You should now have a single commit on top of a commit in `develop`
git log
```
> **Note:** If there are merge conflicts, please resolve them now.
``` bash
```bash
# Use the same commit message as you did above
git commit -m 'Your message'
git rebase --continue
@@ -56,19 +82,30 @@ git rebase --continue
> **Important:** If you have no GPG keys set up, please follow [this tutorial](https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account)
``` bash
```bash
# Sign the commit with your GPG key, and push your changes
git commit --amend -S
git push --force
```
## Fixing issues found during code review
### Use ccache (optional)
Clio uses `ccache` to speed up compilation. If you want to use it, please make sure it is installed on your machine.
CMake will automatically detect it and use it if it is available.
### Opening a pull request
When a pull request is open CI will perform checks on the new code.
Title of the pull request and squashed commit should follow [conventional commits specification](https://www.conventionalcommits.org/en/v1.0.0/).
### Fixing issues found during code review
While your code is in review, it's possible that some changes will be requested by reviewer(s).
This section describes the process of adding your fixes.
We assume that you already made the required changes on your feature branch.
``` bash
```bash
# Add the changed code
git add <paths to add>
@@ -80,55 +117,72 @@ git commit -S -m "[FOLD] Your commit message"
git push
```
## After code review
### After code review
When your PR is approved and ready to merge, use `Squash and merge`.
The button for that is near the bottom of the PR's page on GitHub.
> **Important:** Please leave the automatically-generated mention/link to the PR in the subject line **and** in the description field add `"Fix #ISSUE_ID"` (replacing `ISSUE_ID` with yours) if the PR fixes an issue.
> **Note:** See [issues](https://github.com/XRPLF/clio/issues) to find the `ISSUE_ID` for the feature/bug you were working on.
# Style guide
## Style guide
This is a non-exhaustive list of recommended style guidelines. These are not always strictly enforced and serve as a way to keep the codebase coherent.
## Formatting
Code must conform to `clang-format` version 16, unless the result would be unreasonably difficult to read or maintain.
To change your code to conform use `clang-format -i <your changed files>`.
### Formatting
## Avoid
* Proliferation of nearly identical code.
* Proliferation of new files and classes unless it improves readability or/and compilation time.
* Unmanaged memory allocation and raw pointers.
* Macros (unless they add significant value.)
* Lambda patterns (unless these add significant value.)
* CPU or architecture-specific code unless there is a good reason to include it, and where it is used guard it with macros and provide explanatory comments.
* Importing new libraries unless there is a very good reason to do so.
Code must conform to `clang-format`, unless the result is unreasonably difficult to read or maintain.
In most cases the `pre-commit` hook takes care of formatting and fixes any issues automatically.
To manually format your code, run `pre-commit run clang-format --files <your changed files>` for C++ files, and `pre-commit run cmake-format --files <your changed files>` for CMake files.
## Seek to
* Extend functionality of existing code rather than creating new code.
* Prefer readability over terseness where important logic is concerned.
* Inline functions that are not used or are not likely to be used elsewhere in the codebase.
* Use clear and self-explanatory names for functions, variables, structs and classes.
* Use TitleCase for classes, structs and filenames, camelCase for function and variable names, lower case for namespaces and folders.
* Provide as many comments as you feel that a competent programmer would need to understand what your code does.
### Documentation
All public namespaces, classes and functions must be covered by doc (`doxygen`) comments. Everything that is not within a nested `impl` namespace is considered public.
> **Note:** Keep in mind that this is enforced by Clio's CI and your build will fail if newly added public code lacks documentation.
### Avoid
- Proliferation of nearly identical code.
- Proliferation of new files and classes unless it improves readability or/and compilation time.
- Unmanaged memory allocation and raw pointers.
- Macros (unless they add significant value.)
- Lambda patterns (unless these add significant value.)
- CPU or architecture-specific code unless there is a good reason to include it, and where it is used guard it with macros and provide explanatory comments.
- Importing new libraries unless there is a very good reason to do so.
### Seek to
- Extend functionality of existing code rather than creating new code.
- Prefer readability over terseness where important logic is concerned.
- Inline functions that are not used or are not likely to be used elsewhere in the codebase.
- Use clear and self-explanatory names for functions, variables, structs and classes.
- Use TitleCase for classes, structs and filenames, camelCase for function and variable names, lower case for namespaces and folders.
- Provide as many comments as you feel that a competent programmer would need to understand what your code does.
## Maintainers
# Maintainers
Maintainers are ecosystem participants with elevated access to the repository. They are able to push new code, make decisions on when a release should be made, etc.
## Code Review
### Code Review
A PR must be reviewed and approved by at least one of the maintainers before it can be merged.
## Adding and Removing
### Adding and Removing
New maintainers can be proposed by two existing maintainers, subject to a vote by a quorum of the existing maintainers. A minimum of 50% support and a 50% participation is required. In the event of a tie vote, the addition of the new maintainer will be rejected.
Existing maintainers can resign, or be subject to a vote for removal at the behest of two existing maintainers. A minimum of 60% agreement and 50% participation are required. The XRP Ledger Foundation will have the ability, for cause, to remove an existing maintainer without a vote.
## Existing Maintainers
### Existing Maintainers
* [cindyyan317](https://github.com/cindyyan317) (Ripple)
* [godexsoft](https://github.com/godexsoft) (Ripple)
* [legleux](https://github.com/legleux) (Ripple)
- [godexsoft](https://github.com/godexsoft) (Ripple)
- [kuznetsss](https://github.com/kuznetsss) (Ripple)
- [legleux](https://github.com/legleux) (Ripple)
- [PeterChen13579](https://github.com/PeterChen13579) (Ripple)
## Honorable ex-Maintainers
### Honorable ex-Maintainers
* [cjcobb23](https://github.com/cjcobb23) (ex-Ripple)
* [natenichols](https://github.com/natenichols) (ex-Ripple)
- [cindyyan317](https://github.com/cindyyan317) (ex-Ripple)
- [cjcobb23](https://github.com/cjcobb23) (ex-Ripple)
- [natenichols](https://github.com/natenichols) (ex-Ripple)

View File

@@ -1,16 +0,0 @@
PROJECT_NAME = "Clio"
INPUT = ../src ../unittests
EXCLUDE_PATTERNS = *Test*.cpp *Test*.h
RECURSIVE = YES
HAVE_DOT = YES
QUIET = YES
WARNINGS = NO
WARN_NO_PARAMDOC = NO
WARN_IF_INCOMPLETE_DOC = NO
WARN_IF_UNDOCUMENTED = NO
GENERATE_LATEX = NO
GENERATE_HTML = YES
SORT_MEMBERS_CTORS_1ST = YES

View File

@@ -1,8 +1,7 @@
ISC License
Copyright (c) 2022, the clio developers
Copyright (c) 2022, the clio developers
Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

381
README.md
View File

@@ -1,342 +1,49 @@
# Clio
# <img src='./docs/img/xrpl-logo.svg' width='40' valign="top" /> Clio <!-- markdownlint-disable-line MD033 MD045 -->
Clio is an XRP Ledger API server. Clio is optimized for RPC calls, over WebSocket or JSON-RPC.
Validated historical ledger and transaction data are stored in a more space-efficient format,
using up to 4 times less space than rippled. Clio can be configured to store data in Apache Cassandra or ScyllaDB,
allowing for scalable read throughput. Multiple Clio nodes can share access to the same dataset,
allowing for a highly available cluster of Clio nodes, without the need for redundant data storage or computation.
[![Build status](https://github.com/XRPLF/clio/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/XRPLF/clio/actions/workflows/build.yml?query=branch%3Adevelop)
[![Nightly release status](https://github.com/XRPLF/clio/actions/workflows/nightly.yml/badge.svg?branch=develop)](https://github.com/XRPLF/clio/actions/workflows/nightly.yml?query=branch%3Adevelop)
[![Clang-tidy checks status](https://github.com/XRPLF/clio/actions/workflows/clang-tidy.yml/badge.svg?branch=develop)](https://github.com/XRPLF/clio/actions/workflows/clang-tidy.yml?query=branch%3Adevelop)
[![Code coverage develop branch](https://codecov.io/gh/XRPLF/clio/branch/develop/graph/badge.svg?)](https://app.codecov.io/gh/XRPLF/clio)
Clio offers the full rippled API, with the caveat that Clio by default only returns validated data.
This means that `ledger_index` defaults to `validated` instead of `current` for all requests.
Other non-validated data is also not returned, such as information about queued transactions.
For requests that require access to the p2p network, such as `fee` or `submit`, Clio automatically forwards the request to a rippled node and propagates the response back to the client.
To access non-validated data for *any* request, simply add `ledger_index: "current"` to the request, and Clio will forward the request to rippled.
Clio is an XRP Ledger API server optimized for RPC calls over WebSocket or JSON-RPC.
It stores validated historical ledger and transaction data in a more space efficient format, and uses up to 4 times less space than [rippled](https://github.com/XRPLF/rippled).
Clio does not connect to the peer-to-peer network. Instead, Clio extracts data from a group of specified rippled nodes. Running Clio requires access to at least one rippled node
from which data can be extracted. The rippled node does not need to be running on the same machine as Clio.
Clio can be configured to store data in [Apache Cassandra](https://cassandra.apache.org/_/index.html) or [ScyllaDB](https://www.scylladb.com/), enabling scalable read throughput.
Multiple Clio nodes can share access to the same dataset, which allows for a highly available cluster of Clio nodes without the need for redundant data storage or computation.
## 📡 Clio and `rippled`
Clio offers the full `rippled` API, with the caveat that Clio by default only returns validated data. This means that `ledger_index` defaults to `validated` instead of `current` for all requests. Other non-validated data, such as information about queued transactions, is also not returned.
Clio retrieves data from a designated group of `rippled` nodes instead of connecting to the peer-to-peer network.
For requests that require access to the peer-to-peer network, such as `fee` or `submit`, Clio automatically forwards the request to a `rippled` node and propagates the response back to the client. To access non-validated data for _any_ request, simply add `ledger_index: "current"` to the request, and Clio will forward the request to `rippled`.
> [!NOTE]
> Clio requires access to at least one `rippled` node, which can run on the same machine as Clio or separately.
## 📚 Learn more about Clio
Below are some useful docs to learn more about Clio.
**For Developers**:
- [How to build Clio](./docs/build-clio.md)
- [Coverage report](./docs/coverage-report.md)
**For Operators**:
- [How to configure Clio and rippled](./docs/configure-clio.md)
- [How to run Clio](./docs/run-clio.md)
- [Logging](./docs/logging.md)
- [Troubleshooting guide](./docs/trouble_shooting.md)
**General reference material:**
- [API reference](https://xrpl.org/http-websocket-apis.html)
- [Developer docs](https://xrplf.github.io/clio)
- [Clio documentation](https://xrpl.org/the-clio-server.html#the-clio-server)
## 🆘 Help
## Help
Feel free to open an [issue](https://github.com/XRPLF/clio/issues) if you have a feature request or something doesn't work as expected.
If you have any questions about building, running, contributing, using clio or any other, you could always start a new [discussion](https://github.com/XRPLF/clio/discussions).
## Requirements
1. Access to a Cassandra cluster or ScyllaDB cluster. Can be local or remote.
2. Access to one or more rippled nodes. Can be local or remote.
## Building
Clio is built with CMake and uses Conan for managing dependencies.
It is written in C++20 and therefore requires a modern compiler.
## Prerequisites
### Minimum Requirements
- [Python 3.7](https://www.python.org/downloads/)
- [Conan 1.55](https://conan.io/downloads.html)
- [CMake 3.16](https://cmake.org/download/)
- [**Optional**] [GCovr](https://gcc.gnu.org/onlinedocs/gcc/Gcov.html) (needed for code coverage generation)
| Compiler | Version |
|-------------|---------|
| GCC | 11 |
| Clang | 14 |
| Apple Clang | 14.0.3 |
### Conan configuration
Clio does not require anything but default settings in your (`~/.conan/profiles/default`) Conan profile. It's best to have no extra flags specified.
> Mac example:
```
[settings]
os=Macos
os_build=Macos
arch=armv8
arch_build=armv8
compiler=apple-clang
compiler.version=14
compiler.libcxx=libc++
build_type=Release
compiler.cppstd=20
```
> Linux example:
```
[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=11
compiler.libcxx=libstdc++11
build_type=Release
compiler.cppstd=20
```
### Artifactory
1. Make sure artifactory is setup with Conan
```sh
conan remote add --insert 0 conan-non-prod http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
```
Now you should be able to download prebuilt `xrpl` package on some platforms.
2. Remove old packages you may have cached:
```sh
conan remove -f xrpl
```
## Building Clio
Navigate to Clio's root directory and perform
```sh
mkdir build && cd build
conan install .. --output-folder . --build missing --settings build_type=Release -o tests=True
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --parallel 8 # or without the number if you feel extra adventurous
```
If all goes well, `conan install` will find required packages and `cmake` will do the rest. you should end up with `clio_server` and `clio_tests` in the `build` directory (the current directory).
> **Tip:** You can omit the `-o tests=True` in `conan install` command above if you don't want to build `clio_tests`.
> **Tip:** To generate a Code Coverage report, include `-o coverage=True` in the `conan install` command above, along with `-o tests=True` to enable tests. After running the `cmake` commands, execute `make clio_tests-ccov`. The coverage report will be found at `clio_tests-llvm-cov/index.html`.
## Running
```sh
./clio_server config.json
```
Clio needs access to a rippled server. The config files of rippled and Clio need
to match in a certain sense.
Clio needs to know:
- the IP of rippled
- the port on which rippled is accepting unencrypted WebSocket connections
- the port on which rippled is handling gRPC requests
rippled needs to open:
- a port to accept unencrypted websocket connections
- a port to handle gRPC requests, with the IP(s) of Clio specified in the `secure_gateway` entry
The example configs of rippled and Clio are setups such that minimal changes are
required. When running locally, the only change needed is to uncomment the `port_grpc`
section of the rippled config. When running Clio and rippled on separate machines,
in addition to uncommenting the `port_grpc` section, a few other steps must be taken:
1. change the `ip` of the first entry of `etl_sources` to the IP where your rippled
server is running
2. open a public, unencrypted WebSocket port on your rippled server
3. change the IP specified in `secure_gateway` of `port_grpc` section of the rippled config
to the IP of your Clio server. This entry can take the form of a comma-separated list if
you are running multiple Clio nodes.
In addition, the parameter `start_sequence` can be included and configured within the top level of the config file. This parameter specifies the sequence of first ledger to extract if the database is empty. Note that ETL extracts ledgers in order and that no backfilling functionality currently exists, meaning Clio will not retroactively learn ledgers older than the one you specify. Choosing to specify this or not will yield the following behavior:
- If this setting is absent and the database is empty, ETL will start with the next ledger validated by the network.
- If this setting is present and the database is not empty, an exception is thrown.
In addition, the optional parameter `finish_sequence` can be added to the json file as well, specifying where the ledger can stop.
To add `start_sequence` and/or `finish_sequence` to the config.json file appropriately, they will be on the same top level of precedence as other parameters (such as `database`, `etl_sources`, `read_only`, etc.) and be specified with an integer. Here is an example snippet from the config file:
```json
"start_sequence": 12345,
"finish_sequence": 54321
```
The parameters `ssl_cert_file` and `ssl_key_file` can also be added to the top level of precedence of our Clio config. `ssl_cert_file` specifies the filepath for your SSL cert while `ssl_key_file` specifies the filepath for your SSL key. It is up to you how to change ownership of these folders for your designated Clio user. Your options include:
- Copying the two files as root somewhere that's accessible by the Clio user, then running `sudo chown` to your user
- Changing the permissions directly so it's readable by your Clio user
- Running Clio as root (strongly discouraged)
An example of how to specify `ssl_cert_file` and `ssl_key_file` in the config:
```json
"server": {
"ip": "0.0.0.0",
"port": 51233
},
"ssl_cert_file": "/full/path/to/cert.file",
"ssl_key_file": "/full/path/to/key.file"
```
Once your config files are ready, start rippled and Clio. It doesn't matter which you
start first, and it's fine to stop one or the other and restart at any given time.
Clio will wait for rippled to sync before extracting any ledgers. If there is already
data in Clio's database, Clio will begin extraction with the ledger whose sequence
is one greater than the greatest sequence currently in the database. Clio will wait
for this ledger to be available. Be aware that the behavior of rippled is to sync to
the most recent ledger on the network, and then backfill. If Clio is extracting ledgers
from rippled, and then rippled is stopped for a significant amount of time and then restarted, rippled
will take time to backfill to the next ledger that Clio wants. The time it takes is proportional
to the amount of time rippled was offline for. Also be aware that the amount rippled backfills
are dependent on the online_delete and ledger_history config values; if these values
are small, and rippled is stopped for a significant amount of time, rippled may never backfill
to the ledger that Clio wants. To avoid this situation, it is advised to keep history
proportional to the amount of time that you expect rippled to be offline. For example, if you
expect rippled to be offline for a few days from time to time, you should keep at least
a few days of history. If you expect rippled to never be offline, then you can keep a very small
amount of history.
Clio can use multiple rippled servers as a data source. Simply add more entries to
the `etl_sources` section. Clio will load balance requests across the servers specified
in this list. As long as one rippled server is up and synced, Clio will continue
extracting ledgers.
In contrast to rippled, Clio will answer RPC requests for the data already in the
database as soon as the server starts. Clio doesn't wait to sync to the network, or
for rippled to sync.
When starting Clio with a fresh database, Clio needs to download a ledger in full.
This can take some time, and depends on database throughput. With a moderately fast
database, this should take less than 10 minutes. If you did not properly set `secure_gateway`
in the `port_grpc` section of rippled, this step will fail. Once the first ledger
is fully downloaded, Clio only needs to extract the changed data for each ledger,
so extraction is much faster and Clio can keep up with rippled in real-time. Even under
intense load, Clio should not lag behind the network, as Clio is not processing the data,
and is simply writing to a database. The throughput of Clio is dependent on the throughput
of your database, but a standard Cassandra or Scylla deployment can handle
the write load of the XRP Ledger without any trouble. Generally the performance considerations
come on the read side, and depends on the number of RPC requests your Clio nodes
are serving. Be aware that very heavy read traffic can impact write throughput. Again, this
is on the database side, so if you are seeing this, upgrade your database.
It is possible to run multiple Clio nodes that share access to the same database.
The Clio nodes don't need to know about each other. You can simply spin up more Clio
nodes pointing to the same database as you wish, and shut them down as you wish.
On startup, each Clio node queries the database for the latest ledger. If this latest
ledger does not change for some time, the Clio node begins extracting ledgers
and writing to the database. If the Clio node detects a ledger that it is trying to
write has already been written, the Clio node will backoff and stop writing. If later
the Clio node sees no ledger written for some time, it will start writing again.
This algorithm ensures that at any given time, one and only one Clio node is writing
to the database.
It is possible to force Clio to only read data, and to never become a writer.
To do this, set `read_only: true` in the config. One common setup is to have a
small number of writer nodes that are inaccessible to clients, with several
read only nodes handling client requests. The number of read only nodes can be scaled
up or down in response to request volume.
When using multiple rippled servers as data sources and multiple Clio nodes,
each Clio node should use the same set of rippled servers as sources. The order doesn't matter.
The only reason not to do this is if you are running servers in different regions, and
you want the Clio nodes to extract from servers in their region. However, if you
are doing this, be aware that database traffic will be flowing across regions,
which can cause high latencies. A possible alternative to this is to just deploy
a database in each region, and the Clio nodes in each region use their region's database.
This is effectively two systems.
Clio supports API versioning as [described here](https://xrpl.org/request-formatting.html#api-versioning).
It's possible to configure `minimum`, `maximum` and `default` version like so:
```json
"api_version": {
"min": 1,
"max": 2,
"default": 1
}
```
All of the above are optional.
Clio will fallback to hardcoded defaults when not specified in the config file or configured values are outside
of the minimum and maximum supported versions hardcoded in `src/rpc/common/APIVersion.h`.
> **Note:** See `example-config.json` for more details.
## Admin rights for requests
By default clio checks admin privileges by IP address from request (only `127.0.0.1` is considered to be an admin).
It is not very secure because the IP could be spoofed.
For a better security `admin_password` could be provided in the `server` section of clio's config:
```json
"server": {
"admin_password": "secret"
}
```
If the password is presented in the config, clio will check the Authorization header (if any) in each request for the password.
The Authorization header should contain type `Password` and the password from the config, e.g. `Password secret`.
Exactly equal password gains admin rights for the request or a websocket connection.
## Prometheus metrics collection
Clio natively supports Prometheus metrics collection. It accepts Prometheus requests on the port configured in `server` section of config.
Prometheus metrics are enabled by default. To disable it add `"prometheus_enabled": false` to the config.
It is important to know that clio responds to Prometheus request only if they are admin requests, so Prometheus should be configured to send admin password in header.
There is an example of docker-compose file, Prometheus and Grafana configs in [examples/infrastructure](examples/infrastructure).
## Using clang-tidy for static analysis
Minimum clang-tidy version required is 16.0.
Clang-tidy could be run by cmake during building the project.
For that provide the option `-o lint=True` for `conan install` command:
```sh
conan install .. --output-folder . --build missing --settings build_type=Release -o tests=True -o lint=True
```
By default cmake will try to find clang-tidy automatically in your system.
To force cmake use desired binary set `CLIO_CLANG_TIDY_BIN` environment variable as path to clang-tidy binary.
E.g.:
```sh
export CLIO_CLANG_TIDY_BIN=/opt/homebrew/opt/llvm@16/bin/clang-tidy
```
## Developing against `rippled` in standalone mode
If you wish you develop against a `rippled` instance running in standalone
mode there are a few quirks of both clio and rippled you need to keep in mind.
You must:
1. Advance the `rippled` ledger to at least ledger 256
2. Wait 10 minutes before first starting clio against this standalone node.
## Logging
Clio provides several logging options, all are configurable via the config file and are detailed below.
`log_level`: The minimum level of severity at which the log message will be outputted by default.
Severity options are `trace`, `debug`, `info`, `warning`, `error`, `fatal`. Defaults to `info`.
`log_format`: The format of log lines produced by clio. Defaults to `"%TimeStamp% (%SourceLocation%) [%ThreadID%] %Channel%:%Severity% %Message%"`.
Each of the variables expands like so
- `TimeStamp`: The full date and time of the log entry
- `SourceLocation`: A partial path to the c++ file and the line number in said file (`source/file/path:linenumber`)
- `ThreadID`: The ID of the thread the log entry is written from
- `Channel`: The channel that this log entry was sent to
- `Severity`: The severity (aka log level) the entry was sent at
- `Message`: The actual log message
`log_channels`: An array of json objects, each overriding properties for a logging `channel`.
At the moment of writing, only `log_level` can be overriden using this mechanism.
Each object is of this format:
```json
{
"channel": "Backend",
"log_level": "fatal"
}
```
If no override is present for a given channel, that channel will log at the severity specified by the global `log_level`.
Overridable log channels: `Backend`, `WebServer`, `Subscriptions`, `RPC`, `ETL` and `Performance`.
> **Note:** See `example-config.json` for more details.
`log_to_console`: Enable/disable log output to console. Options are `true`/`false`. Defaults to true.
`log_directory`: Path to the directory where log files are stored. If such directory doesn't exist, Clio will create it. If not specified, logs are not written to a file.
`log_rotation_size`: The max size of the log file in **megabytes** before it will rotate into a smaller file. Defaults to 2GB.
`log_directory_max_size`: The max size of the log directory in **megabytes** before old log files will be
deleted to free up space. Defaults to 50GB.
`log_rotation_hour_interval`: The time interval in **hours** after the last log rotation to automatically
rotate the current log file. Defaults to 12 hours.
Note, time-based log rotation occurs dependently on size-based log rotation, where if a
size-based log rotation occurs, the timer for the time-based rotation will reset.
`log_tag_style`: Tag implementation to use. Must be one of:
- `uint`: Lock free and threadsafe but outputs just a simple unsigned integer
- `uuid`: Threadsafe and outputs a UUID tag
- `none`: Don't use tagging at all
## Cassandra / Scylla Administration
Since Clio relies on either Cassandra or Scylla for its database backend, here are some important considerations:
- Scylla, by default, will reserve all free RAM on a machine for itself. If you are running `rippled` or other services on the same machine, restrict its memory usage using the `--memory` argument: https://docs.scylladb.com/getting-started/scylla-in-a-shared-environment/
If you have any questions about building, running, contributing, using Clio or any other, you could always start a new [discussion](https://github.com/XRPLF/clio/discussions).

View File

@@ -1,23 +0,0 @@
# Release Notes
This document contains the release notes for `clio_server`, an XRP Ledger API Server.
To build and run `clio_server`, follow the instructions in [README.md](https://github.com/XRPLF/clio).
If you find issues or have a new idea, please open [an issue](https://github.com/XRPLF/clio/issues).
# Releases
## 0.1.0
Clio is an XRP Ledger API server. Clio is optimized for RPC calls, over websocket or JSON-RPC. Validated historical ledger and transaction data is stored in a more space efficient format, using up to 4 times less space than rippled.
Clio uses Cassandra or ScyllaDB, allowing for scalable read throughput. Multiple clio nodes can share access to the same dataset, allowing for a highly available cluster of clio nodes, without the need for redundant data storage or computation.
**0.1.0** is the first beta of Project Clio. It contains:
- `./src/backend` is the BackendInterface. This provides an abstraction for reading and writing information to a database.
- `./src/etl` is the ReportingETL. The classes in this folder are used to extract information from the P2P network and write it to a database, either locally or over the network.
- `./src/rpc` contains RPC handlers that are called by clients. These handlers should expose the same API as rippled.
- `./src/subscriptions` contains the SubscriptionManager. This manages publishing to clients subscribing to streams or accounts.
- `./src/webserver` contains a flex server that handles both http/s and ws/s traffic on a single port.
- `./unittests` simple unit tests that write to and read from a database to verify that the ETL works.

18
benchmarks/CMakeLists.txt Normal file
View File

@@ -0,0 +1,18 @@
add_executable(clio_benchmark)
target_sources(
clio_benchmark
PRIVATE # Common
Main.cpp
Playground.cpp
# ExecutionContext
util/async/ExecutionContextBenchmarks.cpp
# Logger
util/log/LoggerBenchmark.cpp
)
include(deps/gbench)
target_include_directories(clio_benchmark PRIVATE .)
target_link_libraries(clio_benchmark PUBLIC clio_util benchmark::benchmark_main)
set_target_properties(clio_benchmark PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

View File

@@ -17,10 +17,6 @@
*/
//==============================================================================
#pragma once
#include <benchmark/benchmark.h>
#include <gmock/gmock.h>
struct MockAmendmentBlockHandler {
MOCK_METHOD(void, onAmendmentBlock, (), ());
};
BENCHMARK_MAIN();

45
benchmarks/Playground.cpp Normal file
View File

@@ -0,0 +1,45 @@
//------------------------------------------------------------------------------
/*
This file is part of clio: https://github.com/XRPLF/clio
Copyright (c) 2023, the clio developers.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
//==============================================================================
/*
* Use this file for temporary benchmarks and implementations.
* Usage example:
* ```
* ./clio_benchmarks
* --benchmark_time_unit=ms
* --benchmark_repetitions=10
* --benchmark_display_aggregates_only=true
* --benchmark_min_time=1x
* --benchmark_filter="Playground"
* ```
*
* Note: Please don't push your temporary work to the repo.
*/
// #include <benchmark/benchmark.h>
// static void
// benchmarkPlaygroundTest1(benchmark::State& state)
// {
// for (auto _ : state) {
// // ...
// }
// }
// BENCHMARK(benchmarkPlaygroundTest1);

View File

@@ -0,0 +1,268 @@
//------------------------------------------------------------------------------
/*
This file is part of clio: https://github.com/XRPLF/clio
Copyright (c) 2024, the clio developers.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
//==============================================================================
#include "etl/ETLHelpers.hpp"
#include "util/Random.hpp"
#include "util/async/AnyExecutionContext.hpp"
#include "util/async/AnyOperation.hpp"
#include "util/async/context/BasicExecutionContext.hpp"
#include "util/async/context/SyncExecutionContext.hpp"
#include <benchmark/benchmark.h>
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <latch>
#include <optional>
#include <thread>
#include <vector>
using namespace util;
using namespace util::async;
class TestThread {
std::vector<std::thread> threads_;
etl::ThreadSafeQueue<std::optional<uint64_t>> q_;
etl::ThreadSafeQueue<uint64_t> res_;
public:
TestThread(std::vector<uint64_t> const& data) : q_(data.size()), res_(data.size())
{
for (auto el : data)
q_.push(el);
}
~TestThread()
{
for (auto& t : threads_) {
if (t.joinable())
t.join();
}
}
void
run(std::size_t numThreads)
{
std::latch completion{numThreads};
for (std::size_t i = 0; i < numThreads; ++i) {
q_.push(std::nullopt);
threads_.emplace_back([this, &completion]() { process(completion); });
}
completion.wait();
}
private:
void
process(std::latch& completion)
{
while (auto v = q_.pop()) {
if (not v.has_value())
break;
res_.push(v.value() * v.value());
}
completion.count_down(1);
}
};
template <typename CtxType>
class TestExecutionContextBatched {
etl::ThreadSafeQueue<std::optional<uint64_t>> q_;
etl::ThreadSafeQueue<uint64_t> res_;
std::size_t batchSize_;
public:
TestExecutionContextBatched(std::vector<uint64_t> const& data, std::size_t batchSize = 5000u)
: q_(data.size()), res_(data.size()), batchSize_(batchSize)
{
for (auto el : data)
q_.push(el);
}
void
run(std::size_t numThreads)
{
using OpType = typename CtxType::template StoppableOperation<void>;
CtxType ctx{numThreads};
std::vector<OpType> operations;
for (std::size_t i = 0; i < numThreads; ++i) {
q_.push(std::nullopt);
operations.push_back(ctx.execute(
[this](auto stopRequested) {
bool hasMore = true;
auto doOne = [this] {
auto v = q_.pop();
if (not v.has_value())
return false;
res_.push(v.value() * v.value());
return true;
};
while (not stopRequested and hasMore) {
for (std::size_t i = 0; i < batchSize_ and hasMore; ++i)
hasMore = doOne();
}
},
std::chrono::seconds{5}
));
}
for (auto& op : operations)
op.wait();
}
};
template <typename CtxType>
class TestAnyExecutionContextBatched {
etl::ThreadSafeQueue<std::optional<uint64_t>> q_;
etl::ThreadSafeQueue<uint64_t> res_;
std::size_t batchSize_;
public:
TestAnyExecutionContextBatched(std::vector<uint64_t> const& data, std::size_t batchSize = 5000u)
: q_(data.size()), res_(data.size()), batchSize_(batchSize)
{
for (auto el : data)
q_.push(el);
}
void
run(std::size_t numThreads)
{
CtxType ctx{numThreads};
AnyExecutionContext anyCtx{ctx};
std::vector<AnyOperation<void>> operations;
for (std::size_t i = 0; i < numThreads; ++i) {
q_.push(std::nullopt);
operations.push_back(anyCtx.execute(
[this](auto stopRequested) {
bool hasMore = true;
auto doOne = [this] {
auto v = q_.pop();
if (not v.has_value())
return false;
res_.push(v.value() * v.value());
return true;
};
while (not stopRequested and hasMore) {
for (std::size_t i = 0; i < batchSize_ and hasMore; ++i)
hasMore = doOne();
}
},
std::chrono::seconds{5}
));
}
for (auto& op : operations)
op.wait();
}
};
static auto
generateData()
{
constexpr auto kTOTAL = 10'000;
std::vector<uint64_t> data;
data.reserve(kTOTAL);
util::MTRandomGenerator randomGenerator;
for (auto i = 0; i < kTOTAL; ++i)
data.push_back(randomGenerator.uniform(1, 100'000'000));
return data;
}
static void
benchmarkThreads(benchmark::State& state)
{
auto data = generateData();
for (auto _ : state) {
TestThread t{data};
t.run(state.range(0));
}
}
template <typename CtxType>
static void
benchmarkExecutionContextBatched(benchmark::State& state)
{
auto data = generateData();
for (auto _ : state) {
TestExecutionContextBatched<CtxType> t{data, state.range(1)};
t.run(state.range(0));
}
}
template <typename CtxType>
static void
benchmarkAnyExecutionContextBatched(benchmark::State& state)
{
auto data = generateData();
for (auto _ : state) {
TestAnyExecutionContextBatched<CtxType> t{data, state.range(1)};
t.run(state.range(0));
}
}
// Simplest implementation using async queues and std::thread
BENCHMARK(benchmarkThreads)->Arg(1)->Arg(2)->Arg(4)->Arg(8);
// Same implementation using each of the available execution contexts
BENCHMARK(benchmarkExecutionContextBatched<PoolExecutionContext>)
->ArgsProduct({
{1, 2, 4, 8}, // threads
{500, 1000, 5000, 10000} // batch size
});
BENCHMARK(benchmarkExecutionContextBatched<CoroExecutionContext>)
->ArgsProduct({
{1, 2, 4, 8}, // threads
{500, 1000, 5000, 10000} // batch size
});
BENCHMARK(benchmarkExecutionContextBatched<SyncExecutionContext>)
->ArgsProduct({
{1, 2, 4, 8}, // threads
{500, 1000, 5000, 10000} // batch size
});
// Same implementations going thru AnyExecutionContext
BENCHMARK(benchmarkAnyExecutionContextBatched<PoolExecutionContext>)
->ArgsProduct({
{1, 2, 4, 8}, // threads
{500, 1000, 5000, 10000} // batch size
});
BENCHMARK(benchmarkAnyExecutionContextBatched<CoroExecutionContext>)
->ArgsProduct({
{1, 2, 4, 8}, // threads
{500, 1000, 5000, 10000} // batch size
});
BENCHMARK(benchmarkAnyExecutionContextBatched<SyncExecutionContext>)
->ArgsProduct({
{1, 2, 4, 8}, // threads
{500, 1000, 5000, 10000} // batch size
});

View File

@@ -0,0 +1,135 @@
//------------------------------------------------------------------------------
/*
This file is part of clio: https://github.com/XRPLF/clio
Copyright (c) 2025, the clio developers.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
//==============================================================================
#include "util/config/ConfigDefinition.hpp"
#include "util/log/Logger.hpp"
#include "util/prometheus/Prometheus.hpp"
#include <benchmark/benchmark.h>
#include <boost/log/core/core.hpp>
#include <boost/log/utility/setup/common_attributes.hpp>
#include <barrier>
#include <chrono>
#include <cstddef>
#include <filesystem>
#include <string>
#include <thread>
#include <vector>
using namespace util;
struct BenchmarkLoggingInitializer {
static constexpr auto kLOG_FORMAT = "%TimeStamp% (%SourceLocation%) [%ThreadID%] %Channel%:%Severity% %Message%";
static void
initFileLogging(LogService::FileLoggingParams const& params)
{
LogService::initFileLogging(params, kLOG_FORMAT);
}
};
namespace {
std::string
uniqueLogDir()
{
auto const epochTime = std::chrono::high_resolution_clock::now().time_since_epoch();
auto const tmpDir = std::filesystem::temp_directory_path();
std::string const dirName =
"logs_" + std::to_string(std::chrono::duration_cast<std::chrono::microseconds>(epochTime).count());
return tmpDir / "clio_benchmark" / dirName;
}
} // anonymous namespace
static void
benchmarkConcurrentFileLogging(benchmark::State& state)
{
boost::log::add_common_attributes();
auto const numThreads = static_cast<size_t>(state.range(0));
auto const messagesPerThread = static_cast<size_t>(state.range(1));
PrometheusService::init(config::getClioConfig());
auto const logDir = uniqueLogDir();
for (auto _ : state) {
state.PauseTiming();
std::filesystem::create_directories(logDir);
BenchmarkLoggingInitializer::initFileLogging({
.logDir = logDir,
.rotationSizeMB = 5,
.dirMaxSizeMB = 125,
.rotationHours = 24,
});
std::vector<std::thread> threads;
threads.reserve(numThreads);
std::chrono::high_resolution_clock::time_point start;
std::barrier barrier(numThreads, [&state, &start]() {
state.ResumeTiming();
start = std::chrono::high_resolution_clock::now();
});
for (size_t threadNum = 0; threadNum < numThreads; ++threadNum) {
threads.emplace_back([threadNum, messagesPerThread, &barrier]() {
barrier.arrive_and_wait();
Logger const threadLogger("Thread_" + std::to_string(threadNum));
for (size_t messageNum = 0; messageNum < messagesPerThread; ++messageNum) {
LOG(threadLogger.info()) << "Test log message #" << messageNum;
}
});
}
for (auto& thread : threads) {
thread.join();
}
boost::log::core::get()->flush();
auto const end = std::chrono::high_resolution_clock::now();
state.SetIterationTime(std::chrono::duration_cast<std::chrono::duration<double>>(end - start).count());
std::filesystem::remove_all(logDir);
}
auto const totalMessages = numThreads * messagesPerThread;
state.counters["TotalMessagesRate"] = benchmark::Counter(totalMessages, benchmark::Counter::kIsRate);
state.counters["Threads"] = numThreads;
state.counters["MessagesPerThread"] = messagesPerThread;
}
// One line of log message is around 110 bytes
// So, 100K messages is around 10.5MB
BENCHMARK(benchmarkConcurrentFileLogging)
->ArgsProduct({
// Number of threads
{1, 2, 4, 8},
// Messages per thread
{10'000, 100'000, 500'000},
})
->UseManualTime()
->Unit(benchmark::kMillisecond);

101
cliff.toml Normal file
View File

@@ -0,0 +1,101 @@
# git-cliff ~ default configuration file
# https://git-cliff.org/docs/configuration
#
# Lines starting with "#" are comments.
# Configuration options are organized into tables and keys.
# See documentation for more information on available options.
[changelog]
# template for the changelog header
header = """
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
Version {{ version | trim_start_matches(pat="v") }} of Clio, an XRP Ledger API server optimized for HTTP and WebSocket API calls, is now available.
{% else %}\
Clio, an XRP Ledger API server optimized for HTTP and WebSocket API calls, is under active development.
{% endif %}\
<!-- Please, remove one of the 2 following lines -->
This release adds new features and bug fixes.
This release adds bug fixes.
\
{% if version %}
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}
## [unreleased]
{% endif %}\
{% for group, commits in commits | filter(attribute="merge_commit", value=false) | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits %}
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
{% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message | upper_first }}{% if commit.remote.username %} by @{{ commit.remote.username }}{% endif %}\
{% endfor %}
{% endfor %}\n
"""
# template for the changelog footer
footer = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing s
trim = true
# postprocessors
postprocessors = [
# { pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL
]
# render body even when there are no releases to process
# render_always = true
# output file path
output = "CHANGELOG.md"
[git]
# parse the commits based on https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not conventional
filter_unconventional = true
# process each line of a commit as an individual commit
split_commits = false
# regex for preprocessing the commit messages
commit_preprocessors = [
# Replace issue numbers
#{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
# Check spelling of the commit with https://github.com/crate-ci/typos
# If the spelling is incorrect, it will be automatically fixed.
#{ pattern = '.*', replace_command = 'typos --write-changes -' },
]
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
{ message = "^style.*[Cc]lang-tidy auto fixes", skip = true },
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore: Commits", skip = true },
{ message = "^chore\\(deps.*\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
{ message = ".*", group = "<!-- 10 -->💼 Other" },
]
# filter out the commits that are not matched by commit parsers
filter_commits = false
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "oldest"
ignore_tags = "^.*-[b|rc].*"
[remote.github]
owner = "XRPLF"
repo = "clio"

View File

@@ -1,43 +0,0 @@
/*
* This is an example configuration file. Please do not use without modifying to suit your needs.
*/
{
"database": {
"type": "cassandra",
"cassandra": {
// This option can be used to setup a secure connect bundle connection
"secure_connect_bundle": "[path/to/zip. ignore if using contact_points]",
// The following options are used only if using contact_points
"contact_points": "[ip. ignore if using secure_connect_bundle]",
"port": "[port. ignore if using_secure_connect_bundle]",
// Authentication settings
"username": "[username, if any]",
"password": "[password, if any]",
// Other common settings
"keyspace": "clio",
"max_write_requests_outstanding": 25000,
"max_read_requests_outstanding": 30000,
"threads": 8
}
},
"etl_sources": [
{
"ip": "[rippled ip]",
"ws_port": "6006",
"grpc_port": "50051"
}
],
"dos_guard": {
"whitelist": [
"127.0.0.1"
]
},
"server": {
"ip": "0.0.0.0",
"port": 8080
},
"log_level": "debug",
"log_file": "./clio.log",
"extractor_threads": 8,
"read_only": false
}

5
cmake/Ccache.cmake Normal file
View File

@@ -0,0 +1,5 @@
find_program(CCACHE_PATH "ccache")
if (CCACHE_PATH)
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PATH}")
message(STATUS "Using ccache: ${CCACHE_PATH}")
endif ()

42
cmake/CheckCompiler.cmake Normal file
View File

@@ -0,0 +1,42 @@
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
message(FATAL_ERROR "Clang 16+ required for building clio")
endif ()
set(is_clang TRUE)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15)
message(FATAL_ERROR "AppleClang 15+ required for building clio")
endif ()
set(is_appleclang TRUE)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12)
message(FATAL_ERROR "GCC 12+ required for building clio")
endif ()
set(is_gcc TRUE)
else ()
message(FATAL_ERROR "Supported compilers: AppleClang 15+, Clang 16+, GCC 12+")
endif ()
if (san)
string(TOLOWER ${san} san)
set(SAN_FLAG "-fsanitize=${san}")
set(SAN_LIB "")
if (is_gcc)
if (san STREQUAL "address")
set(SAN_LIB "asan")
elseif (san STREQUAL "thread")
set(SAN_LIB "tsan")
elseif (san STREQUAL "memory")
set(SAN_LIB "msan")
elseif (san STREQUAL "undefined")
set(SAN_LIB "ubsan")
endif ()
endif ()
set(_saved_CRL ${CMAKE_REQUIRED_LIBRARIES})
set(CMAKE_REQUIRED_LIBRARIES "${SAN_FLAG};${SAN_LIB}")
check_cxx_compiler_flag(${SAN_FLAG} COMPILER_SUPPORTS_SAN)
set(CMAKE_REQUIRED_LIBRARIES ${_saved_CRL})
if (NOT COMPILER_SUPPORTS_SAN)
message(FATAL_ERROR "${san} sanitizer does not seem to be supported by your compiler")
endif ()
endif ()

33
cmake/ClangTidy.cmake Normal file
View File

@@ -0,0 +1,33 @@
if (lint)
# Find clang-tidy binary
if (DEFINED ENV{CLIO_CLANG_TIDY_BIN})
set(_CLANG_TIDY_BIN $ENV{CLIO_CLANG_TIDY_BIN})
if ((NOT EXISTS ${_CLANG_TIDY_BIN}) OR IS_DIRECTORY ${_CLANG_TIDY_BIN})
message(FATAL_ERROR "$ENV{CLIO_CLANG_TIDY_BIN} no such file. Check CLIO_CLANG_TIDY_BIN env variable")
endif ()
message(STATUS "Using clang-tidy from CLIO_CLANG_TIDY_BIN")
else ()
find_program(_CLANG_TIDY_BIN NAMES "clang-tidy-20" "clang-tidy" REQUIRED)
endif ()
if (NOT _CLANG_TIDY_BIN)
message(
FATAL_ERROR
"clang-tidy binary not found. Please set the CLIO_CLANG_TIDY_BIN environment variable or install clang-tidy."
)
endif ()
# Support for https://github.com/matus-chochlik/ctcache
find_program(CLANG_TIDY_CACHE_PATH NAMES "clang-tidy-cache")
if (CLANG_TIDY_CACHE_PATH)
set(_CLANG_TIDY_CMD "${CLANG_TIDY_CACHE_PATH};${_CLANG_TIDY_BIN}"
CACHE STRING "A combined command to run clang-tidy with caching wrapper"
)
else ()
set(_CLANG_TIDY_CMD "${_CLANG_TIDY_BIN}")
endif ()
set(CMAKE_CXX_CLANG_TIDY "${_CLANG_TIDY_CMD};--quiet")
message(STATUS "Using clang-tidy: ${CMAKE_CXX_CLANG_TIDY}")
endif ()

45
cmake/ClioVersion.cmake Normal file
View File

@@ -0,0 +1,45 @@
find_package(Git REQUIRED)
set(GIT_COMMAND describe --tags --exact-match)
execute_process(
COMMAND ${GIT_EXECUTABLE} ${GIT_COMMAND}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE TAG
RESULT_VARIABLE RC
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if (RC EQUAL 0)
# if we are on a tag, use the tag name
set(CLIO_VERSION "${TAG}")
set(DOC_CLIO_VERSION "${TAG}")
else ()
# if not, use YYYYMMDDHMS-<branch>-<git-rev>
set(GIT_COMMAND show -s --date=format:%Y%m%d%H%M%S --format=%cd)
execute_process(
COMMAND ${GIT_EXECUTABLE} ${GIT_COMMAND} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE DATE
OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ERROR_IS_FATAL ANY
)
set(GIT_COMMAND branch --show-current)
execute_process(
COMMAND ${GIT_EXECUTABLE} ${GIT_COMMAND} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ERROR_IS_FATAL ANY
)
set(GIT_COMMAND rev-parse --short HEAD)
execute_process(
COMMAND ${GIT_EXECUTABLE} ${GIT_COMMAND} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE REV
OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ERROR_IS_FATAL ANY
)
set(CLIO_VERSION "${DATE}-${BRANCH}-${REV}")
set(DOC_CLIO_VERSION "develop")
endif ()
if (CMAKE_BUILD_TYPE MATCHES Debug)
set(CLIO_VERSION "${CLIO_VERSION}+DEBUG")
endif ()
message(STATUS "Build version: ${CLIO_VERSION}")

361
cmake/CodeCoverage.cmake Normal file
View File

@@ -0,0 +1,361 @@
# Copyright (c) 2012 - 2017, Lars Bilke All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
# disclaimer.
#
# 1. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided with the distribution.
#
# 1. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# CHANGES:
#
# 2012-01-31, Lars Bilke - Enable Code Coverage
#
# 2013-09-17, Joakim Söderberg - Added support for Clang. - Some additional usage instructions.
#
# 2016-02-03, Lars Bilke - Refactored functions to use named parameters
#
# 2017-06-02, Lars Bilke - Merged with modified version from github.com/ufz/ogs
#
# 2019-05-06, Anatolii Kurotych - Remove unnecessary --coverage flag
#
# 2019-12-13, FeRD (Frank Dana) - Deprecate COVERAGE_LCOVR_EXCLUDES and COVERAGE_GCOVR_EXCLUDES lists in favor of
# tool-agnostic COVERAGE_EXCLUDES variable, or EXCLUDE setup arguments. - CMake 3.4+: All excludes can be specified
# relative to BASE_DIRECTORY - All setup functions: accept BASE_DIRECTORY, EXCLUDE list - Set lcov basedir with -b
# argument - Add automatic --demangle-cpp in lcovr, if 'c++filt' is available (can be overridden with NO_DEMANGLE option
# in setup_target_for_coverage_lcovr().) - Delete output dir, .info file on 'make clean' - Remove Python detection,
# since version mismatches will break gcovr - Minor cleanup (lowercase function names, update examples...)
#
# 2019-12-19, FeRD (Frank Dana) - Rename Lcov outputs, make filtered file canonical, fix cleanup for targets
#
# 2020-01-19, Bob Apthorpe - Added gfortran support
#
# 2020-02-17, FeRD (Frank Dana) - Make all add_custom_target()s VERBATIM to auto-escape wildcard characters in EXCLUDEs,
# and remove manual escaping from gcovr targets
#
# 2021-01-19, Robin Mueller - Add CODE_COVERAGE_VERBOSE option which will allow to print out commands which are run -
# Added the option for users to set the GCOVR_ADDITIONAL_ARGS variable to supply additional flags to the gcovr command
#
# 2020-05-04, Mihchael Davis - Add -fprofile-abs-path to make gcno files contain absolute paths - Fix BASE_DIRECTORY not
# working when defined - Change BYPRODUCT from folder to index.html to stop ninja from complaining about double defines
#
# 2021-05-10, Martin Stump - Check if the generator is multi-config before warning about non-Debug builds
#
# 2022-02-22, Marko Wehle - Change gcovr output from -o <filename> for --xml <filename> and --html <filename> output
# respectively. This will allow for Multiple Output Formats at the same time by making use of GCOVR_ADDITIONAL_ARGS,
# e.g. GCOVR_ADDITIONAL_ARGS "--txt".
#
# 2022-09-28, Sebastian Mueller - fix append_coverage_compiler_flags_to_target to correctly add flags - replace
# "-fprofile-arcs -ftest-coverage" with "--coverage" (equivalent)
#
# 2023-12-15, Bronek Kozicki - remove setup_target_for_coverage_lcov (slow) and setup_target_for_coverage_fastcov (no
# support for Clang) - fix Clang support by adding find_program( ... llvm-cov ) - add Apple Clang support by adding
# execute_process( COMMAND xcrun -f llvm-cov ... ) - add CODE_COVERAGE_GCOV_TOOL to explicitly select gcov tool and
# disable find_program - replace both functions setup_target_for_coverage_gcovr_* with single
# setup_target_for_coverage_gcovr - add support for all gcovr output formats
#
# USAGE:
#
# 1. Copy this file into your cmake modules path.
#
# 1. Add the following line to your CMakeLists.txt (best inside an if-condition using a CMake option() to enable it just
# optionally): include(CodeCoverage)
#
# 1. Append necessary compiler flags for all supported source files: append_coverage_compiler_flags() Or for specific
# target: append_coverage_compiler_flags_to_target(YOUR_TARGET_NAME)
#
# 3.a (OPTIONAL) Set appropriate optimization flags, e.g. -O0, -O1 or -Og
#
# 1. If you need to exclude additional directories from the report, specify them using full paths in the
# COVERAGE_EXCLUDES variable before calling setup_target_for_coverage_*(). Example: set(COVERAGE_EXCLUDES
# '${PROJECT_SOURCE_DIR}/src/dir1/*'
# '/path/to/my/src/dir2/*') Or, use the EXCLUDE argument to setup_target_for_coverage_*(). Example:
# setup_target_for_coverage_gcovr( NAME coverage EXECUTABLE testrunner EXCLUDE "${PROJECT_SOURCE_DIR}/src/dir1/*"
# "/path/to/my/src/dir2/*")
#
# 4.a NOTE: With CMake 3.4+, COVERAGE_EXCLUDES or EXCLUDE can also be set relative to the BASE_DIRECTORY (default:
# PROJECT_SOURCE_DIR) Example: set(COVERAGE_EXCLUDES "dir1/*") setup_target_for_coverage_gcovr( NAME coverage EXECUTABLE
# testrunner FORMAT html-details BASE_DIRECTORY "${PROJECT_SOURCE_DIR}/src" EXCLUDE "dir2/*")
#
# 4.b If you need to pass specific options to gcovr, specify them in GCOVR_ADDITIONAL_ARGS variable. Example: set
# (GCOVR_ADDITIONAL_ARGS --exclude-throw-branches --exclude-noncode-lines -s) setup_target_for_coverage_gcovr( NAME
# coverage EXECUTABLE testrunner EXCLUDE "src/dir1" "src/dir2")
#
# 1. Use the functions described below to create a custom make target which runs your test executable and produces a code
# coverage report.
#
# 1. Build a Debug build: cmake -DCMAKE_BUILD_TYPE=Debug .. make make my_coverage_target
include(CMakeParseArguments)
option(CODE_COVERAGE_VERBOSE "Verbose information" FALSE)
# Check prereqs
find_program(GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/scripts/test)
if (DEFINED CODE_COVERAGE_GCOV_TOOL)
set(GCOV_TOOL "${CODE_COVERAGE_GCOV_TOOL}")
elseif (DEFINED ENV{CODE_COVERAGE_GCOV_TOOL})
set(GCOV_TOOL "$ENV{CODE_COVERAGE_GCOV_TOOL}")
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang")
if (APPLE)
execute_process(COMMAND xcrun -f llvm-cov OUTPUT_VARIABLE LLVMCOV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
else ()
find_program(LLVMCOV_PATH llvm-cov)
endif ()
if (LLVMCOV_PATH)
set(GCOV_TOOL "${LLVMCOV_PATH} gcov")
endif ()
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
find_program(GCOV_PATH gcov)
set(GCOV_TOOL "${GCOV_PATH}")
endif ()
# Check supported compiler (Clang, GNU and Flang)
get_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
foreach (LANG ${LANGUAGES})
if ("${CMAKE_${LANG}_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang")
if ("${CMAKE_${LANG}_COMPILER_VERSION}" VERSION_LESS 3)
message(FATAL_ERROR "Clang version must be 3.0.0 or greater! Aborting...")
endif ()
elseif (NOT "${CMAKE_${LANG}_COMPILER_ID}" MATCHES "GNU" AND NOT "${CMAKE_${LANG}_COMPILER_ID}" MATCHES
"(LLVM)?[Ff]lang"
)
message(FATAL_ERROR "Compiler is not GNU or Flang! Aborting...")
endif ()
endforeach ()
set(COVERAGE_COMPILER_FLAGS "-g --coverage" CACHE INTERNAL "")
if (CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-fprofile-abs-path HAVE_cxx_fprofile_abs_path)
if (HAVE_cxx_fprofile_abs_path)
set(COVERAGE_CXX_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-abs-path")
endif ()
include(CheckCCompilerFlag)
check_c_compiler_flag(-fprofile-abs-path HAVE_c_fprofile_abs_path)
if (HAVE_c_fprofile_abs_path)
set(COVERAGE_C_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-abs-path")
endif ()
endif ()
set(CMAKE_Fortran_FLAGS_COVERAGE ${COVERAGE_COMPILER_FLAGS}
CACHE STRING "Flags used by the Fortran compiler during coverage builds." FORCE
)
set(CMAKE_CXX_FLAGS_COVERAGE ${COVERAGE_COMPILER_FLAGS}
CACHE STRING "Flags used by the C++ compiler during coverage builds." FORCE
)
set(CMAKE_C_FLAGS_COVERAGE ${COVERAGE_COMPILER_FLAGS}
CACHE STRING "Flags used by the C compiler during coverage builds." FORCE
)
set(CMAKE_EXE_LINKER_FLAGS_COVERAGE "" CACHE STRING "Flags used for linking binaries during coverage builds." FORCE)
set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE ""
CACHE STRING "Flags used by the shared libraries linker during coverage builds." FORCE
)
mark_as_advanced(
CMAKE_Fortran_FLAGS_COVERAGE CMAKE_CXX_FLAGS_COVERAGE CMAKE_C_FLAGS_COVERAGE CMAKE_EXE_LINKER_FLAGS_COVERAGE
CMAKE_SHARED_LINKER_FLAGS_COVERAGE
)
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if (NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR GENERATOR_IS_MULTI_CONFIG))
message(WARNING "Code coverage results with an optimised (non-Debug) build may be misleading")
endif () # NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR GENERATOR_IS_MULTI_CONFIG)
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
link_libraries(gcov)
endif ()
# Defines a target for running and collection code coverage information Builds dependencies, runs the given executable
# and outputs reports. NOTE! The executable should always have a ZERO as exit code otherwise the coverage generation
# will not complete.
#
# setup_target_for_coverage_gcovr( NAME ctest_coverage # New target name EXECUTABLE ctest -j
# ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR DEPENDENCIES executable_target # Dependencies to build
# first BASE_DIRECTORY "../" # Base directory for report # (defaults to PROJECT_SOURCE_DIR) FORMAT
# "cobertura" # Output format, one of: # xml cobertura sonarqube json-summary # json-details
# coveralls csv txt # html-single html-nested html-details # (xml is an alias to cobertura; # if no format is set,
# defaults to xml) EXCLUDE "src/dir1/*" "src/dir2/*" # Patterns to exclude (can be relative # to BASE_DIRECTORY,
# with CMake 3.4+) ) The user can set the variable GCOVR_ADDITIONAL_ARGS to supply additional flags to the GCVOR
# command.
function (setup_target_for_coverage_gcovr)
set(options NONE)
set(oneValueArgs BASE_DIRECTORY NAME FORMAT)
set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES)
cmake_parse_arguments(Coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if (NOT GCOV_TOOL)
message(FATAL_ERROR "Could not find gcov or llvm-cov tool! Aborting...")
endif ()
if (NOT GCOVR_PATH)
message(FATAL_ERROR "Could not find gcovr tool! Aborting...")
endif ()
# Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR
if (DEFINED Coverage_BASE_DIRECTORY)
get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE)
else ()
set(BASEDIR ${PROJECT_SOURCE_DIR})
endif ()
if (NOT DEFINED Coverage_FORMAT)
set(Coverage_FORMAT xml)
endif ()
if ("--output" IN_LIST GCOVR_ADDITIONAL_ARGS)
message(FATAL_ERROR "Unsupported --output option detected in GCOVR_ADDITIONAL_ARGS! Aborting...")
else ()
if ((Coverage_FORMAT STREQUAL "html-details") OR (Coverage_FORMAT STREQUAL "html-nested"))
set(GCOVR_OUTPUT_FILE ${PROJECT_BINARY_DIR}/${Coverage_NAME}/index.html)
set(GCOVR_CREATE_FOLDER ${PROJECT_BINARY_DIR}/${Coverage_NAME})
elseif (Coverage_FORMAT STREQUAL "html-single")
set(GCOVR_OUTPUT_FILE ${Coverage_NAME}.html)
elseif ((Coverage_FORMAT STREQUAL "json-summary") OR (Coverage_FORMAT STREQUAL "json-details")
OR (Coverage_FORMAT STREQUAL "coveralls")
)
set(GCOVR_OUTPUT_FILE ${Coverage_NAME}.json)
elseif (Coverage_FORMAT STREQUAL "txt")
set(GCOVR_OUTPUT_FILE ${Coverage_NAME}.txt)
elseif (Coverage_FORMAT STREQUAL "csv")
set(GCOVR_OUTPUT_FILE ${Coverage_NAME}.csv)
else ()
set(GCOVR_OUTPUT_FILE ${Coverage_NAME}.xml)
endif ()
endif ()
if ((Coverage_FORMAT STREQUAL "cobertura") OR (Coverage_FORMAT STREQUAL "xml"))
list(APPEND GCOVR_ADDITIONAL_ARGS --cobertura "${GCOVR_OUTPUT_FILE}")
list(APPEND GCOVR_ADDITIONAL_ARGS --cobertura-pretty)
set(Coverage_FORMAT cobertura) # overwrite xml
elseif (Coverage_FORMAT STREQUAL "sonarqube")
list(APPEND GCOVR_ADDITIONAL_ARGS --sonarqube "${GCOVR_OUTPUT_FILE}")
elseif (Coverage_FORMAT STREQUAL "json-summary")
list(APPEND GCOVR_ADDITIONAL_ARGS --json-summary "${GCOVR_OUTPUT_FILE}")
list(APPEND GCOVR_ADDITIONAL_ARGS --json-summary-pretty)
elseif (Coverage_FORMAT STREQUAL "json-details")
list(APPEND GCOVR_ADDITIONAL_ARGS --json "${GCOVR_OUTPUT_FILE}")
list(APPEND GCOVR_ADDITIONAL_ARGS --json-pretty)
elseif (Coverage_FORMAT STREQUAL "coveralls")
list(APPEND GCOVR_ADDITIONAL_ARGS --coveralls "${GCOVR_OUTPUT_FILE}")
list(APPEND GCOVR_ADDITIONAL_ARGS --coveralls-pretty)
elseif (Coverage_FORMAT STREQUAL "csv")
list(APPEND GCOVR_ADDITIONAL_ARGS --csv "${GCOVR_OUTPUT_FILE}")
elseif (Coverage_FORMAT STREQUAL "txt")
list(APPEND GCOVR_ADDITIONAL_ARGS --txt "${GCOVR_OUTPUT_FILE}")
elseif (Coverage_FORMAT STREQUAL "html-single")
list(APPEND GCOVR_ADDITIONAL_ARGS --html "${GCOVR_OUTPUT_FILE}")
list(APPEND GCOVR_ADDITIONAL_ARGS --html-self-contained)
elseif (Coverage_FORMAT STREQUAL "html-nested")
list(APPEND GCOVR_ADDITIONAL_ARGS --html-nested "${GCOVR_OUTPUT_FILE}")
elseif (Coverage_FORMAT STREQUAL "html-details")
list(APPEND GCOVR_ADDITIONAL_ARGS --html-details "${GCOVR_OUTPUT_FILE}")
else ()
message(FATAL_ERROR "Unsupported output style ${Coverage_FORMAT}! Aborting...")
endif ()
# Collect excludes (CMake 3.4+: Also compute absolute paths)
set(GCOVR_EXCLUDES "")
foreach (EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_GCOVR_EXCLUDES})
if (CMAKE_VERSION VERSION_GREATER 3.4)
get_filename_component(EXCLUDE ${EXCLUDE} ABSOLUTE BASE_DIR ${BASEDIR})
endif ()
list(APPEND GCOVR_EXCLUDES "${EXCLUDE}")
endforeach ()
list(REMOVE_DUPLICATES GCOVR_EXCLUDES)
# Combine excludes to several -e arguments
set(GCOVR_EXCLUDE_ARGS "")
foreach (EXCLUDE ${GCOVR_EXCLUDES})
list(APPEND GCOVR_EXCLUDE_ARGS "-e")
list(APPEND GCOVR_EXCLUDE_ARGS "${EXCLUDE}")
endforeach ()
# Set up commands which will be run to generate coverage data Run tests
set(GCOVR_EXEC_TESTS_CMD ${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS})
# Create folder
if (DEFINED GCOVR_CREATE_FOLDER)
set(GCOVR_FOLDER_CMD ${CMAKE_COMMAND} -E make_directory ${GCOVR_CREATE_FOLDER})
else ()
set(GCOVR_FOLDER_CMD echo) # dummy
endif ()
# Running gcovr
set(GCOVR_CMD
${GCOVR_PATH}
--gcov-executable
${GCOV_TOOL}
--gcov-ignore-parse-errors=negative_hits.warn_once_per_file
-r
${BASEDIR}
${GCOVR_ADDITIONAL_ARGS}
${GCOVR_EXCLUDE_ARGS}
--object-directory=${PROJECT_BINARY_DIR}
)
if (CODE_COVERAGE_VERBOSE)
message(STATUS "Executed command report")
message(STATUS "Command to run tests: ")
string(REPLACE ";" " " GCOVR_EXEC_TESTS_CMD_SPACED "${GCOVR_EXEC_TESTS_CMD}")
message(STATUS "${GCOVR_EXEC_TESTS_CMD_SPACED}")
if (NOT GCOVR_FOLDER_CMD STREQUAL "echo")
message(STATUS "Command to create a folder: ")
string(REPLACE ";" " " GCOVR_FOLDER_CMD_SPACED "${GCOVR_FOLDER_CMD}")
message(STATUS "${GCOVR_FOLDER_CMD_SPACED}")
endif ()
message(STATUS "Command to generate gcovr coverage data: ")
string(REPLACE ";" " " GCOVR_CMD_SPACED "${GCOVR_CMD}")
message(STATUS "${GCOVR_CMD_SPACED}")
endif ()
add_custom_target(
${Coverage_NAME}
COMMAND ${GCOVR_EXEC_TESTS_CMD}
COMMAND ${GCOVR_FOLDER_CMD}
COMMAND ${GCOVR_CMD}
BYPRODUCTS ${GCOVR_OUTPUT_FILE}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
DEPENDS ${Coverage_DEPENDENCIES}
VERBATIM # Protect arguments to commands
COMMENT "Running gcovr to produce code coverage report."
)
# Show info where to find the report
add_custom_command(
TARGET ${Coverage_NAME} POST_BUILD COMMAND ;
COMMENT "Code coverage report saved in ${GCOVR_OUTPUT_FILE} formatted as ${Coverage_FORMAT}"
)
endfunction () # setup_target_for_coverage_gcovr
function (append_coverage_compiler_flags)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE)
message(STATUS "Appending code coverage compiler flags: ${COVERAGE_COMPILER_FLAGS}")
endfunction () # append_coverage_compiler_flags
# Setup coverage for specific library
function (append_coverage_compiler_flags_to_target name mode)
separate_arguments(_flag_list NATIVE_COMMAND "${COVERAGE_COMPILER_FLAGS}")
target_compile_options(${name} ${mode} ${_flag_list})
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
target_link_libraries(${name} ${mode} gcov)
endif ()
endfunction ()

20
cmake/Docs.cmake Normal file
View File

@@ -0,0 +1,20 @@
find_package(Doxygen REQUIRED)
# See Doxyfile for these settings:
set(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/..)
set(USE_DOT "YES")
set(LINT "NO")
set(EXCLUDES "")
# ---
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT})
add_custom_target(
docs
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM
)

8
cmake/Linker.cmake Normal file
View File

@@ -0,0 +1,8 @@
if (use_mold)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
message(STATUS "Using Mold linker")
set(CMAKE_LINKER_TYPE MOLD)
else ()
message(FATAL_ERROR "Mold linker is only supported on Linux.")
endif ()
endif ()

82
cmake/Settings.cmake Normal file
View File

@@ -0,0 +1,82 @@
set(COMPILER_FLAGS
-pedantic
-Wall
-Wcast-align
-Wdouble-promotion
-Werror
-Wextra
-Wformat=2
-Wimplicit-fallthrough
-Wmisleading-indentation
-Wno-dangling-else
-Wno-deprecated-declarations
-Wno-narrowing
-Wno-unused-but-set-variable
-Wnon-virtual-dtor
-Wnull-dereference
-Wold-style-cast
-Wpedantic
-Wunreachable-code
-Wunused
# FIXME: The following bunch are needed for gcc12 atm.
-Wno-missing-requires
-Wno-restrict
-Wno-null-dereference
-Wno-maybe-uninitialized
-Wno-unknown-warning-option # and this to work with clang
# TODO: Address these and others in https://github.com/XRPLF/clio/issues/1273
)
# TODO: re-enable when we change CI #884 if (is_gcc AND NOT lint) list(APPEND COMPILER_FLAGS -Wduplicated-branches
# -Wduplicated-cond -Wlogical-op -Wuseless-cast ) endif ()
if (is_clang)
list(APPEND COMPILER_FLAGS -Wshadow # gcc is to aggressive with shadowing
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78147
)
endif ()
if (is_appleclang)
list(APPEND COMPILER_FLAGS -Wreorder-init-list)
endif ()
if (san)
# When building with sanitizers some compilers will actually produce extra warnings/errors. We don't want this yet, at
# least not until we have fixed all runtime issues reported by the sanitizers. Once that is done we can start removing
# some of these and trying to fix it in our codebase. We can never remove all of below because most of them are
# reported from deep inside libraries like boost or libxrpl.
#
# TODO: Address in https://github.com/XRPLF/clio/issues/1885
list(
APPEND
COMPILER_FLAGS
-Wno-error=tsan # Disables treating TSAN warnings as errors
-Wno-tsan # Disables TSAN warnings (thread-safety analysis)
-Wno-uninitialized # Disables warnings about uninitialized variables (AddressSanitizer, UndefinedBehaviorSanitizer,
# etc.)
-Wno-stringop-overflow # Disables warnings about potential string operation overflows (AddressSanitizer)
-Wno-unsafe-buffer-usage # Disables warnings about unsafe memory operations (AddressSanitizer)
-Wno-frame-larger-than # Disables warnings about stack frame size being too large (AddressSanitizer)
-Wno-unused-function # Disables warnings about unused functions (LeakSanitizer, memory-related issues)
-Wno-unused-but-set-variable # Disables warnings about unused variables (MemorySanitizer)
-Wno-thread-safety-analysis # Disables warnings related to thread safety usage (ThreadSanitizer)
-Wno-thread-safety # Disables warnings related to thread safety usage (ThreadSanitizer)
-Wno-sign-compare # Disables warnings about signed/unsigned comparison (UndefinedBehaviorSanitizer)
-Wno-nonnull # Disables warnings related to null pointer dereferencing (UndefinedBehaviorSanitizer)
-Wno-address # Disables warnings about address-related issues (UndefinedBehaviorSanitizer)
-Wno-array-bounds # Disables array bounds checks (UndefinedBehaviorSanitizer)
)
endif ()
# See https://github.com/cpp-best-practices/cppbestpractices/blob/master/02-Use_the_Tools_Available.md#gcc--clang for
# the flags description
if (time_trace)
if (is_clang OR is_appleclang)
list(APPEND COMPILER_FLAGS -ftime-trace)
else ()
message(FATAL_ERROR "Clang or AppleClang is required to use `-ftime-trace`")
endif ()
endif ()
target_compile_options(clio_options INTERFACE ${COMPILER_FLAGS})

View File

@@ -0,0 +1,11 @@
include(CheckIncludeFileCXX)
check_include_file_cxx("source_location" SOURCE_LOCATION_AVAILABLE)
if (SOURCE_LOCATION_AVAILABLE)
target_compile_definitions(clio_options INTERFACE "HAS_SOURCE_LOCATION")
endif ()
check_include_file_cxx("experimental/source_location" EXPERIMENTAL_SOURCE_LOCATION_AVAILABLE)
if (EXPERIMENTAL_SOURCE_LOCATION_AVAILABLE)
target_compile_definitions(clio_options INTERFACE "HAS_EXPERIMENTAL_SOURCE_LOCATION")
endif ()

4
cmake/deps/Boost.cmake Normal file
View File

@@ -0,0 +1,4 @@
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME ON)
find_package(Boost 1.82 REQUIRED CONFIG COMPONENTS program_options coroutine system log log_setup)

3
cmake/deps/OpenSSL.cmake Normal file
View File

@@ -0,0 +1,3 @@
find_package(OpenSSL 1.1.1 REQUIRED CONFIG)
set_target_properties(OpenSSL::SSL PROPERTIES INTERFACE_COMPILE_DEFINITIONS OPENSSL_NO_SSL2)

2
cmake/deps/Threads.cmake Normal file
View File

@@ -0,0 +1,2 @@
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

View File

@@ -0,0 +1 @@
find_package(cassandra-cpp-driver REQUIRED CONFIG)

1
cmake/deps/gbench.cmake Normal file
View File

@@ -0,0 +1 @@
find_package(benchmark REQUIRED CONFIG)

4
cmake/deps/gtest.cmake Normal file
View File

@@ -0,0 +1,4 @@
find_package(GTest REQUIRED)
enable_testing()
include(GoogleTest)

View File

@@ -0,0 +1,11 @@
if ("${san}" STREQUAL "")
target_compile_definitions(clio_options INTERFACE BOOST_STACKTRACE_LINK)
target_compile_definitions(clio_options INTERFACE BOOST_STACKTRACE_USE_BACKTRACE)
find_package(libbacktrace REQUIRED CONFIG)
else ()
# Some sanitizers (TSAN and ASAN for sure) can't be used with libbacktrace because they have their own backtracing
# capabilities and there are conflicts. In any case, this makes sure Clio code knows that backtrace is not available.
# See relevant conan profiles for sanitizers where we disable stacktrace in Boost explicitly.
target_compile_definitions(clio_options INTERFACE CLIO_WITHOUT_STACKTRACE)
message(STATUS "Sanitizer enabled, disabling stacktrace")
endif ()

Some files were not shown because too many files have changed in this diff Show More