-
Notifications
You must be signed in to change notification settings - Fork 572
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
asset-security -> staging #4250
Conversation
Can we pick the activation date and then merge to staging? I know currently the sequence is safe, but it does not feel 100% right to have this placeholder value in staging, because if we need to do a release from the staging before the date is updated, that code will be released. I know the consequence is just user need to update to latest version before hard fork, which they need to do it anyway, but it still does not feel right to release a version with placeholder value, especially we can easily avoid it. On the other note, I think this feature should be tested e2e before merging to staging, not testing it while on staging just in case there is a release from staging before we can confidently release it. Is there any concern having it on the feature branch developing and testing it? |
If there's a concern over using dummy placehoders, then we can use a special purpose value. Example: change the type of the activation sequence from
Making small and frequent commits to a shared branch ( This approach comes with the price that sometimes the main development branch ( That's just my opinion though—happy to hear a different opinion on this topic. |
16528fb
to
bda161c
Compare
I agree with what you said about agile development, for most of change I would def go for merging small changes. However, with asset secuirity, since it contains the consensus changes and affects all stacks of our code base, I would not recommend we go with the agile flow to the staging branch. We have been always doing the feature branch for big features that involves rust side changes or consensus changes, previously @mat-if also did it for assets and blstrs. Additionally, we have the standalone wallet team that likely to do release from staging for their feature release or hot fix, it's better to not merge this feature in staging for now. |
It's important context to this discussion to consider why multi-asset was a long-lived feature branch. blstrs was not really a feature branch in the same sense. It was really just a regular PR. Multi-asset was a huge, sweeping change from the CLI down to the circuits and parameters. We had no concept of sequence activating consensus parameters because it was pre-mainnet and we did not care to support such a case when we'd just revert any logic built around that when we launched mainnet. These changes are mostly just around supporting V2 transactions in the code base properly. A good portion of the changes required for this project are already out in versions 1.7, 1.8 and 1.9. This branch mostly existed because there was a set of changes that needed to happen to properly support the transaction versioning that couldn't merge piece-by-piece. The alternative was a very large, un-reviewable PR. |
@mat-if I thnk essentially we are talking about the same plan, having this asset-security branch for changes that can not merge to staging one by one. Correct me if I am wrong, my understanding is when this branch is ready to merge to staging. It also means asset security is almost code complete. At that point, we can confidently pick a block sequence as activation date. All I am suggesting is have this sequence number right before merging to staging. I dont think it will cause huge delay or any additional merging conflicts. I was trying to explain to @andreacorbellini its common to have a feature branch for features that touches all code base and working against this feature branch instead of staging. Specifically, I am responding to this
Andrea feel free to add more details if you are not mean to oppose the feature branch. From the message, my understanding is you dont like having this feature branch. |
Yes, I'd like this feature branch to be merged in staging as soon as possible. We're spending too much time rebasing and resolving conflicts, especially because there's another major project (standalone wallet) which touches some code that is shared with assets security. A final block sequence won't be decided any time soon ("soon" == "by the end of this week"), which means that if we don't merge this, we will have to keep rebasing and resolving conflicts next week too, even though the work is in theory complete. |
Add logic for the miners fee transactions to create the correct version mining manager only accepts transactions into blocks with the correct version for the given sequence add v2 support to RawTransaction (#4234) * add v2 support to RawTransaction * add error if transferOwnershipTo exists on a v1 transaction check the transaction version when adding blocks This no longer checks the version when transactions are broadcast. This is because there isn't an easy way to verify any particular version is correct. A transaction could become valid due to a re-org or a consensus parameter activating at a specific block sequence. set devnet activation to 1 fixtures use an optimistic transaction version when creating transactions (#4237) * use an optimistic transaction version when creating transactions This allows for transactions created around the time that a transaction version change to have an improved chance of being included in the blockchain by choosing the version if its within a range near the current head sequence instead of simply choosing the transaction version based on head sequence + 1 * clarify `versionSequenceDelta` - Now takes `number` instead of `number | undefined` for a parameter - Adds an assert to ensure a non-negative integer - Add more comments + clarify existing - Updated tests - Increased the min delta to 4, since 3 is probably too small to ensure transactions aren't dead on arrival remove hardcoded transaction version const (#4240) * remove hardcoded transaction version const * add `TransactionVersion::latest()` mempool removes transactions with versions that should no longer be valid (#4249)
5a6b229
to
44fc998
Compare
Summary
This is the PR to merge all the asset-security changes into staging. Every PR into the asset-security branch was code-reviewed already, but this gives a nice opportunity to see it all together.
A few remaining tasks remain around the RPC, CLI and APIs, and updating the DBs, but this PR contains all the code necessary to handle v2 transactions and the hardfork transition from v1 to v2
Testing Plan
Unit tests
Manual testing
Documentation
Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference)? If yes, link a
related documentation pull request for the website.
Breaking Change
Is this a breaking change? If yes, add notes below on why this is breaking and
what additional work is required, if any.
This lays the foundation to enable a consensus parameter for v2 transactions and asset ownership transfers. Will need to document all the breaking changes collectively in an easy to digest format for other developers in the ecosystem