Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
CPFP carve out
Search
shigeyuki azuchi
December 16, 2020
Technology
67
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CPFP carve out
GBECの解説動画の資料です。
https://goblockchain.network/2020/12/cpfp-carve-out/
shigeyuki azuchi
December 16, 2020
Transcript
5 slides
CPFP carve out
1 CPFPとは? Child pays for parent(CPFP) Bitcoinにおいて送信済みトランザクションの手数料を上げるためのテクニック。
親 Tx Inputs Input 1 Input 2 Outputs 送金先アドレス お釣り用アドレス 手数料(低) 子 Tx Inputs Input 1 Outputs 自分のアドレス 手数料(高) 送信済みTxに設定されている手数料が低く なかなかブロックに入らない場合に、 そのTxのアウトプットのUTXOを使って 送金をする子Txを作成し、その手数料を 高く設定することで、親子セットで ブロックに入れてもらうアプローチ。 (必ず親が先) ほとんどのTxにはお釣りで自分に 返ってくるUTXOが存在するので、 このアプローチで手数料のBUMPが可能。 ※受信者が行うアプローチもあり。 ※RBFと違ってTxに特殊な設定が必要ない。
2 CPFPに関する制限 CPFPは複数の子Txチェーンについても機能するが、あまりにも多いと マイナーがブロックテンプレートを作成するのに時間がかかってしまう 【Bitcoin Coreの制限】 • -limitancestorcount=<n>
(default: 25) mempool内の祖先の数がn以上ある場合、Txを受け入れない • -limitancestorsize=<n> (default: 101) mempool内の全祖先のサイズがn KB以上になる場合、Txを受け入れない • -limitdecendantcount=<n> (default: 25) 祖先がn以上の子孫をmempoolに持つようになるTxを受け入れない。 • -limitdesendantsize=<n> (default: 101) 祖先がn KBを超える子孫をmempoolに持つようになるTxを受け入れない。
3 Transaction pinning Attack マルチパーティコントラクトにおけるDoS攻撃の一種 Bitcoin CoreのCPFPの制限を悪用する 親
Tx Inputs Input 1 … Outputs Bobへの送金 Malloryへの送金 手数料(低) Malloryがlimitdescendantsize 制限付近の子Txを作成することで、Bobが親Tx のUTXOを使用した子Txを作れないようにする。 結果、BobはCPFPを使って親Txの手数料を 上げることができない。 ※ 通常の支払いであれば大きな問題にならないが、 LNのような時間に依存するプロトコルにおいては問題に。 状況によってはマルチホップ支払い(HTLC)のコインが盗難に。 子 Tx
4 CPFP carve out Bitcoin Core v0.19.0で導入された新しいmempoolポリシー CPFP carve out
• Txの未承認の祖先Txが1つしかない場合 ◦ Txチェーンの深さの制限(count)と、サイズの制限(size)を適用しない 親 Tx Inputs Input 1 … Outputs Bobへの送金 Malloryへの送金 手数料(低) Malloryががlimitdescendantsize 制限の子Txを 作成しても、Fee Bump Txには制限が適用されず、 Bobは手数料の上げることが可能になる。 親Txのアウトプット毎に必ず1つは Fee Bumpを 可能にするポリシーの変更。 このポリシーによりLNの Anchor Outputが使用可能に。 子孫 Tx Fee Bump Tx
More Decks by shigeyuki azuchi
See All by shigeyuki azuchi
SLH-DSA (SPHINCS+)
azuchi
0
27
Hyper Tree
azuchi
0
24
FORS
azuchi
0
39
クラスターmempool
azuchi
0
50
W-OTS+
azuchi
0
58
Shorのアルゴリズム
azuchi
0
76
DahLIAS: Discrete Logarithm-Based Interactive Aggregate Signatures
azuchi
0
63
Fiat-Shamir変換と注意点
azuchi
0
280
AssumeUTXOを利用したブロックチェーンの同期
azuchi
0
77
Other Decks in Technology
See All in Technology
Where Should Platform Complexity Live? Lessons from a Cross-Team PR Preview Platform
taiki45
0
140
速くなるほど、深く考える AI時代のQAに学ぶ
kobayashiyorimitsu
0
260
お風呂場をサーバルームにしよう
yusuke427
0
310
「AIチャットからもできないの?」と言われたら ~業務アプリをMCP対応するときの認証・認可の勘所
oidfj
0
370
アラートを見直していたら営業組織への理解にちょっとだけ繋がった話
z63d
1
210
閉域網でのAPI公開の選択肢全部比較!
takano0131
3
510
会社説明資料_最新版
demaecan
0
32k
これからのデータエンジニアの役割について考える / Rethinking the Role of Data Engineers in the AI Era
okiyuki99
1
530
Go初心者のクラウドエンジニアが、デプロイを通して旨味を知っていく話
ryudai
1
230
田んぼの見回りをIoTで減らしたい!水位監視から電池駆動カメラまでの試行錯誤
itosoft
1
260
20261113_JAWS_Osaka
takuyay0ne
1
580
IP重複は"ランディングVPC"で受け止める ― PrivateLink と Transit Gatewayによるマルチテナント接続基盤の設計
hatahata021
3
240
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.9k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
580
ラッコキーワード サービス紹介資料
rakko
5
5.9M
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Producing Creativity
orderedlist
PRO
348
41k
A Modern Web Designer's Workflow
chriscoyier
699
190k
30 Presentation Tips
portentint
PRO
1
470
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
600
Unsuck your backbone
ammeep
672
58k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k