https://en.bitcoin.it/wiki/Protocol_specification#txField size:- 1+
How on earth do I actually mark it as greater than one? I tried just throwing another byte in there, but, that results in errors, I have this commented transaction so far:-
01000000014665a822ecf6c9741c6646b244e571ba305f18f3665f707ef5aea0f29d78fa99010000000100ffffffff01107a070000000000 //boring transaction stuff
07 //0x07 bytes script
4c //0x4c states "next byte defines how many bytes I should push to the stack"
03 //0x03 bytes
8f7a3c //Those 0x03 bytes, 0x8f, 0x7a, and, 0x3c
76 //OP_DUP
88 //OP_EQUALVERIFY
00000000 //More boring transaction stuff (locktime)
Which, results in:-
{
"hash": "5e4a2e55b8c21d491749d1009f568192e211fa931e78af343675fedf2371041d",
"ver": 1,
"vin_sz": 1,
"vout_sz": 1,
"lock_time": 0,
"size": 68,
"in": [
{
"prev_out": {
"hash": "99fa789df2a0aef57e705f66f3185f30ba71e544b246661c74c9f6ec22a86546",
"n": 1
},
"scriptSig": "OP_FALSE",
"sequence": 4294967295
}
],
"out": [
{
"value": "0.00490000",
"scriptPubKey": "8f7a3c OP_DUP OP_EQUALVERIFY"
}
]
}
However, like I said, I can't for the life of me work out how to increase the scriptPubKey to > 0xFF, imagine I have this:-
01000000014665a822ecf6c9741c6646b244e571ba305f18f3665f707ef5aea0f29d78fa99010000000100ffffffff01107a070000000000 //boring transaction stuff
0301 //(0x07 + 0xff - 0x03) bytes script, 0x0103, bytes reversed to 0x0301.
4c //0x4c states "next byte defines how many bytes I should push to the stack"
ff //0xff bytes
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa //Those 0xff bytes, a bunch of 0xAA
76 //OP_DUP
88 //OP_EQUALVERIFY
00000000 //More boring transaction stuff (locktime)
Results in:-
{
"hash": "a530ba3415952af7ed24f297fea7570219f401046fb50ac01d4c773bd2101bd0",
"ver": 1,
"vin_sz": 1,
"vout_sz": 1,
"lock_time": 2863311530,
"size": 64,
"in": [
{
"prev_out": {
"hash": "99fa789df2a0aef57e705f66f3185f30ba71e544b246661c74c9f6ec22a86546",
"n": 1
},
"scriptSig": "OP_FALSE",
"sequence": 4294967295
}
],
"out": [
{
"value": "0.00490000",
"scriptPubKey": "4c "
}
]
}
If I don't switch the bytes around for byte script length:-
01000000014665a822ecf6c9741c6646b244e571ba305f18f3665f707ef5aea0f29d78fa99010000000100ffffffff01107a070000000000 //boring transaction stuff
0103 //(0x07 + 0xff - 0x03) bytes script, 0x0103, bytes reversed to 0x0301.
4c //0x4c states "next byte defines how many bytes I should push to the stack"
ff //0xff bytes
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa //Those 0xff bytes, a bunch of 0xAA
76 //OP_DUP
88 //OP_EQUALVERIFY
00000000 //More boring transaction stuff (locktime)
Equals:-
{
"hash": "68ceb346c7711a74f31b8a285014ee08a58050480f69c5ee97cc75e803cf1c2e",
"ver": 1,
"vin_sz": 1,
"vout_sz": 1,
"lock_time": 2863333196,
"size": 62,
"in": [
{
"prev_out": {
"hash": "99fa789df2a0aef57e705f66f3185f30ba71e544b246661c74c9f6ec22a86546",
"n": 1
},
"scriptSig": "OP_FALSE",
"sequence": 4294967295
}
],
"out": [
{
"value": "0.00490000",
"scriptPubKey": ""
}
]
}
Any help on making scripts > 0xFF? All I'm currently getting is it overflowing into lockTime.