-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
v0.11 fixes #111
base: v0.11
Are you sure you want to change the base?
v0.11 fixes #111
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept and approach ACK.
Left few comments and thoughts
|
||
@mnemonic(chicago-europe-phantom) | ||
data ExplicitSealTxid : txid Bitcoin.Txid, vout Bitcoin.Vout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This type becomes strictly equal to Outpoint
. I do not think we need it anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we do need it because ExplicitSeal
can be ExplicitSeal<Txid>
or ExplicitSeal<TxPtr>
. Or do you think we could drop the generic from ExplicitSeal
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can drop generic form and just implement the trait we need (something like TxoSeal
... there were some traits for explicit seals) and have ExplicitSeal<TxPtr>
renamed into GraphSeal
(which is a type alias to it anyway, so we do not need both) - and ExplicitSeal<Txid>
(with its alias GenesisSeal
) removed, and Outpoint
uses instead of them.
We can make things even more simple: in v0.12 I got rid of TxPtr
taking convention that Txid
of zeros means witness output-based seal. This reduces a lot of code here, at no risk cost (from my experience, each time you have an enum in core, add 1000 lines at least where you deal with it's match
es....)
So, if you follow v0.12 approach, you will end up with having just Outpoint
as a seal definition - and that's it.
(To be fully frank, in v0.12 we do have just one seal type, TxoSeal
, but not Outpoint
, since there we support failback seal definition. Not sure we need that in v0.11, which is temporary anyway).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here I can say the same I said in RGB-WG/rgb-core#285 (comment): since this is just refactor I'll do this in another set of PRs after these ones are ACKed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am taking my suggestion back: single type of seals doesn't work and I had to differentiate two seal types it in v0.12: #112
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v0.11 #111 +/- ##
=======================================
- Coverage 42.1% 41.2% -0.9%
=======================================
Files 35 34 -1
Lines 3521 3428 -93
=======================================
- Hits 1483 1414 -69
+ Misses 2038 2014 -24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Seal unification is still pending in this PR, or you like to do a separate one with unification? |
There is no commit for seal unification in this PR because when we did "make contract commit to a close method" we already removed the close method from the seal. |
Seal unification still requires implementation of DBC verification which should happen in BP DBC crate. You also need to introduce a unified proof type. Pls check how I did that in |
DBC verification was already and still is in BP DBC crate. |
Well, without seal unification in DBC you just have a broken anchor type system with two different anchors, and you do not use rust compile-time guarantees for the consensus security. Basically, this is not a completed seal unification. |
This PR is part of a v0.11 fixes epic, see RGB-WG/rgb-tests#30 for an overview.