Skip to content

Commit 53a4b5e

Browse files
authored
Merge pull request #49 from bitcoin-dev-project/transaction-module
Transaction module
2 parents 279be43 + 505f950 commit 53a4b5e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1541
-35
lines changed
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
name: Send dispatch to dependent repos
22

33
on:
4-
# Runs on pushes targeting the default branch
5-
push:
6-
branches: ["main"]
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches: ["main"]
77

8-
# Allows you to run this workflow manually from the Actions tab
9-
workflow_dispatch:
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
1010

1111
jobs:
12-
# Build job
13-
dispatch:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- name: Dispatch to bitcoin-dev-project
17-
run: |
18-
curl -X POST \
19-
-H "Authorization: token ${{ secrets.DISPATCH_UPDATE_BDP }}" \
20-
-H "Accept: application/vnd.github+json" \
21-
https://api.github.com/repos/bitcoin-dev-project/bitcoin-dev-project/dispatches \
22-
-d '{"event_type": "update_submodules"}'
12+
# Build job
13+
dispatch:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Dispatch to bitcoin-dev-project
17+
run: |
18+
curl -X POST \
19+
-H "Authorization: token ${{ secrets.DISPATCH_UPDATE_BDP }}" \
20+
-H "Accept: application/vnd.github+json" \
21+
https://api.github.com/repos/bitcoin-dev-project/bitcoin-dev-project/dispatches \
22+
-d '{"event_type": "update_submodules"}'

decoding/bitcoin-history.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Bitcoin History"
33
date: 2024-07-05T15:32:14Z
44
lastmod: "2024-07-06"
55
draft: false
6-
category: History
6+
category: Introduction
77
layout: TopicLayout
88
icon: "FaHistory"
99
order: 2

decoding/fee-calculation.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: "Fee Calculation"
3+
date: 2024-01-25T15:32:14Z
4+
lastmod: "2024-07-26"
5+
draft: false
6+
category: Transactions
7+
layout: TopicBanner
8+
order: 6
9+
icon: "FaClipboardList"
10+
images: ["/bitcoin-topics/static/images/topics/thumbnails/musig-thumbnail.webp"]
11+
children: ["weight-vsize", "fee-rate", "rbf"]
12+
---
13+
14+
(coming soon)

decoding/fee-rate.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: "Fee Rate"
3+
date: 2024-01-25T15:32:14Z
4+
lastmod: "2024-07-26"
5+
draft: false
6+
category: Transactions
7+
layout: TopicBanner
8+
order: 2
9+
icon: "FaClipboardList"
10+
images: ["/bitcoin-topics/static/images/topics/thumbnails/musig-thumbnail.webp"]
11+
parent: "fee-calculation"
12+
---
13+
14+
(coming soon)

decoding/implement-OP_ADD-OP_HASH160.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ images:
1111
[
1212
"/bitcoin-topics/static/images/topics/thumbnails/project-stack-thumbnail.webp"
1313
]
14-
topicType: exercise
1514
parent: project
1615
---
1716

decoding/implement-OP_CHECKSIG.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ images:
1111
[
1212
"/bitcoin-topics/static/images/topics/thumbnails/project-stack-thumbnail.webp"
1313
]
14-
topicType: exercise
1514
parent: project
1615
---
1716

decoding/implement-basic-stack.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ images:
1111
[
1212
"/bitcoin-topics/static/images/topics/thumbnails/project-stack-thumbnail.webp"
1313
]
14-
topicType: exercise
1514
parent: project
1615
---
1716

decoding/inputs.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: "Inputs"
3+
date: 2024-01-25T15:32:14Z
4+
lastmod: "2024-07-26"
5+
draft: false
6+
category: Transactions
7+
layout: TopicBanner
8+
order: 3.3
9+
icon: "FaClipboardList"
10+
images: ["/bitcoin-topics/static/images/topics/thumbnails/musig-thumbnail.webp"]
11+
parent: "transaction-structure"
12+
---
13+
14+
(coming soon)

decoding/locktime.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: "Locktime"
3+
date: 2024-01-25T15:32:14Z
4+
lastmod: "2024-07-26"
5+
draft: false
6+
category: Transactions
7+
layout: TopicBanner
8+
order: 3.5
9+
icon: "FaClipboardList"
10+
images: ["/bitcoin-topics/static/images/topics/thumbnails/musig-thumbnail.webp"]
11+
parent: "transaction-structure"
12+
---
13+
14+
(coming soon)

decoding/marker-flag.mdx

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: "Marker and Flag"
3+
date: 2024-01-25T15:32:14Z
4+
lastmod: "2024-07-26"
5+
draft: false
6+
category: Transactions
7+
layout: TopicBanner
8+
order: 3.2
9+
icon: "FaClipboardList"
10+
images:
11+
[
12+
"/bitcoin-topics/static/images/topics/thumbnails/transaction-module/tx-marker-flag.webp"
13+
]
14+
parent: "transaction-structure"
15+
---
16+
17+
<TransactionCreation enabledFields={["marker", "flag"]} />
18+
19+
The marker and flag are optional fields introduced with **SegWit**.
20+
21+
They indicate that a transaction uses the segregated witness structure defined in **BIP144**.
22+
Witness data is required for inputs locked by **P2WPKH**, **P2WSH**, or **P2TR**.
23+
24+
## Marker
25+
26+
Marker indicates that the transaction uses the extended format.
27+
28+
- Marker is **1 byte**.
29+
- Must always be `0x00` to signal a SegWit transaction.
30+
31+
## Flag
32+
33+
- The flag is **1 byte**.
34+
- It is currently set to `0x01` in all SegWit transactions.
35+
- Future upgrades may use different flags.
36+
37+
<ExpandableAlert
38+
title="Note: Legacy Compatibility"
39+
type="info"
40+
expandable={false}
41+
>
42+
If a transaction doesn’t include witness data, marker and flag are omitted.
43+
</ExpandableAlert>
44+
45+
### Question
46+
47+
How do old nodes treat marker and flag for SegWit transactions?
48+
49+
<a
50+
href="https://chat.bitcoinsearch.xyz/?author=holocat&question=How%2520do%2520old%2520nodes%2520treat%2520marker%2520and%2520flag%2520for%2520SegWit%2520transactions%253F"
51+
target="_blank"
52+
>
53+
Answer here
54+
</a>

0 commit comments

Comments
 (0)