Commit Graph

13832 Commits

Author SHA1 Message Date
Nicholas Dudfield
14c9f8480e Merge remote-tracking branch 'origin/dev' into nd-add-colored-file-2025-07-25 2025-10-13 09:31:09 +07:00
Niq Dudfield
ad0531ad6c chore: fix warnings (#509)
Co-authored-by: Denis Angell <dangell@transia.co>
Co-authored-by: RichardAH <richard.holland@starstone.co.nz>
2025-10-11 11:47:13 +10:00
tequ
e580f7cfc0 chore(vscode): enable format on save in settings.json (#578) 2025-10-11 11:43:50 +10:00
tequ
094f011006 Fix emit Hook API testcase name (#580) 2025-10-11 11:43:09 +10:00
Niq Dudfield
39d1c43901 build: upgrade openssl from 1.1.1u to 3.6.0 (#587)
Updates OpenSSL dependency to the latest 3.x series available on Conan Center.
2025-10-10 19:53:35 +10:00
J. Scott Branson
b3e6a902cb Update Sample Configuration Files in /cfg for Congruence with xahaud (#584) 2025-10-10 14:59:39 +11:00
Niq Dudfield
fa1b93bfd8 build: migrate to conan 2 (#585)
Migrates the build system from Conan 1 to Conan 2
2025-10-10 14:57:46 +11:00
tequ
92e3a927fc refactor KEYLET_LINE in utils_keylet (#502)
Fixes the use of high and low in variable names, as these are determined by ripple::keylet::line processing.

Co-authored-by: RichardAH <richard.holland@starstone.co.nz>
2025-10-09 21:02:14 +11:00
Nicholas Dudfield
1b3d04ba4d ci: increase conan timeout to 3 minutes for slow mirrors
GNU FTP mirrors can be extremely slow, causing CI failures when downloading
dependencies like libtool. Increasing CONAN_REQUEST_TIMEOUT from default
60s to 180s to handle these slow downloads.
2025-09-08 16:50:35 +07:00
Nicholas Dudfield
87281b2a54 simplify: replace LOG_LOCATION_POSITION with LOG_DISABLE
Removes the LocationPosition enum and complex position logic. Now
file:line info always appears as a suffix (the most readable option)
and can be disabled with LOG_DISABLE=1. This removes ~20 lines of
code and one environment variable while maintaining functionality.
2025-09-08 16:30:08 +07:00
Nicholas Dudfield
2c11bfd678 simplify: remove conan check for enhanced logging
Since Xahau now exclusively uses Conan for builds, we can remove the
conditional check for conan_toolchain. The enhanced logging feature
now simply defaults to ON for Debug builds and OFF for Release builds.
2025-09-08 16:10:57 +07:00
Nicholas Dudfield
917bcf1008 Merge remote-tracking branch 'origin/dev' into nd-add-colored-file-2025-07-25
# Conflicts:
#	src/test/unit_test/SuiteJournal.h
2025-09-08 15:46:20 +07:00
tequ
8f7ebf0377 Optimize github action cache (#544)
* optimize github action cache

* fix

* refactor: improve github actions cache optimization (#3)

- move ccache configuration logic to dedicated action
- rename conanfile-changed to should-save-conan-cache for clarity

---------

Co-authored-by: Niq Dudfield <ndudfield@gmail.com>
2025-09-08 15:53:40 +10:00
Niq Dudfield
46cf6785ab fix(tests): prevent buffer corruption from concurrent log writes (#565)
std::endl triggers flush() which calls sync() on the shared log buffer.
Multiple threads racing in sync() cause str()/str("") operations to
corrupt buffer state, leading to crashes and double frees.

Added mutex to serialize access to suite.log, preventing concurrent
sync() calls on the same buffer.
2025-09-08 13:57:49 +10:00
Niq Dudfield
3c4c9c87c5 Fix rwdb memory leak with online_delete and remove flatmap (#570)
Co-authored-by: Denis Angell <dangell@transia.co>
2025-08-26 14:00:58 +10:00
Niq Dudfield
7a790246fb fix: upgrade CI to GCC 13 and fix compilation issues, fixes #557 (#559) 2025-08-14 17:41:49 +10:00
Niq Dudfield
1a3d2db8ef fix(ci): export correct snappy version (#546) 2025-08-14 14:01:32 +10:00
tequ
2fc912d54d Make release build use conan deps where possible and hbb 4.0.1 (#516)
Co-authored-by: Denis Angell <dangell@transia.co>
Co-authored-by: Niq Dudfield <ndudfield@gmail.com>
2025-08-14 12:59:57 +10:00
Nicholas Dudfield
d64ba81105 fix(tests): allow multi threaded writes to suite log 2025-07-29 08:57:12 +07:00
Nicholas Dudfield
44148e82e8 docs: justify environment variable usage for enhanced logging
Add concise comments explaining why environment variables are used
instead of config file settings for the enhanced logging feature:
- Logging needs to start before config parsing
- Developer feature where env vars are convenient
- Allows per-run overrides without config changes
2025-07-28 10:07:49 +07:00
Nicholas Dudfield
016f908f7e fix: do not support release builder 2025-07-26 18:42:55 +07:00
Nicholas Dudfield
2225bb4f12 fix: restore release builder date 2025-07-26 18:37:46 +07:00
Nicholas Dudfield
3630732ef4 fix: use date 3.0.3 2025-07-26 18:16:53 +07:00
Nicholas Dudfield
039aa56fc4 fix: use date 3.0.4 2025-07-26 18:04:49 +07:00
Nicholas Dudfield
d4ab8c4f1c fix: conditionally include EnhancedLogging.h in Log.cpp
- Only include beast/utility/EnhancedLogging.h when BEAST_ENHANCED_LOGGING is defined
- Prevents compilation errors when enhanced logging is disabled
2025-07-26 17:06:03 +07:00
Nicholas Dudfield
e0cc2b8b1e refactor: rename LOG_HIGHLIGHT_ESCAPE to LOG_HIGHLIGHT_COLOR
- More intuitive naming for users
- Changed get_log_highlight_escape() to get_log_highlight_color()
- Updated all references and comments
- Functionality remains the same, just clearer naming
2025-07-26 17:02:43 +07:00
Nicholas Dudfield
ae019a979c chore: snake_case 2025-07-26 17:02:43 +07:00
Nicholas Dudfield
1e698ed194 feat(logging): add enhanced logging with colors and flexible formatting
- Add BEAST_ENHANCED_LOGGING CMake option for build-time control
- Implement file:line logging with customizable position (prefix/suffix/none)
  via LOG_LOCATION_POSITION env var (defaults to suffix for readability)
- Add flexible timestamp formatting via LOG_DATE_FORMAT (date::format syntax)
- Add local timezone support via LOG_DATE_LOCAL env var
- Support customizable highlight colors via LOG_HIGHLIGHT_ESCAPE env var
  (red, green, yellow, blue, magenta, cyan, white, gray, orange, none)
- Apply consistent highlighting to both file:line and partition:severity
- Centralize all enhanced logging features in beast_EnhancedLogging module
- Smart TTY detection with NO_COLOR/FORCE_COLOR support
- Constexpr path stripping using SOURCE_ROOT_PATH
- Move implementations to .cpp files to minimize recompilation
- Update zlib to 1.3.1 to fix macOS 15.5 build issues
- Enable date-tz library for timezone support

Example output with defaults:
  2025-Jul-26 15:20:07.124745 NetworkOPs:NFO STATE->connected [ripple/app/misc/NetworkOPs.cpp:2264]

Environment variables:
  LOG_LOCATION_POSITION=suffix  # or prefix, none
  LOG_HIGHLIGHT_ESCAPE=cyan     # or red, green, yellow, etc
  LOG_DATE_FORMAT=%Y-%b-%d %r.%f %Z  # custom timestamp format
  LOG_DATE_LOCAL=1              # use local timezone

Zero runtime cost when disabled - all features are build-time conditional.
Backward compatible - no changes when BEAST_ENHANCED_LOGGING is not defined.
2025-07-26 16:54:32 +07:00
Nicholas Dudfield
a3ef83d970 feat(logging): add flexible log formatting and positioning options
- Add LOG_LOCATION_POSITION env var to control file:line placement (prefix/suffix/none)
- Add LOG_DATE_FORMAT env var for custom timestamp formats (supports date::format syntax)
- Add LOG_DATE_LOCAL env var to use local timezone instead of UTC
- Add LOG_LOCATION_ESCAPE env var for custom colors (red/green/cyan/etc)
- Default to suffix position for better readability
- Move implementation to .cpp files to reduce recompilation
- Update zlib to 1.3.1 to fix macOS build issues
- Enable date-tz library for timezone support
2025-07-26 16:54:32 +07:00
Nicholas Dudfield
797a5d4c5b refactor: move LOG_LINE_NUMBERS color logic to cpp file
Move location logging functions from Journal.h to beast_Journal.cpp to avoid
recompilation of all dependent files when color mappings change.

- Move detail::shouldUseColors() to cpp (env var checks, isatty call)
- Move detail::getLocationEscape() to cpp (color name mappings)
- Move writeLocationPrefix() to cpp (formatting logic)
- Add support for LOG_LOCATION_ESCAPE env var with color names:
  red, green, yellow, blue, magenta, cyan, white, gray/grey, orange, none
- Default remains cyan for backward compatibility

This significantly reduces compilation time when tweaking log colors.
2025-07-26 12:37:45 +07:00
Nicholas Dudfield
640b9c91f9 refactor(logging): use JLOG directly in Manifest.cpp for correct line numbers
- Replace logMftAct template functions with macros to preserve call site line numbers
- Use do-while(0) pattern to avoid dangling else warnings
- Add #undef at end of file to prevent namespace pollution
- Maintains exact same log format while fixing line number attribution

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-26 12:37:45 +07:00
Nicholas Dudfield
d2098e9429 fix(test): update Invariants_test for LOG_LINE_NUMBERS compatibility
- Add conditional logic to handle log messages with [file:line] prefix
- Use find() instead of starts_with() when LOG_LINE_NUMBERS is enabled
- Ensures tests pass whether file:line logging is on or off

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-25 20:58:12 +07:00
Nicholas Dudfield
06e393a28b refactor(logging): improve JLOG implementation with StreamWithLocation
- Replace writeWithLocation with cleaner withLocation() method
- Create standalone StreamWithLocation class (not a subclass)
- Move non-template operator<< to cpp file to reduce header bloat
- Fix potential ODR violations by adding inline to template
- Maintain colored file:line output functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-25 19:51:16 +07:00
Nicholas Dudfield
20344ab999 feat(logging): add colored file:line numbers to JLOG macro
- Add LOG_LINE_NUMBERS CMake option (ON for Debug, OFF for Release)
- Implement constexpr path stripping using SOURCE_ROOT_PATH
- Add smart TTY detection with NO_COLOR/FORCE_COLOR support
- Extend Journal::ScopedStream with file/line constructor
- Update JLOG macro to conditionally include source location
- Maintain backward compatibility when disabled
2025-07-25 17:48:29 +07:00
Niq Dudfield
849d447a20 docs(freeze): canceling escrows with deep frozen assets is allowed (#540) 2025.7.9-release+1951 2025-07-09 13:48:59 +10:00
tequ
ee27049687 IOUIssuerWeakTSH (#388) 2025-07-09 13:48:26 +10:00
tequ
60dec74baf Add DeepFreeze test for URIToken (#539) 2025-07-09 12:49:47 +10:00
Denis Angell
9abea13649 Feature Clawback (#534) 2025-07-09 12:48:46 +10:00
Denis Angell
810e15319c Feature DeepFreeze (#536)
---------

Co-authored-by: tequ <git@tequ.dev>
2025-07-09 10:33:08 +10:00
Niq Dudfield
d593f3bef5 fix: provisional PreviousTxn{Id,LedgerSeq} double threading (#515)
---------

Co-authored-by: tequ <git@tequ.dev>
2025-07-08 18:04:39 +10:00
Niq Dudfield
1233694b6c chore: add suspicious_patterns to .scripts/pre-hook and not-suspicious filter (#525)
* chore: add suspicious_patterns to .scripts/pre-hook and not-suspicious filter

* rm: kill annoying checkpatterns job

* chore: cleanup

---------

Co-authored-by: RichardAH <richard.holland@starstone.co.nz>
2025-07-01 20:58:06 +10:00
tequ
a1d42b7380 Improve unittests (#494)
* Match unit tests on start of test name (#4634)

* For example, without this change, to run the TxQ tests, must specify
  `--unittest=TxQ1,TxQ2` on the command line. With this change, can use
  `--unittest=TxQ`, and both will be run.
* An exact match will prevent any further partial matching.
* This could have some side effects for different tests with a common
  name beginning. For example, NFToken, NFTokenBurn, NFTokenDir. This
  might be useful. If not, the shorter-named test(s) can be renamed. For
  example, NFToken to NFTokens.
* Split the NFToken, NFTokenBurn, and Offer test classes. Potentially speeds
  up parallel tests by a factor of 5.

* SetHook_test, SetHookTSH_test, XahauGenesis_test

---------

Co-authored-by: Ed Hennis <ed@ripple.com>
2025-06-30 10:03:02 +10:00
tequ
f6d2bf819d Fix governance vote purge (#221)
governance hook should be independently and deterministically recompiled before being voted in
2025-06-16 17:12:06 +10:00
Denis Angell
a5ea86fdfc Add Conan Building For Development (#432) 2025-05-14 14:00:20 +10:00
RichardAH
615f56570a Sus pat (#507) 2025.5.1-release+1762 2025-05-01 17:23:56 +10:00
RichardAH
5e005cd6ee remove false positives from sus pat finder (#506) 2025-05-01 09:54:41 +10:00
Denis Angell
80a7197590 fix warnings (#505) 2025-04-30 11:51:58 +02:00
tequ
7b581443d1 Suppress build warning introduced in Catalogue (#499) 2025-04-29 08:25:55 +10:00
tequ
5400f43359 Supress logs for Catalogue_test, Import_test (#495) 2025-04-24 17:46:09 +10:00
Denis Angell
8cf7d485ab fix: ledger_index (#498) 2025-04-24 16:45:01 +10:00