🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)
🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)

🔧 Programmierung 🕛 kürzlich 3 Min Lesezeit
0

Understand Witness of Bitcoin -- A developer's view

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

Understanding the witness concept is crucial for developers working with Bitcoin. However, most discussions focus on a general perspective. In this post, let's delve deeper into the details.






Witness



A witness refers to the part of a transaction that contains the unlocking scripts (also known as signatures or witness data) necessary to prove ownership of the funds being spent. This concept was introduced with the SegWit upgrade (BIP141) to help solve transaction malleability and improve scalability by segregating (separating) the signature data from the transaction data.






Key Points




  • A witness is a part of a tx.


  • Old tx HAS "witness": A witness is the object that contains unlocking scripts (signatures or witness data)





CODE
{
"version": 1,
"marker": 0,
"flag": 1,
"inputs": [
{
"previous_tx": "abcd1234...",
"index": 0,
"scriptSig": "",
"sequence": 4294967295
}
],
"outputs": [
{
"value": 5000000000,
"scriptPubKey": "76a914...88ac"
}
],
"witness": [
"3045022100...022f01e5..."
],
"locktime": 0
}







Above we have an example of transitional bitcoin tx. scriptSig contains the signature and public key needed to unlock the output being spent, alike witness, while in a narrow definition, witness is a separate component in SegWit transactions.



Here is an example:




  • For a Segwit Tx: Witness is saved separately.




CODE
{
"version": 1,
"marker": 0,
"flag": 1,
"inputs": [
{
"previous_tx": "abcd1234...",
"index": 0,
"scriptSig": "",
"sequence": 4294967295
}
],
"outputs": [
{
"value": 5000000000,
"scriptPubKey": "76a914...88ac"
}
],
"witness": [
"3045022100...022f01e5..."
],
"locktime": 0
}







In a SegWit transaction, the witness data is stored separately from the traditional parts of the transaction. The overall structure of a SegWit transaction includes:




  1. Transaction Version


  2. Marker and Flag: Indicate the presence of witness data.


  3. Input and Output Lists: As in traditional transactions.


  4. Witness Data: Contains the actual witness for each input.

  5. Locktime



This separation means that the witness data does not affect the transaction's hash used for identifying the transaction, addressing the malleability issue.






How is the Witness Constructed and Used?






Construction



When creating a SegWit transaction, the witness is constructed by providing the necessary unlocking scripts for each input. Typically, this includes a signature and a public key for P2WPKH (Pay-to-Witness-Public-Key-Hash) transactions.






Usage:





  • Verification: Nodes and miners use the witness data to verify that the spender has the right to spend the UTXO.


  • Storage: Witness data is stored in the witness section of the transaction but can be pruned or segregated to save space.


  • Weight Units: In calculating the transaction's weight, witness data is given a lower weight, incentivizing the use of SegWit.






Viewing the Witness Data



After constructing and signing the transaction, you can inspect the witness data using a tool like Bitcoin Core's decoderawtransaction or online explorers that support SegWit.



For example:




CODE
bitcoin-cli decoderawtransaction <serialized_tx>






This command will output the transaction details, including the vout, vin, and crucially the witness field for each input, showing the signature and public key used to unlock the funds.

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Hackers Just Poisoned the Rust Supply Chain | Threat Wire
1 Quelle
Hackers Found a Way Into Humanoid Robots | Threat Wire
1 Quelle
Bits und so #1021 (Passwort für Laufwerk)
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Understand Witness of Bitcoin -- A developer's view

Thematisch verwandte Begriffe: Understand, Witness, Bitcoin, developers · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...