Search content
Sort by

Showing 20 of 42 results by sonicskye
Post
Topic
Board Bahasa Indonesia (Indonesian)
Re: Liquid Network
by
sonicskye
on 02/06/2020, 00:35:43 UTC

Federasi ini sendiri terdiri dari korperasi besar Exchange dan lembaga keuangan seperti : Bitbank, Bitfinex, Bitmax, BitMEX, Bitso,BTCBOX, BTCTrader / BtcTurk, BTSE, Cobo, Coinone, Coinut, DGroup, DMM Jepang , FRNT Financial, Gate.io, GOPAX, Huobi, L2B Global, OKCoin, OpenNode, Poolin, Prycto dan lain-lain. Mereka inilah yang berfungsi penuh dalam jaringan liquid, sebagai signer dan watchmen.

https://docs.blockstream.com/_images/sidechain.png

Peg-in (Bitcoin to Liquid) Adalah memindahkan saldo bitcoin ke liquid.
ilustrasi peg-in

https://docs.blockstream.com/_images/peg_in.png

Peg-out (Liquid to Bitcoin) kebalikan dari Peg-in yaitu memindahkan saldo Liquid ke Bitcoin.
ilustrasi peg-out

https://docs.blockstream.com/_images/peg_out.png

Penggunaan Liquid Network

Pertama tentu harus memiiki wallet, versi core bisa di download di https://github.com/elementsproject/elements/releases

https://i.postimg.cc/dQrYMsRf/core.png

contoh alamat L-Btc

Code:
VJLDGfKLaynHehkTBAYo5bBTRJUuPvs4U3k3Kwbtn9FcwBfJtACkYPZcNu7ARdJEdXznhwuRKaBwNM7k

untuk yang di handphone bisa download greenaddress

https://i.postimg.cc/cCy3PcSV/photo6142948207592843708.jpg

Untuk awal bikin wallet pilih liquid, untuk selanjutnya sama seperti bikin wallet pada umumnya. nanti akan mendapatkan alamat Liquid di tombol receive

Bagaimana menukarnya ke Bitcoin?
Exchange federasi yang telah disebutkan di atas yang mengelola Peg-in dan peg-out tersebut.
sebagai contoh Bitfinex https://support.bitfinex.com/hc/en-us/articles/360022998733-LiquidBTC

https://support.bitfinex.com/hc/article_attachments/360035089953/Screen_Shot_2019-05-13_at_12.01.27_AM.png

contoh transaksi L-BTC , https://twitter.com/wiz/status/1219680013370310657

https://i.postimg.cc/hG27tb19/lbtc.png

https://i.postimg.cc/tT7nZZB8/lbtc8.png

PENUTUP

Thread ini sebagai sharing ilmu pengetahuan dan edukasi. Kita bisa berdiskusi segala hal tentang Liquid network di sini. dalam hal ini saya juga masih belajar, bukan seorang expert.

Preference
https://blockstream.com/
https://docs.blockstream.com/
https://medium.com/@lubna.io/liquid-network-inovasi-bitcoin-apa-lagi-ya-ini-8dfd8bfe496c
https://en.cryptonomist.ch/2019/06/08/what-is-the-liquid-network-sidechain/
https://www.bitcoinmedia.id/blockstream-rilis-liquid-block-exploler/?amp=1
https://www.bitcoinmedia.id/bagian-kedua-sejarah-skalabilitas-bitcoin/
https://www.bitcoinmedia.id/perkembangan-kriptografi-dalam-mendukung-privasi/


Thanks informasinya.

Saya sedang mendalami cross-chain protocol (CCP), di antaranya 2-way peg (2WP) nya Back, dan tentunya Liquid Network (LiN).
Ada problem besar yang saya amati dari LiN ini, yang diturunkan dari problem 2WP, yakni federation yang menguasai "vault" dari bitcoin yang disetorkan pengguna saat peg-in.
Federation punya kekuasaan untuk memindahkan BTC dari satu alamat ke alamat lain, selama mereka memenuhi k-of-n multisignature di mainnet BTC. Di sini, bila ada k anggota federation yang berbuat curang, maka BTC bisa hilang. Back sudah menyadari potensi masalah ini di papernya. Oleh karena itu, LiN barangkali hanya cocok untuk komunitas kecil.

