Faketime work#3503
Open
OlufemiAdeOlusile wants to merge 3 commits into
Open
Conversation
mkoura
requested changes
Jun 18, 2026
a4b5a24 to
cdbb435
Compare
Inject a conditional clock-skew bash block into the pool wrapper script via _inject_time_drift_hook. Activated only when TIME_DRIFT_POOL and TIME_DRIFT_SPEC are set at cluster start time. Default-off: unset env vars leave behaviour unchanged. Add libfaketime to the Nix dev shell so the dependency is available automatically. Remove manual installation instructions and the has_faketime check from check_dev_env.sh per review feedback. Simplify README to env var table and usage example.
Update _inject_time_drift_hook to replace the placeholder comment '# --- Placeholder for any pre-run setup ---' added in cardonnay PR#134 instead of prepending before exec cardano-node run.
f114601 to
dd046f0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds optional clock skew on one pool node in a local dev cluster via libfaketime (
LD_PRELOAD+FAKETIME). Default-off: no env vars → unchanged behaviour. Local experiments only, not wired into CI or regression.Changes
cluster_scripts.py—_inject_time_drift_hook()replaces the# --- Placeholder for any pre-run setup ---comment in generatedcardano-node-poolNwrappers with a conditional bash block that activatesLD_PRELOAD/FAKETIME. Only pool wrappers are touched;bft1andtx-generatorare untouched. RaisesValueErrorif the placeholder is missing (guards against template drift with cardonnay).flake.nix— addspkgs.libfaketimeto the Nix dev shell so the library is available automatically.README.md— adds env var table and a single usage example under the local dev cluster section.libfaketimeis included automatically in the Nix dev shell; no manual install needed.Env contract
TIME_DRIFT_POOLTIME_DRIFT_SPEC+0 x1.008(gradual, no boot offset)LIBFAKETIME_PATH.sopath if auto-detect failsUsage
make cluster-scripts TIME_DRIFT_POOL=1 TIME_DRIFT_SPEC='+0 x1.008' make start-cluster