From a8b27349b4b95ac05f12f88a93a297420669dabf Mon Sep 17 00:00:00 2001 From: Jay Geng Date: Tue, 7 May 2024 14:28:02 -0400 Subject: [PATCH 1/2] Apply COMMAND list before catchup --- src/main/CommandLine.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/CommandLine.cpp b/src/main/CommandLine.cpp index 1468880165..2f79a64a9c 100644 --- a/src/main/CommandLine.cpp +++ b/src/main/CommandLine.cpp @@ -871,6 +871,7 @@ runCatchup(CommandLineArgs const& args) int result; { auto app = Application::create(clock, config, inMemory); + app->applyCfgCommands(); auto const& ham = app->getHistoryArchiveManager(); auto archivePtr = ham.getHistoryArchive(archive); if (iequals(archive, "any")) From 905fb74ee32ba7d5ae6d20bcec7706b614ff9193 Mon Sep 17 00:00:00 2001 From: Jay Geng Date: Tue, 7 May 2024 14:29:53 -0400 Subject: [PATCH 2/2] Add some trace logging for soroban tx --- src/transactions/InvokeHostFunctionOpFrame.cpp | 8 ++++++++ src/transactions/TransactionFrame.cpp | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/src/transactions/InvokeHostFunctionOpFrame.cpp b/src/transactions/InvokeHostFunctionOpFrame.cpp index 38177ec16a..336cd97742 100644 --- a/src/transactions/InvokeHostFunctionOpFrame.cpp +++ b/src/transactions/InvokeHostFunctionOpFrame.cpp @@ -497,6 +497,14 @@ InvokeHostFunctionOpFrame::doApply(Application& app, AbstractLedgerTxn& ltx, metrics.mCpuInsnExclVm = out.cpu_insns_excluding_vm_instantiation; metrics.mInvokeTimeNsecsExclVm = out.time_nsecs_excluding_vm_instantiation; + + CLOG_TRACE(Tx, "invokeTimeNsecs: {}, cpuInsn: {}, ratio: {}", + metrics.mInvokeTimeNsecs, metrics.mCpuInsn, + (float)metrics.mInvokeTimeNsecs / (float)metrics.mCpuInsn); + CLOG_TRACE(Tx, "(excl VM) invokeTimeNsecs: {}, cpuInsn: {}, ratio: {}", + metrics.mInvokeTimeNsecsExclVm, metrics.mCpuInsnExclVm, + (float)metrics.mInvokeTimeNsecsExclVm / + (float)metrics.mCpuInsnExclVm); if (!out.success) { maybePopulateDiagnosticEvents(appConfig, out, metrics); diff --git a/src/transactions/TransactionFrame.cpp b/src/transactions/TransactionFrame.cpp index db5ce3c686..efe984e8c7 100644 --- a/src/transactions/TransactionFrame.cpp +++ b/src/transactions/TransactionFrame.cpp @@ -1950,6 +1950,12 @@ TransactionFrame::apply(Application& app, AbstractLedgerTxn& ltx, ok = applyOperations(signatureChecker, app, ltx, meta, sorobanBasePrngSeed); + + if (isSoroban()) + { + CLOG_TRACE(Tx, "Soroban transaction meta: {}", + xdr::xdr_to_string(meta.getXDR(), "meta")); + } } return ok; }