Kemudian, adanya confidential transaction (CT), menurut intuisi saya, akan membuat sulitnya audit L-BTC terhadap BTC yang di-peg. Mengingat di dalam CT, jumlah koin terenkripsi, maka akan sulit membuktikan jumlah L-BTC beredar = jumlah BTC di-peg.
Post
Topic
Board Altcoin Discussion
Invitation to our Monero survey
by
sonicskye
on 06/12/2018, 21:21:55 UTC
Dear cryptocurrency users,

I am a PhD researcher at Monash University, Australia. I am a part of the cybersecurity group of Faculty of Information Technology who are focusing on blockchain technology. Our interests lie in privacy-preserving cryptocurrencies and how cryptographic techniques are being implemented in those cryptocurrencies.

I am conducting a survey to better understand the users’ perspective towards Monero's privacy features. The purpose of the survey is to investigate how Monero is used and how the Monero users perceive the anonymity of Monero.

If you are a Monero user (owning Monero or having experience in using Monero), we invite you to respond to our survey. We do not record your IP address information, referrer, or any other information otherwise explicitly stated.

The survey will take up to 15 minutes to complete and is available through the following link: https://monash.az1.qualtrics.com/jfe/form/SV_egnHCGdgXMS6Kt7.

Our study has been approved by Monash University Human Research Ethics Committee (Project ID. 16933).

