mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-04 11:15:56 +00:00
Merge branch 'develop' into ximinez/online-delete-gaps
This commit is contained in:
6
.github/actions/build-deps/action.yml
vendored
6
.github/actions/build-deps/action.yml
vendored
@@ -28,6 +28,7 @@ runs:
|
||||
BUILD_DIR: ${{ inputs.build_dir }}
|
||||
BUILD_OPTION: ${{ inputs.force_build == 'true' && '*' || 'missing' }}
|
||||
BUILD_TYPE: ${{ inputs.build_type }}
|
||||
VERBOSITY: ${{ inputs.verbosity }}
|
||||
run: |
|
||||
echo 'Installing dependencies.'
|
||||
mkdir -p '${{ env.BUILD_DIR }}'
|
||||
@@ -38,7 +39,6 @@ runs:
|
||||
--options:host='&:tests=True' \
|
||||
--options:host='&:xrpld=True' \
|
||||
--settings:all build_type='${{ env.BUILD_TYPE }}' \
|
||||
--conf:all tools.build:verbosity='${{ inputs.verbosity }}' \
|
||||
--conf:all tools.compilation:verbosity='${{ inputs.verbosity }}' \
|
||||
--conf:all tools.build:jobs=$(nproc) \
|
||||
--conf:all tools.build:verbosity='${{ env.VERBOSITY }}' \
|
||||
--conf:all tools.compilation:verbosity='${{ env.VERBOSITY }}' \
|
||||
..
|
||||
|
||||
26
.github/scripts/strategy-matrix/linux.json
vendored
26
.github/scripts/strategy-matrix/linux.json
vendored
@@ -73,47 +73,61 @@
|
||||
"compiler_version": "20",
|
||||
"image_sha": "6948666"
|
||||
},
|
||||
{
|
||||
"distro_name": "rhel",
|
||||
"distro_version": "8",
|
||||
"compiler_name": "gcc",
|
||||
"compiler_version": "14",
|
||||
"image_sha": "10e69b4"
|
||||
},
|
||||
{
|
||||
"distro_name": "rhel",
|
||||
"distro_version": "8",
|
||||
"compiler_name": "clang",
|
||||
"compiler_version": "any",
|
||||
"image_sha": "10e69b4"
|
||||
},
|
||||
{
|
||||
"distro_name": "rhel",
|
||||
"distro_version": "9",
|
||||
"compiler_name": "gcc",
|
||||
"compiler_version": "12",
|
||||
"image_sha": "6948666"
|
||||
"image_sha": "10e69b4"
|
||||
},
|
||||
{
|
||||
"distro_name": "rhel",
|
||||
"distro_version": "9",
|
||||
"compiler_name": "gcc",
|
||||
"compiler_version": "13",
|
||||
"image_sha": "6948666"
|
||||
"image_sha": "10e69b4"
|
||||
},
|
||||
{
|
||||
"distro_name": "rhel",
|
||||
"distro_version": "9",
|
||||
"compiler_name": "gcc",
|
||||
"compiler_version": "14",
|
||||
"image_sha": "6948666"
|
||||
"image_sha": "10e69b4"
|
||||
},
|
||||
{
|
||||
"distro_name": "rhel",
|
||||
"distro_version": "9",
|
||||
"compiler_name": "clang",
|
||||
"compiler_version": "any",
|
||||
"image_sha": "6948666"
|
||||
"image_sha": "10e69b4"
|
||||
},
|
||||
{
|
||||
"distro_name": "rhel",
|
||||
"distro_version": "10",
|
||||
"compiler_name": "gcc",
|
||||
"compiler_version": "14",
|
||||
"image_sha": "6948666"
|
||||
"image_sha": "10e69b4"
|
||||
},
|
||||
{
|
||||
"distro_name": "rhel",
|
||||
"distro_version": "10",
|
||||
"compiler_name": "clang",
|
||||
"compiler_version": "any",
|
||||
"image_sha": "6948666"
|
||||
"image_sha": "10e69b4"
|
||||
},
|
||||
{
|
||||
"distro_name": "ubuntu",
|
||||
|
||||
1
.github/workflows/on-pr.yml
vendored
1
.github/workflows/on-pr.yml
vendored
@@ -103,6 +103,7 @@ jobs:
|
||||
if: ${{ needs.should-run.outputs.go == 'true' }}
|
||||
uses: ./.github/workflows/reusable-build-test.yml
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [linux, macos, windows]
|
||||
with:
|
||||
|
||||
1
.github/workflows/on-trigger.yml
vendored
1
.github/workflows/on-trigger.yml
vendored
@@ -65,6 +65,7 @@ jobs:
|
||||
build-test:
|
||||
uses: ./.github/workflows/reusable-build-test.yml
|
||||
strategy:
|
||||
fail-fast: ${{ github.event_name == 'merge_group' }}
|
||||
matrix:
|
||||
os: [linux, macos, windows]
|
||||
with:
|
||||
|
||||
2
.github/workflows/pre-commit.yml
vendored
2
.github/workflows/pre-commit.yml
vendored
@@ -9,7 +9,7 @@ on:
|
||||
jobs:
|
||||
# Call the workflow in the XRPLF/actions repo that runs the pre-commit hooks.
|
||||
run-hooks:
|
||||
uses: XRPLF/actions/.github/workflows/pre-commit.yml@af1b0f0d764cda2e5435f5ac97b240d4bd4d95d3
|
||||
uses: XRPLF/actions/.github/workflows/pre-commit.yml@a8d7472b450eb53a1e5228f64552e5974457a21a
|
||||
with:
|
||||
runs_on: ubuntu-latest
|
||||
container: '{ "image": "ghcr.io/xrplf/ci/tools-rippled-pre-commit:sha-a8c7be1" }'
|
||||
|
||||
2
.github/workflows/reusable-build-test.yml
vendored
2
.github/workflows/reusable-build-test.yml
vendored
@@ -42,7 +42,7 @@ jobs:
|
||||
- generate-matrix
|
||||
uses: ./.github/workflows/reusable-build-test-config.yml
|
||||
strategy:
|
||||
fail-fast: false
|
||||
fail-fast: ${{ github.event_name == 'merge_group' }}
|
||||
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
|
||||
max-parallel: 10
|
||||
with:
|
||||
|
||||
4
.github/workflows/reusable-notify-clio.yml
vendored
4
.github/workflows/reusable-notify-clio.yml
vendored
@@ -64,7 +64,9 @@ jobs:
|
||||
conan_remote_name: ${{ inputs.conan_remote_name }}
|
||||
conan_remote_url: ${{ inputs.conan_remote_url }}
|
||||
- name: Log into Conan remote
|
||||
run: conan remote login ${{ inputs.conan_remote_name }} "${{ secrets.conan_remote_username }}" --password "${{ secrets.conan_remote_password }}"
|
||||
env:
|
||||
CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }}
|
||||
run: conan remote login ${{ env.CONAN_REMOTE_NAME }} "${{ secrets.conan_remote_username }}" --password "${{ secrets.conan_remote_password }}"
|
||||
- name: Upload package
|
||||
env:
|
||||
CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
core:non_interactive=True
|
||||
core.download:parallel={{ os.cpu_count() }}
|
||||
core.upload:parallel={{ os.cpu_count() }}
|
||||
tools.build:jobs={{ (os.cpu_count() * 4/5) | int }}
|
||||
tools.build:jobs={{ os.cpu_count() - 1 }}
|
||||
|
||||
@@ -72,39 +72,23 @@ getAutofillSequence(Json::Value const& tx_json, RPC::JsonContext& context)
|
||||
}
|
||||
|
||||
static std::optional<Json::Value>
|
||||
autofillTx(Json::Value& tx_json, RPC::JsonContext& context)
|
||||
autofillSignature(Json::Value& sigObject)
|
||||
{
|
||||
if (!tx_json.isMember(jss::Fee))
|
||||
{
|
||||
// autofill Fee
|
||||
// Must happen after all the other autofills happen
|
||||
// Error handling/messaging works better that way
|
||||
auto feeOrError = RPC::getCurrentNetworkFee(
|
||||
context.role,
|
||||
context.app.config(),
|
||||
context.app.getFeeTrack(),
|
||||
context.app.getTxQ(),
|
||||
context.app,
|
||||
tx_json);
|
||||
if (feeOrError.isMember(jss::error))
|
||||
return feeOrError;
|
||||
tx_json[jss::Fee] = feeOrError;
|
||||
}
|
||||
|
||||
if (!tx_json.isMember(jss::SigningPubKey))
|
||||
if (!sigObject.isMember(jss::SigningPubKey))
|
||||
{
|
||||
// autofill SigningPubKey
|
||||
tx_json[jss::SigningPubKey] = "";
|
||||
sigObject[jss::SigningPubKey] = "";
|
||||
}
|
||||
|
||||
if (tx_json.isMember(jss::Signers))
|
||||
if (sigObject.isMember(jss::Signers))
|
||||
{
|
||||
if (!tx_json[jss::Signers].isArray())
|
||||
if (!sigObject[jss::Signers].isArray())
|
||||
return RPC::invalid_field_error("tx.Signers");
|
||||
// check multisigned signers
|
||||
for (unsigned index = 0; index < tx_json[jss::Signers].size(); index++)
|
||||
for (unsigned index = 0; index < sigObject[jss::Signers].size();
|
||||
index++)
|
||||
{
|
||||
auto& signer = tx_json[jss::Signers][index];
|
||||
auto& signer = sigObject[jss::Signers][index];
|
||||
if (!signer.isObject() || !signer.isMember(jss::Signer) ||
|
||||
!signer[jss::Signer].isObject())
|
||||
return RPC::invalid_field_error(
|
||||
@@ -129,16 +113,41 @@ autofillTx(Json::Value& tx_json, RPC::JsonContext& context)
|
||||
}
|
||||
}
|
||||
|
||||
if (!tx_json.isMember(jss::TxnSignature))
|
||||
if (!sigObject.isMember(jss::TxnSignature))
|
||||
{
|
||||
// autofill TxnSignature
|
||||
tx_json[jss::TxnSignature] = "";
|
||||
sigObject[jss::TxnSignature] = "";
|
||||
}
|
||||
else if (tx_json[jss::TxnSignature] != "")
|
||||
else if (sigObject[jss::TxnSignature] != "")
|
||||
{
|
||||
// Transaction must not be signed
|
||||
return rpcError(rpcTX_SIGNED);
|
||||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
static std::optional<Json::Value>
|
||||
autofillTx(Json::Value& tx_json, RPC::JsonContext& context)
|
||||
{
|
||||
if (!tx_json.isMember(jss::Fee))
|
||||
{
|
||||
// autofill Fee
|
||||
// Must happen after all the other autofills happen
|
||||
// Error handling/messaging works better that way
|
||||
auto feeOrError = RPC::getCurrentNetworkFee(
|
||||
context.role,
|
||||
context.app.config(),
|
||||
context.app.getFeeTrack(),
|
||||
context.app.getTxQ(),
|
||||
context.app,
|
||||
tx_json);
|
||||
if (feeOrError.isMember(jss::error))
|
||||
return feeOrError;
|
||||
tx_json[jss::Fee] = feeOrError;
|
||||
}
|
||||
|
||||
if (auto error = autofillSignature(tx_json))
|
||||
return *error;
|
||||
|
||||
if (!tx_json.isMember(jss::Sequence))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user