(cherry picked from commit 18b5a500da)
Pull out the library functionality from scripts/confix and move it to
internal/libs/confix. Replace scripts/confix with a simple stub that has the
same command-line API, but uses the library instead.
Related:
- Move and update unit tests.
- Move scripts/confix/condiff to scripts/condiff.
- Update test data for v34, v35, and v36.
- Update reference diffs.
- Update testdata README.
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
Test data for confix and condiff
The files in this directory are stock Tendermint configuration files generated by the last point release of each version series from v0.26 to present, along with diffs between consecutive versions.
Config Samples
The files named vXX-config.toml were generated by checking out and building
the corresponding version of Tendermint v0.xx.y and initializing a new node in
an empty home directory. The resulting config.toml file was copied here.
The exact build instructions vary a bit, but a general repro looks like:
# This example uses v0.31, substitute the version of your choice.
# Note that the branch names and tags may differ.
# Versions prior to v0.26 may not build.
git checkout v0.31.9
git clean -fdx
# Versions prior to v0.32 do not have Go module files.
# Those that do may need some dependencies manually updated.
go mod init github.com/tendermint/tendermint
go mod tidy
go get golang.org/x/sys
# Once you sort out the dependencies, this should usually work.
make build
# Confirm you go the version you expected, and generate the file.
./build/tendermint --home=tmhome version
./build/tendermint --home=tmhome init
# Copy the file out.
cp ./tmhome/config/config.toml v31-config.toml
Version Diffs
The files named diff-XX-YY.txt were generated by using the condiff tool on
the config samples for versions v0.XX and v0.YY:
go run ./scripts/condiff -desnake vXX-config vYY-config.toml > diff-XX-YY.txt
The baseline.txt was computed in the same way, but using an empty starting
file so that we capture all the settings in the target:
go run ./scripts/condiff -desnake /dev/null v26-config.toml > baseline.txt