livepeer / protocol

Livepeer protocol
MIT License
152 stars 45 forks source link

token: Change burn() signature in trustedBurnTokens() #521

Closed yondonfu closed 2 years ago

yondonfu commented 2 years ago

What does this pull request do? Explain your changes. (required)

This PR updates the burn() signature for LPT in Minter.trustedBurnTokens() to match the function signature in https://github.com/livepeer/arbitrum-lpt-bridge/blob/main/contracts/L2/token/LivepeerToken.sol [1].

Instead of completely removing burning, I decided to just update the function signature so that it could work, but in practice any calls to trustedBurnTokens() via BondingManager.slashTranscoder() will revert because the Minter will initially not have the burner role in the ACL for L2 LPT. This is fine for now because slashTranscoder() will never be called for now since the verifier address will be set to null. In the future, enabling slashing + burning would involve setting a verifier address and giving the burner role to the Minter in the ACL for L2 LPT.

[1] That implementation will be brought into this repo in https://github.com/livepeer/protocol/issues/509

Specific updates (required)

See commit history.

How did you test each of these updates (required)

Updated unit tests.

Does this pull request close any open issues?

Fixes #507

Checklist: