Compare commits

...

9 Commits

Author SHA1 Message Date
Denis Angell
c939b656f3 only build Release on release branch 2025-02-01 12:30:09 +01:00
Wietse Wind
fa71bda29c Artifact v4 continue on error 2025-02-01 08:58:13 +01:00
Wietse Wind
412593d7bc Update artifact 2025-02-01 08:57:48 +01:00
Wietse Wind
12d8342c34 Update artifact 2025-02-01 08:57:25 +01:00
tequ
d17f7151ab Fix HookResult(ExitType) when accept() is not called (#415) 2025-01-22 13:33:59 +10:00
tequ
4466175231 Update boost link for build-full.sh (#421) 2025-01-22 08:38:12 +10:00
tequ
621ca9c865 Add space to trace_float log (#424) 2025-01-22 08:34:33 +10:00
tequ
85a752235a add URITokenIssuer to account_flags for account_info (#404) 2024-12-16 16:10:01 +10:00
RichardAH
d878fd4a6e allow multiple datagram monitor endpoints (#408) 2024-12-14 08:44:40 +10:00
16 changed files with 72 additions and 40 deletions

View File

@@ -30,7 +30,7 @@ jobs:
git diff --exit-code | tee "clang-format.patch"
- name: Upload patch
if: failure() && steps.assert.outcome == 'failure'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
continue-on-error: true
with:
name: clang-format.patch

View File

@@ -18,7 +18,7 @@ jobs:
git diff --exit-code | tee "levelization.patch"
- name: Upload patch
if: failure() && steps.assert.outcome == 'failure'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
continue-on-error: true
with:
name: levelization.patch

View File

@@ -34,7 +34,21 @@ message(\"WasmEdge DONE\")
git checkout src/ripple/protocol/impl/BuildInfo.cpp &&
sed -i s/\"0.0.0\"/\"$(date +%Y).$(date +%-m).$(date +%-d)-$(git rev-parse --abbrev-ref HEAD)+$4\"/g src/ripple/protocol/impl/BuildInfo.cpp &&
cd release-build &&
cmake .. -DCMAKE_BUILD_TYPE=Release -DBoost_NO_BOOST_CMAKE=ON -DLLVM_DIR=/usr/lib64/llvm13/lib/cmake/llvm/ -DLLVM_LIBRARY_DIR=/usr/lib64/llvm13/lib/ -DWasmEdge_LIB=/usr/local/lib64/libwasmedge.a &&
if [[ "$(git rev-parse --abbrev-ref HEAD)" == "release" ]]; then
echo "On release branch: Building with Release configuration"
cmake .. -DCMAKE_BUILD_TYPE=Release -DBoost_NO_BOOST_CMAKE=ON \
-DLLVM_DIR=/usr/lib64/llvm13/lib/cmake/llvm/ \
-DLLVM_LIBRARY_DIR=/usr/lib64/llvm13/lib/ \
-DWasmEdge_LIB=/usr/local/lib64/libwasmedge.a
else
echo "Not on release branch ($BRANCH): Building with default configuration"
cmake .. -DCMAKE_BUILD_TYPE=Debug \
-DBoost_NO_BOOST_CMAKE=ON \
-DLLVM_DIR=/usr/lib64/llvm13/lib/cmake/llvm/ \
-DLLVM_LIBRARY_DIR=/usr/lib64/llvm13/lib/ \
-DWasmEdge_LIB=/usr/local/lib64/libwasmedge.a \
-Dassert=ON
fi
make -j$3 VERBOSE=1 &&
strip -s rippled &&
mv rippled xahaud &&

View File

@@ -92,7 +92,7 @@ pwd &&
tar -xzf cmake-3.23.1-linux-x86_64.tar.gz -C /hbb/ &&
echo "-- Install Boost 1.86.0 --" &&
pwd &&
( wget -nc -q https://boostorg.jfrog.io/artifactory/main/release/1.86.0/source/boost_1_86_0.tar.gz; echo "" ) &&
( wget -nc -q https://archives.boost.io/release/1.86.0/source/boost_1_86_0.tar.gz; echo "" ) &&
tar -xzf boost_1_86_0.tar.gz &&
cd boost_1_86_0 && ./bootstrap.sh && ./b2 link=static -j$3 && ./b2 install &&
cd ../ &&

View File

@@ -1217,9 +1217,10 @@ hook::apply(
.hookParamOverrides = hookParamOverrides,
.hookParams = hookParams,
.hookSkips = {},
.exitType =
hook_api::ExitType::ROLLBACK, // default is to rollback unless
// hook calls accept()
.exitType = applyCtx.view().rules().enabled(fixXahauV3)
? hook_api::ExitType::UNSET
: hook_api::ExitType::ROLLBACK, // default is to rollback
// unless hook calls accept()
.exitReason = std::string(""),
.exitCode = -1,
.hasCallback = hasCallback,
@@ -4790,7 +4791,7 @@ DEFINE_HOOK_FUNCTION(
if (float1 == 0)
{
j.trace() << "HookTrace[" << HC_ACC() << "]:"
j.trace() << "HookTrace[" << HC_ACC() << "]: "
<< (read_len == 0
? ""
: std::string_view(

View File

@@ -1527,7 +1527,7 @@ ApplicationImp::setup(boost::program_options::variables_map const& cmdline)
reportingETL_->start();
// Datagram monitor if applicable
if (!config_->standalone() && config_->DATAGRAM_MONITOR != "")
if (!config_->standalone() && !config_->DATAGRAM_MONITOR.empty())
{
datagram_monitor_ = std::make_unique<DatagramMonitor>(*this);
if (datagram_monitor_)

View File

@@ -996,15 +996,24 @@ private:
void
monitorThread()
{
auto endpoint = parseEndpoint(app_.config().DATAGRAM_MONITOR);
int sock = createSocket(endpoint);
std::vector<std::pair<EndpointInfo, int>> endpoints;
for (auto const& epStr : app_.config().DATAGRAM_MONITOR)
{
auto endpoint = parseEndpoint(epStr);
endpoints.push_back(
std::make_pair(endpoint, createSocket(endpoint)));
}
while (running_)
{
try
{
auto info = generateServerInfo();
sendPacket(sock, endpoint, info);
for (auto const& ep : endpoints)
{
sendPacket(ep.second, ep.first, info);
}
std::this_thread::sleep_for(std::chrono::seconds(1));
}
catch (const std::exception& e)
@@ -1015,7 +1024,10 @@ private:
}
}
close(sock);
for (auto const& ep : endpoints)
{
close(ep.second);
}
}
public:

View File

@@ -1270,10 +1270,18 @@ Transactor::executeHookChain(
if (results.back().exitType == hook_api::ExitType::WASM_ERROR)
{
JLOG(j_.warn()) << "HookError[" << account << "-"
<< ctx_.tx.getAccountID(sfAccount) << "]: "
<< ctx_.tx.getAccountID(sfAccount)
<< "]: Execution failure (graceful) "
<< "HookHash: " << hookHash;
}
if (results.back().exitType == hook_api::ExitType::UNSET)
{
JLOG(j_.warn())
<< "HookError[" << account << "-"
<< ctx_.tx.getAccountID(sfAccount)
<< "]: Execution failure (no exit type specified) "
<< "HookHash: " << hookHash;
}
return tecHOOK_REJECTED;
}
@@ -1298,7 +1306,7 @@ Transactor::executeHookChain(
{
JLOG(j_.warn())
<< "HookError[" << account << "-"
<< ctx_.tx.getAccountID(sfAccount) << "]: "
<< ctx_.tx.getAccountID(sfAccount)
<< "]: Execution failure (exceptional) "
<< "Exception: " << e.what() << " HookHash: " << hookHash;
@@ -1426,13 +1434,13 @@ Transactor::doHookCallback(
finalizeHookResult(callbackResult, ctx_, success);
JLOG(j_.trace()) << "HookInfo[" << callbackAccountID << "-"
<< ctx_.tx.getAccountID(sfAccount) << "]: "
<< "Callback finalizeHookResult = " << result;
<< ctx_.tx.getAccountID(sfAccount)
<< "]: Callback finalizeHookResult = " << result;
}
catch (std::exception& e)
{
JLOG(j_.fatal()) << "HookError[" << callbackAccountID << "-"
<< ctx_.tx.getAccountID(sfAccount) << "]: "
<< ctx_.tx.getAccountID(sfAccount)
<< "]: Callback failure " << e.what();
}
}
@@ -1678,13 +1686,13 @@ Transactor::doAgainAsWeak(
results.push_back(aawResult);
JLOG(j_.trace()) << "HookInfo[" << hookAccountID << "-"
<< ctx_.tx.getAccountID(sfAccount) << "]: "
<< " aaw Hook ExitCode = " << aawResult.exitCode;
<< ctx_.tx.getAccountID(sfAccount)
<< "]: aaw Hook ExitCode = " << aawResult.exitCode;
}
catch (std::exception& e)
{
JLOG(j_.fatal()) << "HookError[" << hookAccountID << "-"
<< ctx_.tx.getAccountID(sfAccount) << "]: "
<< ctx_.tx.getAccountID(sfAccount)
<< "]: aaw failure " << e.what();
}
}

View File

@@ -155,7 +155,7 @@ public:
std::map<std::string, PublicKey>
IMPORT_VL_KEYS; // hex string -> class PublicKey (for caching purposes)
std::string DATAGRAM_MONITOR;
std::vector<std::string> DATAGRAM_MONITOR;
enum StartUpType {
FRESH,

View File

@@ -510,11 +510,10 @@ Config::loadFromString(std::string const& fileContents)
NETWORK_ID = beast::lexicalCastThrow<uint32_t>(strTemp);
}
if (getSingleSection(secConfig, SECTION_DATAGRAM_MONITOR, strTemp, j_))
if (auto s = getIniFileSection(secConfig, SECTION_DATAGRAM_MONITOR))
{
std::vector<std::string> vecTemp{strTemp};
replaceColons(vecTemp);
DATAGRAM_MONITOR = vecTemp[0];
DATAGRAM_MONITOR = *s;
replaceColons(DATAGRAM_MONITOR);
}
if (getSingleSection(secConfig, SECTION_PEER_PRIVATE, strTemp, j_))

View File

@@ -74,7 +74,7 @@ namespace detail {
// Feature.cpp. Because it's only used to reserve storage, and determine how
// large to make the FeatureBitset, it MAY be larger. It MUST NOT be less than
// the actual number of amendments. A LogicError on startup will verify this.
static constexpr std::size_t numFeatures = 75;
static constexpr std::size_t numFeatures = 76;
/** Amendments that this server supports and the default voting behavior.
Whether they are enabled depends on the Rules defined in the validated
@@ -363,6 +363,7 @@ extern uint256 const fixPageCap;
extern uint256 const fix240911;
extern uint256 const fixFloatDivide;
extern uint256 const fixReduceImport;
extern uint256 const fixXahauV3;
} // namespace ripple

View File

@@ -33,13 +33,8 @@ namespace BuildInfo {
// and follow the format described at http://semver.org/
//------------------------------------------------------------------------------
// clang-format off
char const* const versionString = "0.0.0"
char const* const versionString = "0.0.0";
// clang-format on
#ifdef DEBUG
"+DEBUG"
#endif
//--------------------------------------------------------------------------
;
//
// Don't touch anything below this line
@@ -51,9 +46,7 @@ getVersionString()
// if the external build engine fails to populate the version string,
// then we will do it ourselves.
static std::string generatedVersionString;
if (generatedVersionString == "" &&
(versionString == std::string("0.") + std::string("0.0") ||
versionString == std::string("0.0.0+DEBUG")))
if (generatedVersionString == "" && versionString == std::string("0.0.0"))
{
std::string y = std::string(__DATE__ + 7);
std::string d = std::string(

View File

@@ -469,6 +469,7 @@ REGISTER_FIX (fixPageCap, Supported::yes, VoteBehavior::De
REGISTER_FIX (fix240911, Supported::yes, VoteBehavior::DefaultYes);
REGISTER_FIX (fixFloatDivide, Supported::yes, VoteBehavior::DefaultYes);
REGISTER_FIX (fixReduceImport, Supported::yes, VoteBehavior::DefaultYes);
REGISTER_FIX (fixXahauV3, Supported::yes, VoteBehavior::DefaultNo);
// The following amendments are obsolete, but must remain supported
// because they could potentially get enabled.

View File

@@ -240,7 +240,9 @@ TxMeta::addRaw(Serializer& s, TER result, std::uint32_t index)
{
mResult = TERtoInt(result);
mIndex = index;
assert((mResult == 0) || ((mResult > 100) && (mResult <= 255)));
assert(
(mResult == 0 || mResult == 1) ||
((mResult > 100) && (mResult <= 255)));
mNodes.sort([](STObject const& o1, STObject const& o2) {
return o1.getFieldH256(sfLedgerIndex) < o2.getFieldH256(sfLedgerIndex);

View File

@@ -75,7 +75,7 @@ doAccountInfo(RPC::JsonContext& context)
auto const accountID{std::move(id.value())};
static constexpr std::
array<std::pair<std::string_view, LedgerSpecificFlags>, 10>
array<std::pair<std::string_view, LedgerSpecificFlags>, 11>
lsFlags{
{{"defaultRipple", lsfDefaultRipple},
{"depositAuth", lsfDepositAuth},
@@ -86,7 +86,8 @@ doAccountInfo(RPC::JsonContext& context)
{"passwordSpent", lsfPasswordSpent},
{"requireAuthorization", lsfRequireAuth},
{"tshCollect", lsfTshCollect},
{"requireDestinationTag", lsfRequireDestTag}}};
{"requireDestinationTag", lsfRequireDestTag},
{"uriTokenIssuer", lsfURITokenIssuer}}};
static constexpr std::
array<std::pair<std::string_view, LedgerSpecificFlags>, 5>

View File

@@ -5544,7 +5544,7 @@ public:
testTSH(sa - fixXahauV1 - fixXahauV2);
testTSH(sa - fixXahauV2);
testTSH(sa);
testEmittedTxn(sa - fixXahauV2);
// testEmittedTxn(sa - fixXahauV2);
testEmittedTxn(sa);
}
};