gossamer icon indicating copy to clipboard operation
gossamer copied to clipboard

fix(cmd): `build-spec` can build a raw spec from a human readable spec

Open EclesioMeloJunior opened this issue 2 years ago • 3 comments

Changes

  • Update crypto.PublicAddressToByteArray to return an error when cannot transform the address into a byte array
  • Transform raw string values into their hexadecimal values
  • I notice the problem with the BABE authorities from gossamer generated raw spec, issue: #2589

Tests

Download the following human-readable spec generated by Polkadot binary: https://gist.githubusercontent.com/danforbes/b246640cbedd1107ff412d5d25851058/raw/815fa77feee103e518a41a3f593c5d4442d14db6/gistfile1.txt

gossamer build-spec --genesis-spec ./human-readable.json --raw --output ./spec.json

The command above should execute without problems and generate the spec.json

Issues

  • Closes #1865
  • Closes #2417

Primary Reviewer

@kishansagathiya

EclesioMeloJunior avatar Jun 06 '22 21:06 EclesioMeloJunior

@danforbes @timwu20 should I close this PR since we will remove the feature of building a raw spec from a human-readable one?

EclesioMeloJunior avatar Jun 15 '22 14:06 EclesioMeloJunior

Since the work has already been done, I will defer to @timwu20 on this one.

danforbes avatar Jun 15 '22 15:06 danforbes

Can you mark it as draft for now @EclesioMeloJunior

timwu20 avatar Jun 30 '22 14:06 timwu20