Skip to content

Commit

Permalink
Updated newly generated xml files
Browse files Browse the repository at this point in the history
  • Loading branch information
urvishp80 committed Oct 29, 2024
1 parent 22e33b4 commit 8a7d0d5
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>1</id>
<title>OP_PAIRCOMMIT as a candidate for addition to LNhance</title>
<updated>2024-10-29T02:21:31.301605+00:00</updated>
<author>
<name>ajtowns 2024-10-28 11:16:51.953000+00:00</name>
</author>
<generator uri="https://lkiesow.github.io/python-feedgen" version="0.9.0">python-feedgen</generator>
<entry>
<id>1</id>
<title>OP_PAIRCOMMIT as a candidate for addition to LNhance</title>
<updated>2024-10-29T02:21:31.301636+00:00</updated>
<link href="https://delvingbitcoin.org/t/op-paircommit-as-a-candidate-for-addition-to-lnhance/1216/8" rel="alternate"/>
<summary>The discussion focuses on optimizing the use of SHA256 iterations for LN-Symmetry, highlighting that minimizing these iterations is not seen as crucial by some. It is pointed out that the computational difference in hashing varying byte sizes is minor compared to the operations involved in checking signatures. A proposed method for constructing a hash involves a sequence of operations starting with balance and CTV hash inputs, followed by multiple SHA256 hashes and concatenations. This method accommodates a 7-byte balance commitment combined with a 32-byte CTV hash, yielding a preimage size of 55 bytes which fits within a single SHA256 block.

The concern raised revolves around LN-Symmetry in conjunction with CTV (CHECKTEMPLATEVERIFY), particularly regarding the potential for length redistribution attacks due to the fixed 32-byte template requirement of CTV. This stipulation could inadvertently facilitate upgradeability issues since CTV acts as a no-operation (NOP) for non-32-byte templates, a feature designed for future-proofing. To mitigate these concerns while still supporting the goal of minimal hashing and ensuring compatibility with potential CTV upgrades, an intricate method involving various operations is suggested. This method ensures that only specific preimage sizes are processed, thereby preventing the aforementioned length redistribution attacks.

Further, to accommodate the uncertain nature of future CTV upgradeability without compromising security, an elaborate construction is recommended. This includes a series of duplications, verifications, and conditional checks before finalizing the SHA256 hash. The suggestion also mentions a potential update to the BIP (Bitcoin Improvement Proposal) that could streamline this process by eliminating certain steps if a zero-byte hash results in a CTV error, indicating a more efficient approach to handling such cryptographic operations and maintaining system integrity amidst upgradeability considerations.</summary>
<published>2024-10-28T11:16:51.953000+00:00</published>
</entry>
</feed>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>1</id>
<title>OP_PAIRCOMMIT as a candidate for addition to LNhance</title>
<updated>2024-10-29T02:21:18.163060+00:00</updated>
<author>
<name>moonsettler 2024-10-28 12:05:19.886000+00:00</name>
</author>
<generator uri="https://lkiesow.github.io/python-feedgen" version="0.9.0">python-feedgen</generator>
<entry>
<id>1</id>
<title>OP_PAIRCOMMIT as a candidate for addition to LNhance</title>
<updated>2024-10-29T02:21:18.163096+00:00</updated>
<link href="https://delvingbitcoin.org/t/op-paircommit-as-a-candidate-for-addition-to-lnhance/1216/9" rel="alternate"/>
<summary>In the ongoing discussion surrounding Bitcoin Improvement Proposals (BIPs), the consideration of having a CheckTemplateVerify (CTV) error if the hash is 0 bytes was brought up as a potential method to eliminate the need for the `DUP VERIFY` step. This suggestion has been acknowledged positively, reinforcing the notion that there seems to be no practical justification for allowing a 0 size argument within CTV operations. Such an update could streamline processes by simplifying the verification steps required.

