github.com/prysmaticlabs/prysm@v1.4.4/tools/specs-checker/README.md (about)

     1  # Specs checker tool
     2  
     3  This simple tool helps downloading and parsing [Ethereum specs](https://github.com/ethereum/eth2.0-specs/tree/dev/specs), 
     4  to be later used for making sure that our reference comments match specs definitions precisely.
     5  
     6  ### Updating the reference specs
     7  See `main.go` for a list of files to be downloaded, currently:
     8  ```golang
     9  var specDirs = map[string][]string{
    10  	"specs/phase0": {
    11  		"beacon-chain.md",
    12  		"fork-choice.md",
    13  		"validator.md",
    14  		"weak-subjectivity.md",
    15  	},
    16  	"ssz": {
    17  		"merkle-proofs.md",
    18  	},
    19  }
    20  ```
    21  
    22  To download/update specs:
    23  ```bash
    24  bazel run //tools/specs-checker download -- --dir=$PWD/tools/specs-checker/data
    25  ```
    26  
    27  This will pull the files defined in `specDirs`, parse them (extract Python code snippets, discarding any other text), 
    28  and save them to the folder from which `bazel run //tools/specs-checker check` will be able to embed.
    29  
    30  ### Checking against the reference specs
    31  
    32  To check whether reference comments have the matching version of Python specs:
    33  ```bash
    34  bazel run //tools/specs-checker check -- --dir $PWD/beacon-chain
    35  bazel run //tools/specs-checker check -- --dir $PWD/validator
    36  bazel run //tools/specs-checker check -- --dir $PWD/shared
    37  ```
    38  Or, to check the whole project:
    39  ```bash
    40  bazel run //tools/specs-checker check -- --dir $PWD
    41  ```