Author

Topic: lock time: big endian or little endian ? (Read 1373 times)

newbie
Activity: 39
Merit: 0
cjp
full member
Activity: 210
Merit: 124
Or you can check it the stupid way: make a lock time which is in the past when interpreted as little endian, but in the future when interpreted as big endian. Then make two transactions, which spend the same output, but with opposite endianness of the lock time. Broadcast both, and check which one ends up in the block chain.

Beware that if you make any mistakes, you might draw the wrong conclusion from such a test. For instance, don't forget to make one of the input sequence numbers non-equal to UINT_MAX, and don't forget, when choosing your lock time values, that there are two ranges of lock time values: one part is block height, and the other part is timestamp.

What you can also do is search the block chain for existing transactions that use the lock time, and analyze these.
legendary
Activity: 2097
Merit: 1070
April 28, 2015, 08:22:21 AM
#4
i can't say with confrimation but i always use little eldian raw time to protect the essential timing of a transation for bitcion to made it easy.
I need to make a zero value transcation to checkout whether the lock time shoud be big edian or little endiain but as i think you shoud go with little endian.

You could always check the source code to see where / how the value is used during transaction processing.

Maube read this then follow from there : http://bitcoin.stackexchange.com/questions/5914/how-is-locktime-enforced-in-the-standard-client
member
Activity: 65
Merit: 16
April 27, 2015, 10:21:04 PM
#3
Not yet, I will have to find a transaction somewhere with a non-zero value
to make some tests. But now I still have problems with my script to find
the way to verify the validity of a signature...
full member
Activity: 124
Merit: 100
photo taken by ESSA-7 satelite. 1968
April 26, 2015, 05:01:21 AM
#2
I want to create a raw transaction

If the lock time is not 00 00 00 00
should I write it as big endian or little endian ?

I always use little endian format for locktime coding in my raw transactions. haven't you tested it for your case?? 
member
Activity: 65
Merit: 16
April 21, 2015, 01:59:25 PM
#1
I want to create a raw transaction

If the lock time is not 00 00 00 00
should I write it as big endian or little endian ?
Jump to: