go-spacemesh icon indicating copy to clipboard operation
go-spacemesh copied to clipboard

Genesis address format

Open lrettig opened this issue 2 years ago • 3 comments

See https://github.com/spacemeshos/pm/issues/140

  • [x] choose and import a bech32 implementation (see this list) (chosen github.com/cosmos/btcutil)
  • [x] use this to write a simple address parser (string -> Address) with error-handling code for wrong format, too long, bad HRP, etc. (this should probably be published as a separate library so it can be used elsewhere)
  • [x] change Address type to [24]byte (i.e., change AddressLength)
  • [ ] update API code to receive address as string and parse it
    • [ ] go-spacemesh (https://github.com/spacemeshos/go-spacemesh/pull/3336)
    • [x] API (https://github.com/spacemeshos/api/pull/173)
  • [x] update addresses in genesis account config and tests
  • [ ] register HRPs (mainnet, testnet) in SLIP-0713

lrettig avatar Jul 01 '22 19:07 lrettig

check, does checksum of address inside bech32 if not - good idea to add it

abergasov avatar Jul 20 '22 15:07 abergasov

@abergasov not sure what you mean - bech32 does include a checksum

lrettig avatar Jul 20 '22 20:07 lrettig

added a task to register our HRPs in the global SLIP list: sm and stest

lrettig avatar Aug 01 '22 19:08 lrettig

@abergasov this task appears not to be done: register HRPs (mainnet, testnet) in SLIP-0713

lrettig avatar Aug 16 '22 21:08 lrettig