Post
Topic
Board Bahasa Indonesia (Indonesian)
Merits 1 from 1 user
Re: Mengapa harus menggunakan alamat SegWit (Segregated Witness)
by
Husna QA
on 30/01/2024, 03:42:04 UTC
⭐ Merited by ABCbits (1)
Adakah kerugiannya?
Buat kontributor di jaringan blockchain Bitcoin, salah satu kekurangan yang mereka rasakan pada saat menggunakan segwit address di Bitcoin core adalah tidak dapat menjalankan fungsi "Sign Message". Jikapun dipaksakan untuk melakukan sign message menggunakan segwit address maka akan muncul warning message "The entered address does not refer to a Key. Please check the address and try again".

Dulu saya pernah mengalami hal yang demikian ketika hendak sign message menggunakan Segwit address.

Previously I managed to make a signature on Console of the Bitcoin Core using the Legacy Address, but when trying with the SegWit Address the following message appears:
Code:
Address does not refer to key (code -3)

Please explain and the solution.
Thanks.
There is no solution and you cannot sign a message with a segwit address. This has been the case since segwit was introduced. See https://github.com/bitcoin/bitcoin/issues/10542

Sepemahaman saya, belum ada konsensus yang menyepakati dengan jelas perihal Sign Message menggunakan Segwit address.

- Message signing with bech32 addresses crashes Electrum: https://github.com/spesmilo/electrum/issues/2977.
- Segwit message signing is not compatible with other software: https://github.com/spesmilo/electrum/issues/3861.

Entah hal tersebut merupakan salah satu kerugian dari Segwit Address di Bitcoin Core atau bukan.
Namun ada hal yang mungkin perlu digaris bawahi sebagaimana pada penjelasan Sipa berikut ini:

And it would in theory be possible to make signmessage work for a P2SH-P2WPKH address, in cases where the verifier knows the embedded pubkeyhash already. But in that case you don't need "sign with a witness address" functionality - you could just sign with the embedded key (see validateaddress), and have the verifier check that.

The point is to not further the misunderstanding that signmessage signs with an address - it never did. It signs with a keyhash, and verify with a keyhash.