You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"body": "Hmm. I think greater is correct, unless I'm confused? `[2, 5)` is not a valid subtree because it makes this tree:\r\n\r\n```\r\n /\\\r\n /\\ |\r\n2 3 4\r\n```\r\n\r\nBut then `[0, 5)` looks like this, which doesn't contain that tree:\r\n\r\n```\r\n /\\\r\n / \\\r\n /\\ |\r\n / \\ |\r\n /\\ /\\ |\r\n0 1 2 3 4\r\n```\r\n\r\nSo if the subtree has size 3, we need start to be 4-aligned, not just 2-aligned.\r\n\r\nBut in that case \"largest power of 2\" should be \"smallest power of 2\".",
6560
+
"createdAt": "2025-08-11T23:51:58Z",
6561
+
"updatedAt": "2025-08-11T23:51:58Z"
6562
+
}
6563
+
]
6564
+
},
6565
+
{
6566
+
"id": "PRR_kwDOJIBkVc65QnuS",
6567
+
"commit": {
6568
+
"abbreviatedOid": "407db51"
6569
+
},
6570
+
"author": "lukevalenta",
6571
+
"authorAssociation": "CONTRIBUTOR",
6572
+
"state": "COMMENTED",
6573
+
"body": "",
6574
+
"createdAt": "2025-08-12T00:31:10Z",
6575
+
"updatedAt": "2025-08-12T00:31:10Z",
6576
+
"comments": [
6577
+
{
6578
+
"originalPosition": 5,
6579
+
"body": "Ah yes, you're right--thanks for the catch and the counterexample! I agree the correct version is \"If `k` is the smallest power of 2 that is greater than or equal to `end - start`, `start` must be a multiple of `k`\", since for any size subtree we want the start index to be aligned with the next-greatest power of two.\r\n\r\nI got confused since [RFC9162](https://datatracker.ietf.org/doc/html/rfc9162#section-2.1.1) and [the subtree consistency proof section](https://www.ietf.org/archive/id/draft-davidben-tls-merkle-tree-certs-06.html#section-4.3.1) say \"let k be the largest power of two smaller than n\", but we're dealing with a different `k` here--that `k` is for a split index, but the `k` here is a restriction on the subtree start index. Maybe we pick a new letter like `s` for \"start\"?",
0 commit comments