Bitcoin Script入門

Bitcoin Script入門

2018年10月28日OSC東京Fall東海道らぐLT大会で、Bitcoin Scriptの初歩的な話をLTでさせていただきました。

D3e027f453bb96ac1398cc98620f2920?s=128

Shu Kobuchi

October 28, 2018
Tweet

Transcript

  1. #JUDPJO4DSJQUೖ໳ ೥݄೔౦ւಓΒ͙!04$5PLZP'BMM ೔ຊ҉߸௨՟Ϣʔβձɹখᔹप 4IV,PCVDIJ

  2. খᔹपɹ4IV,PCVDIJɹ!TIV@LPCTIVLPCVDIJ ʙ4*FSͰϒϩοΫνΣʔϯͷݚڀ։ൃ୲౰ ʙϑϨηοπגࣜձࣾͷγχΞιϑτ΢ΣΞΤϯδχΞ w Ծ૝௨՟औҾॴ޲͚΢ΥϨοτ։ൃΛ୲౰ ࣗݾ঺հ !2

  3. ҉߸௨՟ಡॻձʗษڧձɹIUUQTDSZQUPDVSSFODZDPOOQBTTDPN ॳ৺ऀʙதڃऀ޲͚ͷʮϏοτίΠϯͱ͔ษڧձʯʢ݄̍ճɿฏ೔໷ʣ w ࣍ճ͸ ݄ ʙ඼઒೔ຊϚΠΫϩιϑτ தڃऀʙ্ڃऀ޲͚ͷʮ҉߸௨՟ྠಡձʯʢ݄̍ճɿฏ೔໷ʣ w ࣍ճ͸ ໦

    ʙ൒ଂ໳-*'6-- DSBTIBDBEFNZ *5ܥಈը഑৴ ʹͯϏοτίΠϯͱ͔ษڧձͷΞʔΧΠϒ഑৴த
 IUUQTDSBTIBDBEFNZDPNNVOJUZDSZQUPDVSSFODZ :PV5VCFνϟϯωϧʢྠಡձʗษڧձʣIUUQTHPPHM"2&W+ ϩάϛʔ5FDI ษڧձॻ͖ى͜͠ IUUQTMPHNJKQDPNNVOJUJFT ίϛϡχςΟ঺հ !3
  4. ϏοτίΠϯ͸Φʔϓϯιʔε ϏοτίΠϯ #JUDPJO ͸Φʔϓϯιʔε ୭Ͱ΋։ൃʹࢀՃՄೳʂ
 IUUQTHJUIVCDPNCJUDPJOCJUDPJO ϏοτίΠϯΛ͸͡Ίɺ҉߸௨՟ɾϒϩοΫνΣʔϯͷଟ͘͸044 ٕज़తʹ΋໘ന͍ʂʂ ϥΠτίΠϯ -JUFDPJO

    ͸#JUDPJOͷιʔείʔυ͔ΒϑΥʔΫ
 IUUQTHJUIVCDPNMJUFDPJOQSPKFDUMJUFDPJO ϞφίΠϯ .POBDPJO ͸-JUFDPJOͷιʔείʔυ͕ϕʔε
 IUUQTHJUIVCDPNNPOBDPJOQSPKFDUNPOBDPJO ΠʔαϦΞϜ &UIFSFVN ΋Φʔϓϯιʔε
 IUUQTHJUIVCDPNFUIFSFVNHPFUIFSFVN !4
  5. #JUDPJO4DSJQU -*'0 -BTU*O'JSTU0VU ͷ୯७ͳεΫϦϓτ 'PSUIͷΑ͏ͳٯϙʔϥϯυه๏ #JUDPJO5SBOTBDUJPOʹ͸ඞؚͣ·ΕΔ #JUDPJO$PSF CJUDPJOE ΍ϥΠϒϥϦΛ࢖͏ͱɺ#JUDPJO4DSJQUΛҙࣝ͠ͳ ͯ͘΋ɺϓϩάϥϜ͸ॻ͚Δ

    6OMPDLJOH4DSJQUͱ-PDLJOH4DSJQUΛಉ࣌ʹ࣮ߦ ਖ਼࣮͘͠ߦͰ͖Ε͹6OMPDLJOH4DSJQUͰ-PDLJOH4DSJQUΛղআͯ͠ɺτϥϯ βΫγϣϯͷ༗ޮੑΛࣔͤΔ !5 6OMPDLJOH4DSJQU -PDLJOH4DSJQU
  6. ୯७ͳྫ 6OMPDLJOH4DSJQUɺ-PDLJOH4DSJQUͷॱͰ࣮ߦ͢Δ ελοΫʹσʔλͱ01ίʔυΛೖΕ͍ͯ͘ 01ίʔυΛελοΫʹೖΕͨͱ͖͸໋ྩʹԠͯ͡Լͷσʔλͭ·ͨ͸ෳ਺ ʹରͯ͠ԋࢉ͢Δ !6 -PDLJOH4DSJQU 6OMPDLJOH4DSJQU  01@"%%01@&26"-Λ࣮ߦ

        01@"%%  Ճࢉ       536& ༗ޮ 01@&26"-  01@"%%01@&26"- ಉ஋͔ ౳͍͠
  7. 11, 1BZUP1VCMJD,FZ TJH͸ൿີ伴Λ༻͍ͯੜ੒͞ΕΔॺ໊ɺ1VC,͸ެ։伴 !7 -PDLJOH4DSJQU 6OMPDLJOH4DSJQU TJH1VC,01@$)&$,4*(Λ࣮ߦ TJH 1VC, TJH

    1VC, 536& ༗ޮ $)&$,4*( TJH 1VC,01@$)&$,4*( ॺ໊Λݕূ
  8. 11,) 1BZUP1VCMJD,FZ)BTIʢ11,ͷൃల൛ʣ ެ։伴ϋογϡΛ༻͍Δ͜ͱͰΞυϨεΛ୹͘දݱͰ͖Δ TDSJQU͸ʢʣ಺Ͱͷݺͼํ΋͋Δ !8 -PDLJOH4DSJQU TDSJQU1VC,FZ 6OMPDLJOH4DSJQU TDSJQU4JH TJH

    TJH1VC,01@%6101@)"4)1VC,)BTI01@&26"-7&3*': 01@$)&$,4*(Λ࣮ߦ TJH 536& 1VC, TJH 1VC, TJH 1VC, 1VC, 1VC, 1VC,)BTI TJH 1VC, 1VC,)BTI 1VC,)BTI TJH 1VC, 1VC,)BTI 1VC,)BTI TJH 1VC, 01@%61 )"4) ෳ੡ 01@&26"- ౳͍͠ TJH1VC, 01@%6101@)"4)1VC,)BTI 01@&26"-7&3*':01@$)&$,4*( ಉ஋͔ 4)"ͷޙ 3*1&.% ෳ੡
  9. 11,)ʢଓ͖ʣ ࢒Γ͸11,ͱಉ͡ !9 -PDLJOH4DSJQU 6OMPDLJOH4DSJQU TJH 1VC, TJH 1VC, 536&

    ༗ޮ $)&$,4*( TJH1VC, 01@%6101@)"4)1VC,)BTI 01@&26"-7&3*':01@$)&$,4*( ॺ໊Λݕূ
  10. ࠂ஌ʢ̍ʣ ೔ຊ҉߸௨՟Ϣʔβձϒʔεग़ల͍ͯ͠·͢ ؾܰʹ༡ͼʹདྷ͍ͯͩ͘͞ w ηϛφʔ͸೔໨ʹऴྃ νϥγ࡞Γ·ͨ͠ʂ  ݄ ʙ඼઒ϚΠΫϩιϑτ ϏοτίΠϯͱ͔ษڧձ

    IUUQTHPPHMXXOR.5 !10
  11. ࠂ஌ʢ̎ʣ &UIFSFVN ΠʔαϦΞϜ ٕज़ऀίϛϡχςΟʮ)J&UIFS෱Ԭࢧ෦ʯ΋ϒʔε ग़లʢηϛφʔ͸ͳ͠ʣ )J&UIFSͷೖΓํ w IUUQTRJJUBDPNBNBDIJOPJUFNT⒎EEDD )J$PO ౔

    ܚጯٛक़େֶ೔٢Ωϟϯύε w ೔ຊॳͷେن໛ΠʔαϦΞϜٕज़ऀձٞ w IUUQTDPOGFSFODFIJFUIFSPSH  Ұൠͷνέοτ͸ׂҾίʔυ͋Γ  ֶੜ͸ֶׂίʔυͰνέοτ͕ແྉ  -BZFS9$&0෱ౡྑయࢯ લ(VOPTZ$&0 
 %..$50দຊ༐ؾࢯ લ(VOPTZ$50 
 Βొஃऀ͸߽՚ʂ !11
  12. ࠂ஌ʢ̏ʣ /FVUSJOPୈࡾճϒϩοΫνΣʔϯηΩϡϦςΟษڧձʹࢲɺখᔹ͕ొஃ༧ఆ  ਫ ʙौ୩/FVUSJOP /FVUSJOP͸ϒϩοΫνΣʔϯʹಛԽͨ͠ίϫʔΩϯάεϖʔε ϑϨηοπࣾͷԾ૝௨՟औҾॴ޲͚΢ΥϨοτʮ&8.ʯ &OUFSQSJTF 8BMMFU.BOBHFNFOU 4ZTUFNΛ࣠ʹɺԾ૝௨՟ͷηΩϡϦςΟʹ͍ͭͯ

    ղઆ༧ఆ DPOOQBTTϖʔδ४උதɿ/FVUSJOPͷDPOOQBTTϖʔδΛνΣοΫ w IUUQTOFVUSJOPDPOOQBTTDPN !12