Additionally, attention was drawn to an issue regarding the PC code on a specific branch, which has since been addressed and resolved. For those interested in the technical details or contributing further to this discussion, the corrected code can be reviewed at [this GitHub pull request](https://github.com/lnhance/bitcoin/pull/6). This fix highlights the dynamic and collaborative nature of development within the Bitcoin ecosystem, where community contributions lead to continuous improvements and refinements.

A noteworthy point of discussion also emerged regarding the serialization of `valtype` to `HashWriter` in the Bitcoin codebase, which was mentioned as being unexpectedly complex. This aspect underscores the intricate details developers must navigate when working with or enhancing Bitcoin's underlying technology, showcasing the depth of thought and consideration that goes into each component of its design and implementation.</summary>
<published>2024-10-28T12:05:19.886000+00:00</published>
</entry>
</feed>
30 changes: 30 additions & 0 deletions static/delvingbitcoin/Oct_2024/3432_Libbitcoin-for-Core-people.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>0</id>
<title>Libbitcoin for Core people</title>
<updated>2024-10-29T02:22:16.171018+00:00</updated>
<author>
<name>AntoineP 2024-10-28 19:09:55.723000+00:00</name>
</author>
<generator uri="https://lkiesow.github.io/python-feedgen" version="0.9.0">python-feedgen</generator>
<entry>
<id>0</id>
<title>Libbitcoin for Core people</title>
<updated>2024-10-29T02:22:16.171050+00:00</updated>
<link href="https://delvingbitcoin.org/t/libbitcoin-for-core-people/1222" rel="alternate"/>
<summary>Eric Voskuil recently highlighted a comparison showing Libbitcoin's Initial Block Download (IBD) performance significantly surpassing that of Bitcoin Core, achieving speeds up to 15 times faster when using the `-assumevalid` option. This revelation stems from distinctive operational methodologies between the two systems, particularly in how Libbitcoin orchestrates its processes and database management in contrast to Bitcoin Core. Libbitcoin employs an event-based system that initiates multiple asynchronous tasks through [Boost ASIO](https://www.boost.org/doc/libs/1_86_0/doc/html/boost_asio/overview/core/async.html), a framework facilitating concurrent operations which is pivotal for its enhanced performance.

Libbitcoin’s database structure is conceptually relational, though it allows for abstraction and the use of various backends. This setup entails distinct tables for headers, transactions, transaction inputs, and outputs, alongside indices linking confirmations to headers and transactions to both headers and their spending transactions. Such a design aids in efficiently breaking down block validation into steps necessitating either strict, partial, or no sequencing, thereby optimizing validation checks.

Block validation within Libbitcoin is dissected into tasks with varied sequencing needs. Crucially, blocks are downloaded and initial checks that don't require sequence—like block size or `nLockTime`—are executed immediately. The system concurrently processes transactions, performing script checks and other validations that only need partial ordering. A dedicated thread then verifies the existence and unspent status of inputs across a range of validated blocks, marking transactions as confirmed upon success. This parallel processing of download, validation, and confirmability stages significantly contributes to the platform's expedited IBD capability.

Moreover, Libbitcoin employs strategies similar to Bitcoin Core's `-assumevalid` feature, allowing the omission of certain transaction validations to mitigate potential threats. Reorganization is managed by simply removing transactions from the relevant index, highlighting the system's capacity for straightforward adjustments to blockchain changes. While pruning is technically feasible through deletion of data for spent outputs, it currently remains unimplemented and not a priority, reflecting Eric Voskuil's stance on the feature's importance.

The transaction table in Libbitcoin not only accommodates confirmed transactions but also unconfirmed ones, which can arise from peer announcements or reorganizations. Future implementations will consider minimum fee rates for transactions and their conflict graphs, aligning closely with Bitcoin Core's approach to fee handling. On the networking front, Libbitcoin defaults to connecting with a hundred outbound peers, a number intended to become dynamic post-IBD to optimize resource utilization. Peer selection and retention are based on handshake speed and response rates to block requests, incorporating measures to exclude slow or stalled connections.

Despite these advancements, it's notable that Libbitcoin hasn’t fully implemented DoS protection beyond conceptual rate limiting strategies. Furthermore, comparisons between Core and Libbitcoin must account for Libbitcoin's use of an outdated libsecp version and lack of native SHA256 acceleration, factors that could influence performance benchmarks.

In clarifying terminology, the document distinguishes between terms used similarly by Libbitcoin and Bitcoin Core but with nuanced differences, such as "milestone" versus `-assumevalid`, emphasizing the unique aspects of Libbitcoin’s architecture and operation. This detailed exposition, enriched by Voskuil’s insights, underscores Libbitcoin's innovative approach to blockchain management and its implications for efficiency and scalability within the cryptocurrency domain.</summary>
<published>2024-10-28T19:09:55.723000+00:00</published>
</entry>
</feed>
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,36 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>2</id>
<title>Combined summary - OP_PAIRCOMMIT as a candidate for addition to LNhance</title>
<updated>2024-10-26T02:17:05.109152+00:00</updated>
<updated>2024-10-29T02:21:51.142726+00:00</updated>
<author>
<name>moonsettler 2024-10-25 21:50:45.243000+00:00</name>
<name>moonsettler 2024-10-28 12:05:19.886000+00:00</name>
</author>
<author>
<name>1440000bytes 2024-10-25 19:22:36.211000+00:00</name>
<name>ajtowns 2024-10-28 11:16:51.953000+00:00</name>
</author>
<author>
<name>moonsettler 2024-10-25 19:11:15.643000+00:00</name>
<name>moonsettler . 2024-10-25 21:50:45.243000+00:00</name>
</author>
<author>
<name>moonsettler 2024-10-25 19:06:11.290000+00:00</name>
<name>bytes . 2024-10-25 19:22:36.211000+00:00</name>
</author>
<author>
<name>1440000bytes 2024-10-25 17:57:14.444000+00:00</name>
<name>moonsettler . 2024-10-25 19:11:15.643000+00:00</name>
</author>
<author>
<name>moonsettler 2024-10-25 14:38:37.937000+00:00</name>
<name>moonsettler . 2024-10-25 19:06:11.290000+00:00</name>
</author>
<author>
<name>moonsettler 2024-10-25 14:34:33.286000+00:00</name>
<name>bytes . 2024-10-25 17:57:14.444000+00:00</name>
</author>
<author>
<name>moonsettler . 2024-10-25 14:38:37.937000+00:00</name>
</author>
<author>
<name>moonsettler . 2024-10-25 14:34:33.286000+00:00</name>
</author>
<link href="delvingbitcoin/Oct_2024/3431_OP-PAIRCOMMIT-as-a-candidate-for-addition-to-LNhance.xml" rel="alternate"/>
<link href="delvingbitcoin/Oct_2024/3430_OP-PAIRCOMMIT-as-a-candidate-for-addition-to-LNhance.xml" rel="alternate"/>
<link href="delvingbitcoin/Oct_2024/3409_OP-PAIRCOMMIT-as-a-candidate-for-addition-to-LNhance.xml" rel="alternate"/>
<link href="delvingbitcoin/Oct_2024/3407_OP-PAIRCOMMIT-as-a-candidate-for-addition-to-LNhance.xml" rel="alternate"/>
<link href="delvingbitcoin/Oct_2024/3406_OP-PAIRCOMMIT-as-a-candidate-for-addition-to-LNhance.xml" rel="alternate"/>
Expand All @@ -35,17 +43,17 @@
<entry>
<id>2</id>
<title>Combined summary - OP_PAIRCOMMIT as a candidate for addition to LNhance</title>
<updated>2024-10-26T02:17:05.109214+00:00</updated>
<link href="https://delvingbitcoin.org/t/op-paircommit-as-a-candidate-for-addition-to-lnhance/1216/7" rel="alternate"/>
<summary>The discussion revolves around the intricacies of hashing methodologies within the domain of blockchain, specifically addressing concerns regarding security and efficiency. The original inquiry focuses on whether employing a mini-hashing technique for sizes, as opposed to static padding, enhances the mutability of preimages when redistributing bytes among stack elements. This question is rooted in a desire to improve upon traditional approaches, despite potential resistance stemming from days of development work.
<updated>2024-10-29T02:21:51.142799+00:00</updated>
<link href="https://delvingbitcoin.org/t/op-paircommit-as-a-candidate-for-addition-to-lnhance/1216/9" rel="alternate"/>
<summary>The discussion begins with addressing a potential update to the Bitcoin Improvement Proposal (BIP) concerning CheckTemplateVerify (CTV). It is suggested that having CTV return an error for 0-byte hashes could simplify the verification process by eliminating the need for a `DUP VERIFY` step. This suggestion stems from the observation that there's seldom a legitimate reason to include a 0-size argument for CTV. Additionally, it is mentioned that the PC code on a specific branch was broken, but this issue has since been resolved, as indicated by a link to a pull request on GitHub ([GitHub](https://github.com/lnhance/bitcoin/pull/6)).

A detailed example provided illustrates the conventional method of generating a hash using a combination of vectors and padding, highlighting the use of SHA256 for encryption. This approach is contrasted with more complex or costly alternatives that leverage new opcodes like OP_CAT to achieve similar outcomes but introduce added complexity and potential for delay in implementation proposals.
The conversation shifts to the topic of optimizing SHA256 iterations, particularly within the context of LN-Symmetry, by focusing on reducing the number of hashing cycles needed in specific scenarios. For instance, when considering a situation involving a 7-byte balance commitment plus a 32-byte CTV hash without any HTLCs in flight, resulting in a total preimage size of 55 bytes, it is proposed that this can fit into a single block with the SHA256 length commitment. Concerns are raised about length redistribution attacks due to the concatenation of two preimages, given CTV's design for only 32-byte templates. A couple of hashing techniques are proposed to mitigate these concerns and enhance security, including one that involves using a custom hash function designed to significantly alter the output for minor changes in input, aimed at mitigating stack element resizing attacks.

The conversation segues into the broader implications of these hashing strategies within the Lightning Network (LN) symmetry context. Here, the emphasis is on minimizing the number of SHA256 iterations to optimize performance, particularly for scenarios most common in LN applications. A proposal is outlined where the tagging process can be streamlined, thereby reducing the computational load during validation. Concerns are raised about the potential vulnerability of certain contract structures to length redistribution attacks, which could undermine the integrity of the contract if not properly mitigated.
The email highlights issues surrounding the integration of new opcodes and their impact on project timelines and complexity. There is a debate over prioritizing simplicity in development versus integrating advanced functionalities like those offered by OP_CAT. The discussion leans towards activating OP_CTV before embarking on more complex opcode integrations. This reflects a broader dialogue on development priorities, suggesting a step-by-step approach might be beneficial in the long run.

In response to these challenges, a novel hashing function is proposed, aiming to significantly alter the output with minimal changes in input. This function is part of an effort to enhance security by increasing the variability in the preimage, especially in the face of stack element resizing attacks. The goal is to ensure that any modifications to the input result in a disproportionately large change in the hash output, thereby bolstering the system against specific types of cryptographic attacks.
Moreover, the utilization of Vector Commitments in LN-Symmetry is discussed as a method to enhance security and simplify contract scripting. Employing `OP_PAIRCOMMIT` to commit to a vector of stack elements is presented as an effective strategy against witness malleability, highlighting the importance of secure scripting practices in blockchain contracts. The detailed exploration into preliminary specifications for managing state templates emphasizes the need for accurate and secure scripting practices, showcasing a structured approach to handling contract states and securing interactions on the blockchain.

This ongoing dialogue underscores the dynamic nature of blockchain development, where innovations in hashing techniques and opcode utilization are continually evaluated against the backdrop of security, efficiency, and practicality. The exchange concludes with a call for feedback on the proposed PairCommitHash function, inviting further scrutiny and discussion from the broader programming community. The detailed proposal, including code snippets and technical specifications, can be found at the provided GitHub [link](https://github.com/lnhance/bitcoin/pull/7/files).</summary>
<published>2024-10-25T21:50:45.243000+00:00</published>
Lastly, an optimization technique for SHA256 iterations in LN-Symmetry is outlined, focusing on pre-computing the Tag as a mid-state to reduce validation processes. This technique aims to address concerns related to length redistribution attacks and proposes a solution involving the alteration of expected bit changes in the preimage for enhanced security. A link to a GitHub pull request is provided, offering insights into proposed technical adjustments to improve efficiency and security in the context of LN-Symmetry with CTV.</summary>
<published>2024-10-28T12:05:19.886000+00:00</published>
</entry>
</feed>

0 comments on commit 8a7d0d5

Please sign in to comment.