mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-25 21:17:17 +00:00
6583ce325b
## Issue Addressed Closes #2354 ## Proposed Changes Add a `minify` method to `slashing_protection::Interchange` that keeps only the maximum-epoch attestation and maximum-slot block for each validator. Specifically, `minify` constructs "synthetic" attestations (with no `signing_root`) containing the maximum source epoch _and_ the maximum target epoch from the input. This is equivalent to the `minify_synth` algorithm that I've formally verified in this repository: https://github.com/michaelsproul/slashing-proofs ## Additional Info Includes the JSON loading optimisation from #2347
42 lines
916 B
Makefile
42 lines
916 B
Makefile
TESTS_TAG := v5.1.0
|
|
GENERATE_DIR := generated-tests
|
|
OUTPUT_DIR := interchange-tests
|
|
TARBALL := $(OUTPUT_DIR)-$(TESTS_TAG).tar.gz
|
|
ARCHIVE_URL := https://github.com/eth2-clients/slashing-protection-interchange-tests/tarball/$(TESTS_TAG)
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
ifeq (, $(shell where rm))
|
|
rmfile = if exist $(1) (del /F /Q $(1))
|
|
rmdir = if exist $(1) (rmdir /Q /S $(1))
|
|
else
|
|
rmfile = rm -f $(1)
|
|
rmdir = rm -rf $(1)
|
|
endif
|
|
else
|
|
rmfile = rm -f $(1)
|
|
rmdir = rm -rf $(1)
|
|
endif
|
|
|
|
$(OUTPUT_DIR): $(TARBALL)
|
|
$(call rmdir,$@)
|
|
mkdir $@
|
|
tar --strip-components=1 -xzf $^ -C $@
|
|
|
|
$(TARBALL):
|
|
curl --fail -L -o $@ $(ARCHIVE_URL)
|
|
|
|
clean-test-files:
|
|
$(call rmdir,$(OUTPUT_DIR))
|
|
|
|
clean-archives:
|
|
$(call rmfile,$(TARBALL))
|
|
|
|
generate:
|
|
$(call rmdir,$(GENERATE_DIR))
|
|
cargo run --release --bin test_generator -- $(GENERATE_DIR)
|
|
|
|
clean: clean-test-files clean-archives
|
|
|
|
.PHONY: clean clean-archives clean-test-files generate
|
|
|