Bitcoin Forum
June 14, 2024, 08:12:41 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Optimized Bitcoin HTLC BIP  (Read 166 times)
mjablack (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 3


View Profile
November 20, 2018, 02:25:49 PM
 #1

Recently added a PR to Bitcoin BIPs Repo. This is an optimized HTLC using the same inputs, but saves 1 byte of data for each P2SH.

https://github.com/bitcoin/bips/pull/738

Looking for community feedback on this.
franky1
Legendary
*
Online Online

Activity: 4256
Merit: 4523



View Profile
November 20, 2018, 03:08:27 PM
Last edit: November 20, 2018, 03:30:27 PM by franky1
 #2

keeping the extra byte is something core devs love as they can use that byte to add more opcodes. and also do some inflight forks/upgrades without disturbing older nodes

EG ELI-15 (very dumbed down example for general readers, dont knick pick length of position of bytes.. its just for display)
the old opcode

imagine a tx xxxxxxxxxxx~xxxxxxxxxxxxxxxxxxx
imagine ~ was an opcode byte
they can at one point has just

(numbers in ascii upto 256)
~ is:
0=no action pass as acceptable without checking (anyone can spend)
1=do a
2=do b
.. and so on

they can the change it, so that if 0(ascii) selected that it now treats for new segwit nodes that 'do nothing'(anyonecanspend) is now 'follow segwit opcode list'
where segwit can then totally change what comes after ~
xxxxxxxxxxx~%xxxxxxxxxxxxxxxxxxx

so then they can have a sub-list of opcodes(%) and different things. without having to change the original ~
then have the % have another sub opcode list

thus expanding and adding new opcodes without forcing nodes that only understand the original ~ or % as a short list
EG
0(~)=segwit
     00(~%)=segwit do nothing
     01(~%)=segwit do z
     02(~%)=segwit do x
1(~)=do a
2(~)=do b

I DO NOT TRADE OR ACT AS ESCROW ON THIS FORUM EVER.
Please do your own research & respect what is written here as both opinion & information gleaned from experience. many people replying with insults but no on-topic content substance, automatically are 'facepalmed' and yawned at
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!