-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LocalChain changes should be monotone #1005
Labels
Milestone
Comments
7 tasks
evanlinjin
added a commit
to evanlinjin/bdk
that referenced
this issue
Jul 8, 2023
This logic should carry over better when we change `LocalChain` to be monotone (bitcoindevkit#1005).
evanlinjin
added a commit
to evanlinjin/bdk
that referenced
this issue
Jul 8, 2023
This logic should carry over better when we change `LocalChain` to be monotone (bitcoindevkit#1005).
evanlinjin
added a commit
to evanlinjin/bdk
that referenced
this issue
Jul 10, 2023
This logic should carry over better when we change `LocalChain` to be monotone (bitcoindevkit#1005).
evanlinjin
added a commit
to evanlinjin/bdk
that referenced
this issue
Jul 10, 2023
This logic should carry over better when we change `LocalChain` to be monotone (bitcoindevkit#1005).
evanlinjin
added a commit
to evanlinjin/bdk
that referenced
this issue
Jul 19, 2023
This logic should carry over better when we change `LocalChain` to be monotone (bitcoindevkit#1005).
Discussed in dev call today and this will be addressed after the alpha milestone since it can be done without affecting the |
This I think shouldn't be done in beta but rather 2.0.0. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After #937 all changsets are monotone except for
LocalChain
. After #1002 it becomes much easier to makeLocalChain
monotone too. The reason you want this is so that changesets can be applied in any order. Without this the user's application has to make sure each changeset is applied to the persistence baclkend in order and so should lock the backend and the chain until it has successfully written to disk.The approach to doing this is simple: Make it possible to insert chain data that does not necessarily connect to the existing chain when applying a changeset. Rather just make sense of each fact provided by a changeset i.e. "at this height there existed a block with this hash which was a child of a block at this height with this hash" etc. This allows
LocalChain
to keep track of multiple chains and have multiple tips. it only needs to index by height the longest one (with tiebreak by blockhash -- verify this claim with respect to consensus rules I think you will find this is a good enough approximation).This doesn't need to be done before
1.0-alpha.1
but should be done before1.0
The text was updated successfully, but these errors were encountered: