oasis-core icon indicating copy to clipboard operation
oasis-core copied to clipboard

staking: Add a burn address

Open Yawning opened this issue 3 years ago • 2 comments

Yet another PR that can rot for months in "don't want to fork the 22.x branch yet" purgatory.

  • [x] Define a burn address
  • [x] Support burning based off xfers to the burn address
  • [x] Test cases
  • [ ] Migration

Implements #4755

Yawning avatar May 23 '22 07:05 Yawning

Codecov Report

Merging #4756 (050c32d) into master (d8b770b) will increase coverage by 0.10%. The diff coverage is 82.84%.

:exclamation: Current head 050c32d differs from pull request most recent head 07f5399. Consider uploading reports for the commit 07f5399 to get more accurate results

@@            Coverage Diff             @@
##           master    #4756      +/-   ##
==========================================
+ Coverage   66.54%   66.65%   +0.10%     
==========================================
  Files         477      478       +1     
  Lines       51696    51780      +84     
==========================================
+ Hits        34403    34515     +112     
+ Misses      13017    12981      -36     
- Partials     4276     4284       +8     
Impacted Files Coverage Δ
go/staking/api/api.go 62.72% <ø> (ø)
go/staking/api/sanity_check.go 50.45% <0.00%> (-3.17%) :arrow_down:
go/common/crypto/signature/signature.go 56.01% <75.00%> (+0.58%) :arrow_up:
.../consensus/tendermint/apps/staking/transactions.go 73.88% <79.16%> (-0.41%) :arrow_down:
go/staking/tests/tester.go 92.42% <95.69%> (+0.52%) :arrow_up:
go/staking/api/address_internal.go 100.00% <100.00%> (ø)
.../worker/compute/executor/committee/transactions.go 79.54% <0.00%> (-6.82%) :arrow_down:
go/common/cbor/codec.go 78.37% <0.00%> (-5.41%) :arrow_down:
go/roothash/api/api.go 80.35% <0.00%> (-3.58%) :arrow_down:
go/sentry/api/grpc.go 40.62% <0.00%> (-3.13%) :arrow_down:
... and 35 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar May 23 '22 22:05 codecov[bot]

Let's rebase now that master can break consensus.

kostko avatar Oct 14 '22 12:10 kostko

I'm not sure what sort of migration is required. The genesis doc sanity check in my branch checks that the burn address is empty.

If someone does happen to use the burn address before this gets deployed I'm not sure what the correct thing to do is, since it is impossible to differentiate between "someone happened to generate the private key" and "someone used the address prematurely".

Yawning avatar Oct 24 '22 13:10 Yawning