Thank you in advance for your help.
Post
Topic
Board Bahasa Indonesia (Indonesian)
Re: Sejarah kamu sampai bisa di bitcointalk?
by
sonicskye
on 10/09/2017, 09:09:20 UTC
bitcointalk ada sejak era satoshi memperkenalkan bitcoin. topik-topik serius paling enak di-post di sini, apalagi yang berkaitan dengan teknis yang tidak ada di manapun, biasanya dapat jawabannya di sini.
Post
Topic
Board Bahasa Indonesia (Indonesian)
Re: Di kucilkan karena bitcoin
by
sonicskye
on 10/09/2017, 08:52:21 UTC
saya malah setup website, twitter, facebook page tentang kriptologi (kriptologi.com)  Grin
asal share info/teknologi yang bermanfaat oke2 aja kok. jangan share link afiliasi yang gak ada manfaatnya.
Post
Topic
Board Bahasa Indonesia (Indonesian)
Re: Mengapa Bitcoin Memiliki Nilai?
by
sonicskye
on 10/09/2017, 08:49:44 UTC
mengapa bitcoin mempunyai nilai ? jawaban ane karena bitcoin berada di posisi istimewa dimata banyak orang dan karena berguna seperti layaknya uang, pertanyaan ane kenapa anda copy paste postingan punya blog orang ?( https://kriptologi.com/2017/08/30/mengapa-bitcoin-memiliki-nilai/ ) apa biar terlihat keren atau pintar atau bagaimana ?

gak apa2. yang punya gak berkeberatan kok  Grin
Post
Topic
Board Bahasa Indonesia (Indonesian)
Re: Adakah agan yang di sini masih status Pelajar,.?
by
sonicskye
on 10/09/2017, 08:48:25 UTC
saya pelajar... s3. hehe.
Post
Topic
Board Development & Technical Discussion
Merits 1 from 1 user
Re: How to use OP_CHECKSEQUENCEVERIFY
by
sonicskye
on 11/06/2017, 05:39:30 UTC
⭐ Merited by Husna QA (1)
I just told you what was the problem.
the push does matter!
why don't you just try it?

change tx version to 2 and {0x01,0x0a} to 0x5a inside the spending script, and it will work.
trust me.

obviously, you won't be able to spend the existing output through the else condition.
because it contains "illegal" pushes.
you need to make another P2SH address, for the script with 5a (instead of 010a)

your suggestion was awesome!

I managed to redeem the transaction (I created a new P2SH script without the push opcode).

https://blockchain.info/tx/4ba75dfe11988663cfcbbc8911eedee1f867d99fa744a6137e885315b3a073e1

the OP_CSV is simpler compared to OP_CLTV in my opinion, since we do not need to set the nLockTime and calculate a specific time in the future. All we need is just the nSequence with nSequence >= OP_CSV value and set the tx version to 2. Awesome! Thank you @piotr_n.
Post
Topic
Board Development & Technical Discussion
Re: How to use OP_CHECKSEQUENCEVERIFY
by
sonicskye
on 09/06/2017, 11:09:55 UTC
does it mean if we need to push numbers from 1-16, we shall use OP_1 to OP_16?
It is not nessesary in p2sh redeem script to use opcodes OP_0, OP_1...OP_16 instead of pushes
but is saves one byte per input on each full bitcoin node Smiley

hello, it's been a while  Grin

anyway, do you have any suggestions about this OP_CSV problem? if the push does not matter in OP_CSV as you said it only saves a byte per input. I already have set the version to 2, then what else, did I miss something?
Post
Topic
Board Development & Technical Discussion
Re: How to use OP_CHECKSEQUENCEVERIFY
by
sonicskye
on 07/06/2017, 21:03:08 UTC
@sonicskye, I think your tx is failing the "minimal push" check.
it's some crazy stuff that (I think) is supposed to prevent tx malleability - don't ask me about it Smiley


but what you have to change is the place where you push value 10 onto the stack
instead of using {0x01, 0x0a}, you should use a single 0x5a (OP_10)

plus, as it was said before, you need version 2 or more - then it will work.


Thank you for your reply. I have rechecked my script and it uses 0x01 0x0a instead of 0x5a.
Just to make it clear, according to Bitcoin Wiki (https://en.bitcoin.it/wiki/Script), does it mean if we need to push numbers from 1-16, we shall use OP_1 to OP_16?
Post
Topic
Board Development & Technical Discussion
Re: How to use OP_CHECKSEQUENCEVERIFY
by
sonicskye
on 07/06/2017, 02:19:03 UTC
Read the BIP: https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki

Your transaction needs to have a version number of 2, not 1. There may also be some other issue, but read the BIP carefully and you will be able to find it.

Thank you for your reply.
I have tried to use version 2. I also have read the BIP and I assume that one only need to set the nSequence variable to be higher than the OP_CSV value, it means it has nothing to do with the nLockTime. All Failed.

Someone told me that this OP_CSV is not currently active in mainnet.
Post
Topic
Board Development & Technical Discussion
Topic OP
How to use OP_CHECKSEQUENCEVERIFY
by
sonicskye
on 06/06/2017, 07:44:48 UTC
Dear all,

I am currently studying the OP_CHECKSEQUENCEVERIFY (OP_CSV) opcode and trying to create transactions manually. I have this construction

OP_IF
   2 [PUBKEY A] [PUBKEY B] 2 OP_CHECKMULTISIG
OP_ELSE
   [CSV VALUE] OP_NOP3 OP_DROP
   OP_DUP OP_HASH160 [PUBKEYHASH B] OP_EQUALVERIFY OP_CHECKSIG
OP_ENDIF

So far I have succeeded redeeming the P2SH tx above through the multisignature (the OP_IF.. block). But I have problems when redeeming the transaction through the OP_ELSE.. OP_ENDIF block which is when the OP_CSV is evaluated. I have set the [CSV VALUE] to 0x0a in hexadecimal (or 10 in decimal).

My current effort was to set the nSequence and the nLockTime variables to be more than the CSV value. I have created a raw tx to redeem the OP_CSV as follows

01000000010c3e18ff26e98ba39381c84d2fb9e8e198e63d0b3697f9bd57f63577c96da23f00000 000d5483045022100fc4f7bfa3c536e743b02af8b7de5d4052f43db54f59692478b25c585b9df21 1a02203cfcfc0ed618fae6aa49b11e803ec4e5654551fb52fe2d026929f4a307fe2ef0012103d7c 6052544bc42eb2bc0d27c884016adb933f15576a1a2d21cd4dd0f2de0c37d004c67635221025e37 e03703f001de34123b513beaf0e4044a2dd39a1dd92ec1706f184920031a2103d7c6052544bc42e b2bc0d27c884016adb933f15576a1a2d21cd4dd0f2de0c37d52ae67010ab27576a914937fe2ee82 229d282edec2606c70e755875334c088ac680f0000000130750000000000001976a914937fe2ee8 2229d282edec2606c70e755875334c088ac0f000000

In the raw tx, I have set the nSequence to 15 and nLockTime to 15 (I know this is not a good idea, but I'm desperate).

The raw tx itself was rejected in many pushtx services, except the blockcypher, although it has not been confirmed to the blockchain.
https://live.blockcypher.com/btc/tx/bcfbb172403ba73643ae02d40cac1332b75173d9726917dd8263a15ce365c012/

Please let me know if you have any suggestions. Thank you.
Post
Topic
Board Development & Technical Discussion
Re: Is this BIP65 sample script standard?
by
sonicskye
on 02/01/2016, 07:36:24 UTC
I wonder if the CLTV is not deployed in testnet yet

It could well be that not enough of the testnet peers have upgraded - I think the next step is to play with -regtest rather than -testnet (so you are mining your own blocks).


That's why I quitted using testnet (and people do not stop asking me why I do the tests in mainnet).
I emailed Josh Cincinnati from blockcypher.com and he said it would be better to run the test in our own testnet, or we can also use their testnet.

https://medium.com/blockcypher-blog/testnet-is-not-for-testing-5afa78b1394
Post
Topic
Board Bahasa Indonesia (Indonesian)
Re: Apakah Benar 2016 adalah Tahun BItcoin ? #spekulasi
by
sonicskye
on 02/01/2016, 07:30:47 UTC


Block halving sudah pernah terjadi. Ingat kan, awal mula reward per blok itu 50BTC, sekarang sudah 25BTC. Block halving berarti akan jadi 12.5BTC. Tidak ada hubungannya dengan jumlah bitcoin yang sudah beredar.

jadi 12.5 btc? wkwkwk dikit amat kalau tinggal segitu btcnya gan yg bs di tambang kalau ngak salah dari 21 juta menjadi 17 juta btc nantinya setelah habis di tambang.

block halving itu tentang pemotongan "upah" para penambang bitcoin. jadi ga ada hubungannya dengan jumlah BTC yang beredar. sekarang ini upahnya masih 25BTC perblok, nanti sehabis block halving akan jadi 12.5BTC upahnya per blok.
Post
Topic
Board Development & Technical Discussion
Re: Is this BIP65 sample script standard?
by
sonicskye
on 02/01/2016, 05:47:28 UTC
If I issue a signrawtransaction with (basically) the same tx I see this:

Code:
{
    "hex" : "0100000001bbc6c76fd91bee5badfb0746204adba70efceb04f21a270de566827dbc34e84100000000cc473044022015c6fca1fb3e8244cfd9a90d1
348d387cb6e8792102be79ecf97cee0246b73b802201162c3acd0a1f915ee46bbf0ec4ee7ab49365c4e48c33502575c2f46298f7249012102d1570ab314b7b32ffe7
6f31232805a727d05119958d14b0b8aff9df5709676884c6076a820c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f26864687637576a9140
1d7295f243a3a6d26516b54e4e6f51278d376b588ac6703ac9a09b17576a914b6a7c89a6774de8c88d0b7a4043a6645983a479588ac68000000000120a1070000000
0001976a9148a7dd4d0e29f50f989dd2b97d463d706a7ef0c7b88ac289c0900",
    "complete" : false,
    "errors" : [
        {
            "txid" : "41e834bc7d8266e50d271af204ebfc0ea7db4a204607fbad5bee1bd96fc7c6bb",
            "vout" : 0,
            "scriptSig" : "473044022015c6fca1fb3e8244cfd9a90d1348d387cb6e8792102be79ecf97cee0246b73b802201162c3acd0a1f915ee46bbf0ec4
ee7ab49365c4e48c33502575c2f46298f7249012102d1570ab314b7b32ffe76f31232805a727d05119958d14b0b8aff9df5709676884c6076a820c775e7b757ede63
0cd0aa1113bd102661ab38829ca52a6422ab782862f26864687637576a91401d7295f243a3a6d26516b54e4e6f51278d376b588ac6703ac9a09b17576a914b6a7c89
a6774de8c88d0b7a4043a6645983a479588ac68",
            "sequence" : 0,
            "error" : "Script evaluated without error but finished with a false/empty top stack element"
        }
    ]
}

The question is whether the complete being false is due to an invalid sig or due to the script eval error.


I crafted a tx pair similar to yours (same cltv block and same locktime) in testnet, I think it is correct but it won't be sent to the network.
This is the rawtx
Code:
0100000001de320e8cc248e7fe8fc7e57ec70b0d1bf3a44122f634bf443a2a8fceb39b63c001000000cc473044022026d86fa3239733e866bc4187e6a13813e7db68cb39aceb3837054f7340a1a62002200f5fd9f7c6a0a9d92b4233faac4bb9642584818da737dd51cae4951e01d7839501210260274c034ffc8dc6a2ceb1ff5f31031c593d7005bd286f03c9cadb1bc662961b4c6076a820c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f26864687637576a9149d8fe65f4bccb39d510c45ae3bcf9cf0a3a22b0e88ac6703ac9a09b17576a9147abb3052f7090c5379d2af382c84eeab0658488188ac68010000000180c3c901000000001976a9147abb3052f7090c5379d2af382c84eeab0658488188ac289c0900

I wonder if the CLTV is not deployed in testnet yet
Post
Topic
Board Bahasa Indonesia (Indonesian)
Re: Apakah Benar 2016 adalah Tahun BItcoin ? #spekulasi
by
sonicskye
on 02/01/2016, 04:57:08 UTC

Bukannya halving itu pengurangan jumlah btc yg akan beredar
Dan bukannya bitcoin itu di mining jadi nanti para miner makin susah buat mining btc banyak biaya dr pada hasilnya.

halving itu pemotongan BTC reward yang diperoleh para miner, bukan jumlah BTC yang beredar. jumlah BTC beredar tidak bisa dikurangi kecuali ledger (blockchain) nya rusak.


Mining btc tidak menguntungkan lagi karena Diff sudah terlalu tinggi itulah kenapa banyak cloudmining yang tutup karena nga bisa lagi menyesuaikan biaya mining dengan hasil yang di dapatkan.

Sedikit tentang difficulty / Diff bisa dibaca di artikel ini
http://www.kompasiana.com/dmz/sisi-lain-bitcoin-gerakan-politik-inefisiensi-dan-dorongan-ekonomi-manusia_563ab0e29397737d048b4567

Makin banyak orang mining maka hashpower makin tinggi, diff makin tinggi, efisiensi makin rendah. tujuannya cuma satu : generating block once in 10 minutes.

mungkin bukan maksudnya jumlah btc yang beredar sekarang tapi disaat nanti sudah terjadi block halving maka jumlah btc akan berkurang biar untuk menekan inflasi terhadap btc itu sendiri.

Block halving sudah pernah terjadi. Ingat kan, awal mula reward per blok itu 50BTC, sekarang sudah 25BTC. Block halving berarti akan jadi 12.5BTC. Tidak ada hubungannya dengan jumlah bitcoin yang sudah beredar.
Post
Topic
Board Development & Technical Discussion
Re: Is this BIP65 sample script standard?
by
sonicskye
on 31/12/2015, 21:23:54 UTC
I am guessing if I can work out the format that is suitable for signing (which will have that 00 and I think requires another 01000000 to be added at the end of the inputs from memory) then I can manually sign it and then try and send the tx.

Anyone can for sure tell me the hex input for signing?


I don't really understand the question. Do you mean you cannot produce a valid signature by using your tool? I checked the rawtx you created and indeed the problem is within the signature. webbtc verifies this as well.
Post
Topic
Board Development & Technical Discussion
Re: Is this BIP65 sample script standard?
by
sonicskye
on 31/12/2015, 12:17:33 UTC
Hmm... I have nearly got there (perhaps):

Code:
0100000001bbc6c76fd91bee5badfb0746204adba70efceb04f21a270de566827dbc34e8410000000085002103d30f361b0d5dacba61a56db0903fe32244b5616f950cac1081694e81148dd7594c6076a820c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f26864687637576a91401d7295f243a3a6d26516b54e4e6f51278d376b588ac6703ac9a09b17576a914b6a7c89a6774de8c88d0b7a4043a6645983a479588ac68000000000140420f00000000001976a9148a7dd4d0e29f50f989dd2b97d463d706a7ef0c7b88ac00000000

When I decode this I am seeing the following (which I think looks fine):
Code:
{
    "txid" : "b6ae7d90587b27adef7c36571cc1fdf4fbe04c77d2a3113a2239188285f581cf",
    "version" : 1,
    "locktime" : 0,
    "vin" : [
        {
            "txid" : "41e834bc7d8266e50d271af204ebfc0ea7db4a204607fbad5bee1bd96fc7c6bb",
            "vout" : 0,
            "scriptSig" : {
                "asm" : "0 03d30f361b0d5dacba61a56db0903fe32244b5616f950cac1081694e81148dd759 76a820c775e7b757ede630cd0aa1113bd10266
1ab38829ca52a6422ab782862f26864687637576a91401d7295f243a3a6d26516b54e4e6f51278d376b588ac6703ac9a09b17576a914b6a7c89a6774de8c88d0b7a4
043a6645983a479588ac68",
                "hex" : "002103d30f361b0d5dacba61a56db0903fe32244b5616f950cac1081694e81148dd7594c6076a820c775e7b757ede630cd0aa1113bd
102661ab38829ca52a6422ab782862f26864687637576a91401d7295f243a3a6d26516b54e4e6f51278d376b588ac6703ac9a09b17576a914b6a7c89a6774de8c88d
0b7a4043a6645983a479588ac68"
            },
            "sequence" : 0
        }
    ],
    "vout" : [
        {
            "value" : 0.01000000,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 8a7dd4d0e29f50f989dd2b97d463d706a7ef0c7b OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a9148a7dd4d0e29f50f989dd2b97d463d706a7ef0c7b88ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "mt9EHSSeERgWKNqYfdmkpa4Mjb4EXr4QY2"
                ]
            }
        }
    ]
}

But unfortunately if I try and sign it I get this output:

Code:
{
    "hex" : "0100000001bbc6c76fd91bee5badfb0746204adba70efceb04f21a270de566827dbc34e8410000000085002103d30f361b0d5dacba61a56db0903fe
32244b5616f950cac1081694e81148dd7594c6076a820c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f26864687637576a91401d7295f243
a3a6d26516b54e4e6f51278d376b588ac6703ac9a09b17576a914b6a7c89a6774de8c88d0b7a4043a6645983a479588ac68000000000140420f00000000001976a91
48a7dd4d0e29f50f989dd2b97d463d706a7ef0c7b88ac00000000",
    "complete" : false,
    "errors" : [
        {
            "txid" : "41e834bc7d8266e50d271af204ebfc0ea7db4a204607fbad5bee1bd96fc7c6bb",
            "vout" : 0,
            "scriptSig" : "002103d30f361b0d5dacba61a56db0903fe32244b5616f950cac1081694e81148dd7594c6076a820c775e7b757ede630cd0aa1113
bd102661ab38829ca52a6422ab782862f26864687637576a91401d7295f243a3a6d26516b54e4e6f51278d376b588ac6703ac9a09b17576a914b6a7c89a6774de8c8
8d0b7a4043a6645983a479588ac68",
            "sequence" : 0,
            "error" : "NOPx reserved for soft-fork upgrades"
        }
    ]
}


Are you trying to redeem the CLTV block? BX decodes the tx as follows.

Quote
transaction
{
    hash b6ae7d90587b27adef7c36571cc1fdf4fbe04c77d2a3113a2239188285f581cf
    inputs
    {
        input
        {
            previous_output
            {
                hash 41e834bc7d8266e50d271af204ebfc0ea7db4a204607fbad5bee1bd96fc7c6bb
                index 0
            }
            script "zero [ 03d30f361b0d5dacba61a56db0903fe32244b5616f950cac1081694e81148dd759 ] [ 76a820c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f26864687637576a 91401d7295f243a3a6d26516b54e4e6f51278d376b588ac6703ac9a09b17576a914b6a7c89a6774 de8c88d0b7a4043a6645983a479588ac68 ]"
            sequence 0
        }
    }
    lock_time 0
    outputs
    {
        output
        {
            address mt9EHSSeERgWKNqYfdmkpa4Mjb4EXr4QY2
            script "dup hash160 [ 8a7dd4d0e29f50f989dd2b97d463d706a7ef0c7b ] equalverify checksig"
            value 1000000
        }
    }
    version 1
}

I wonder why there is a zero there.
Post
Topic
Board Development & Technical Discussion
Re: Is this BIP65 sample script standard?
by
sonicskye
on 31/12/2015, 12:11:27 UTC
This Bitcoin Script IDE might be useful, but there might be a bug in it.

http://www.cs.princeton.edu/~tongbinw/bitcoinIDE/build/editor.html

The following thread discusses signing transactions on the testnet, and using the IDE to track down problems, but one of the final comments says it was giving inconsistent results with known good values. However, the IDE might have been updated since then.


Last time I checked, it is still buggy. This one https://webbtc.com/script is one of the best so far, despite it does not work lately.
Post
Topic
Board Development & Technical Discussion
Merits 1 from 1 user
Re: Is this BIP65 sample script standard?
by
sonicskye
on 31/12/2015, 12:08:37 UTC
⭐ Merited by Husna QA (1)
I was trying to add another branch of OP_ELSE to mimic Gmaxwell's CoinSwap but I don't really know how to skip the previous OP_ELSE and run the next OP_ELSE. Do you know how to do it?

I think I remember reading that you can nest the OP_IFs - in which case you would do something like this:


OP_IF

OP_IF
...
OP_ELSE
...
OP_ENDIF
OP_ELSE
...
OP_ENDIF


Hi, many thanks for the clue. I managed to construct the following structure

Quote
OP_IF
OP_IF
OP_DUP OP_SHA256 OP_EQUAL
OP_DROP
OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG
OP_ELSE
OP_NOP2 OP_DROP
OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG
OP_ENDIF
OP_ELSE
2 2 OP_CHECKMULTISIG
OP_ENDIF
The structure probably is the first few steps of Gmaxwell's Coinswap. I am not sure whether this can be called as atomic. Basically the tx can be redemed by 3 different ways:
- secret value + sig2
- sig1 + pubkey1 after certain CLTV
- sig1 + sig2 (in 2-of-2 multisig)
Post
Topic
Board Development & Technical Discussion
Re: Is this BIP65 sample script standard?
by
sonicskye
on 30/12/2015, 20:23:54 UTC
So far I have now come up with the following P2SH template:

76a82087637576a91488ac6703b17576a91488ac68

which can be better understood as this:

Code:
OP_DUP
OP_SHA256

OP_EQUAL
OP_IF
OP_DROP
OP_DUP
OP_HASH160

OP_EQUALVERIFY
OP_CHECKSIG
OP_ELSE

OP_NOP2
OP_DROP
OP_DUP
OP_HASH160

OP_EQUALVERIFY
OP_CHECKSIG
OP_ENDIF

Noting that:
is the SHA256 hash of the "secret"
is the public key hash for the "reveal secret" redeem script
is the block number for a CLTV refund to occur at and
is the public key hash for the "CLTV refund" redeem script

The lengths of things being pushed onto the stack has been hard-coded in this template which is fine for the hashes but would not be fine if you changed to instead be a timestamp (something I'll be looking into a little later).


I was trying to add another branch of OP_ELSE to mimic Gmaxwell's CoinSwap but I don't really know how to skip the previous OP_ELSE and run the next OP_ELSE. Do you know how to do it?