Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: burn rune through forcing Cenotaph #3683

Closed

Conversation

nghuyenthevinh2000
Copy link

@nghuyenthevinh2000 nghuyenthevinh2000 commented Apr 25, 2024

fixes: #3640

add a command to burn all specific runes in a wallet

Logic

  1. Add Burn impl in subcommand/wallet: forcing burn through Cenotaph EdictOutput Flaw

Test

  1. Add a happy case test burning_rune_works():
  • send 100 rune to address B
  • burn rune in address A (which contains 900 rune), confirming that balances only return 100 rune
  • confirm that rune info return burned amount of 900

I think it can be fine - grained further to burn exact amount in a wallet through protocol recognized burn addresses. However, changes to updater are required to recognize the burn addresses. Changes to updater can be a lenghtly review process as it touches the core, so probably in another PR. Which burn addresses can be a topic for debates @raphjaph

However, in this PR, I still include burn address constants for reviews

// satoshi first block address
 pub const MAINNET_BURN_ADDRESS: &'static str = "1FvzCLoTPGANNjWoUo6jUGuAG3wg1w4YjR";
 // just a random testnet address
 pub const TESTNET_BURN_ADDRESS: &'static str = "tb1prqr6lpxeqcyfff8n7c748ad7szyh8hwmf9nly598r5uqewkm4kms0nevay";
 // just a random regnet address
 pub const REGNET_BURN_ADDRESS: &'static str = "bcrt1pyf99p0qrt8dsx8a8hnd7edzpnnpsndf9ce6hhx55s9f9v84e48eqdlyd6n";

@onchainguy-btc
Copy link
Contributor

onchainguy-btc commented Apr 29, 2024

I implemented a generic burn in #3437. Can extend that to support runes?

@raphjaph
Copy link
Collaborator

I'll have a look at generic burning first (#3437) but probably we don't want to do protocol level burning through cenotaphs but rather by sending to an OP_RETURN.

@raphjaph
Copy link
Collaborator

I merged #3437, since burning through OP_RETURN is more generic and can be used for inscriptions, sats and runes.

@raphjaph raphjaph closed this Sep 30, 2024
@gus4rs
Copy link

gus4rs commented Oct 8, 2024

@raphjaph After #3437 is it possible to burn runes via ord wallet? I am thinking about two scenarios:

  • Burn a certain amount of a Rune
  • Burn the "etching"

@onchainguy-btc
Copy link
Contributor

Happy to work on this as well @raphjaph

@raphjaph
Copy link
Collaborator

raphjaph commented Oct 8, 2024

@raphjaph After #3437 is it possible to burn runes via ord wallet? I am thinking about two scenarios:

  • Burn a certain amount of a Rune
  • Burn the "etching"

Yes, burning a rune should be part of ord wallet burn command as well. It's already defined on the protocol level here: https://docs.ordinals.com/runes.html?highlight=burn#burning. So all we have to do is implement it. You should be able to specify the amount you want to burn.

For "etching" do you mean the optional parent inscription of the rune? This can already be done with the new command. @onchainguy-btc is tweaking it so it only burns a single sat instead of the whole utxo it is in.

@gus4rs
Copy link

gus4rs commented Oct 8, 2024

For "etching" do you mean the optional parent inscription of the rune

Also this, but more destroying the rune itself, so it is totally trashed, no one can mint/transfer it anymore, would it make sense?

@raphjaph
Copy link
Collaborator

raphjaph commented Oct 8, 2024

An etching can't retroactively destroy all runes it "minted". Once they are on Bitcoin they're no longer owned by the original creator

@gus4rs
Copy link

gus4rs commented Oct 9, 2024

So once an etching is confirmed, it can't prevent new mints, or can't be modified in any shape or form, or even be "transferred" to another owner?

@raphjaph
Copy link
Collaborator

raphjaph commented Oct 9, 2024

that's correct, only the parent (if it exists) can be transferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Feature request: command to burn runes
4 participants