Skip to content
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

Tuxedo Parachain Support #1932

Merged
merged 3 commits into from
Sep 11, 2023

Conversation

JoshOrndorff
Copy link
Contributor

@JoshOrndorff JoshOrndorff commented Aug 25, 2023

Project Abstract

In a previous grant (PR) we developed Tuxedo, a framework for writing Substrate runtimes in the UTXO model.

In this grant, we propose to implement the common infrastructure necessary for a Tuxedo runtime to work as a Polkadot Parachain.

Grant level

  • Level 1: Up to $10,000, 2 approvals
  • Level 2: Up to $30,000, 3 approvals
  • Level 3: Unlimited, 5 approvals (for >$100k: Web3 Foundation Council approval)

Application Checklist

  • The application template has been copied and aptly renamed (tuxedo_parachain.md).
  • I have read the application guidelines.
  • Payment details have been provided (bank details via email or BTC, Ethereum (USDC/DAI) or Polkadot/Kusama (USDT) address in the application).
  • The software delivered for this grant will be released under an open-source license specified in the application.
  • The initial PR contains only one commit (squash and force-push if needed).
  • The grant will only be announced once the first milestone has been accepted (see the announcement guidelines).
  • I prefer the discussion of this application to take place in a private Element/Matrix channel. My username is: @_______:matrix.org (change the homeserver if you use a different one)

cc @coax1d @Lederstrumpf

@github-actions
Copy link
Contributor

github-actions bot commented Aug 25, 2023

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@JoshOrndorff
Copy link
Contributor Author

I have read and hereby sign the Contributor License Agreement.

@semuelle
Copy link
Member

Thanks for the application, @JoshOrndorff. Exciting to see Tuxedo moving forward. We will look into it as soon as possible!

Noc2
Noc2 previously approved these changes Aug 29, 2023
Copy link
Collaborator

@Noc2 Noc2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the application, and I'm sorry for the delay here. I'm generally happy to go ahead with it, and it's nice to see that you want to leverage farcaster by @Lederstrumpf in the future, who used to work for the Web3 Grants program. Regarding milestone 3, are you planning to use Polkadot sTPS?

@Noc2 Noc2 added the ready for review The project is ready to be reviewed by the committee members. label Aug 29, 2023
@JoshOrndorff
Copy link
Contributor Author

I hadn't encountered Polkadot sTPS before. Thanks for the tip. I will plan to use it as much as I can. I guess I will need to make at least some modifications to support UTXO transactions, and if so, I'd be happy to do that.

laboon
laboon previously approved these changes Sep 1, 2023
Copy link
Collaborator

@takahser takahser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JoshOrndorff very interesting, I'm glad to see Tuxedo being developed and extended! Would it also be possible to extend FRAME rather than coming up with a separate framework, or is that technically not feasible? Also, what are the consequences for existing FRAME pallets; would they (or at least some) be compatible with the Tuxedo framework or would new implementations need to be written for all of them?

applications/tuxedo_parachain.md Outdated Show resolved Hide resolved
applications/tuxedo_parachain.md Outdated Show resolved Hide resolved
applications/tuxedo_parachain.md Outdated Show resolved Hide resolved
applications/tuxedo_parachain.md Show resolved Hide resolved
applications/tuxedo_parachain.md Outdated Show resolved Hide resolved
applications/tuxedo_parachain.md Outdated Show resolved Hide resolved
nikw3f
nikw3f previously approved these changes Sep 11, 2023
@JoshOrndorff JoshOrndorff dismissed stale reviews from nikw3f, laboon, and Noc2 via 9db8b6b September 11, 2023 12:19
Admittedly, naming all the pallets to start with pallet does not read that smoothly.
@JoshOrndorff
Copy link
Contributor Author

Thanks for the detailed review @takahser. I believe I've made all the changes you requested and now I'll do my best to answer your questions.

Would it also be possible to extend FRAME rather than coming up with a separate framework, or is that technically not feasible?

If you mean extending FRAME to work as a parachain, which is the topic of this grant, then yes, FRAME can be extended in this way and already has been. That is in cumulus and is the work I mentioned redesigning for UTXOs in this grant.

If you mean extending FRAME to support UTXOs, a question more related to our previous grant, the answer is that doing so would not be good architecture. Accounts and UTXOs are two significantly different models, with different trade offs and cobbling them together gives you the worst of both worlds in many ways. It is technically possible to do so. For example, the old UTXO workshop is basically a UTXO cryptocurrency jammed into a frame pallet. But having a separate framework for each model allows each model to do what it is best at without being hindered by the other.

It would also be possible to write an adapter in the opposite direction (pallet jammed into a tuxedo) which brings me to your next question.

Also, what are the consequences for existing FRAME pallets; would they (or at least some) be compatible with the Tuxedo framework or would new implementations need to be written for all of them?

Simply put, pallets work with FRAME, and pieces work with Tuxedo, and they don't cross. If you want some logic that exists in a FRAME pallet to exist in a UTXO runtime, the most correct thing to do is to port the logic to a Tuxedo piece. Certainly this will happen for the most important bits of on-chain logic. For example, we already have an equivalent of pallet balances and pallet system from the previous grant and we are now proposing the pallet parachain system as well.

For some pallets, the logic will not translate well, and that is likely a sign that your logic is better suited for the accounts model. For example, uniswap style AMMs are not well suited for the UTXO model and should not be ported without significant redesign and consideration. OTOH, order book DEXes are perfect for the UTXO model, but not for the account model. This is why it is important for the Polkadot ecosystem to be able to express both accounts and UTXOs.

Finally, I'll mention the idea of an adapter. It would be possible to make a tuxedo piece that is a wrapper around any FRAME pallet. The pallet would have a little mini account based storage right there inside a single UTXO. This would be an fun and educational academic exercise, but is not a practical way to build an ecosystem. It would be the worst of both worlds again.

Thanks again for you detailed review, and I look forward to your reply and, hopefully, getting started on this grant 🙏

Copy link
Collaborator

@takahser takahser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JoshOrndorff thanks for the updates and the detailed reply. I'm happy to approve as well.

Copy link
Member

@semuelle semuelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to support this!

@semuelle semuelle merged commit 102b176 into w3f:master Sep 11, 2023
@github-actions
Copy link
Contributor

Congratulations and welcome to the Web3 Foundation Grants Program! Please refer to our Milestone Delivery repository for instructions on how to submit milestones and invoices, our FAQ for frequently asked questions and the support section of our README for more ways to find answers to your questions.

Before you start, take a moment to read through our announcement guidelines for all communications related to the grant or make them known to the right person in your organisation. In particular, please don't announce the grant publicly before at least the first milestone of your project has been approved. At that point or shortly before, you can get in touch with us at [email protected] and we'll be happy to collaborate on an announcement about the work you’re doing.

Lastly, please remember to let us know in case you run into any delays or deviate from the deliverables in your application. You can either leave a comment here or directly request to amend your application via PR. We wish you luck with your project! 🚀

@JoshOrndorff
Copy link
Contributor Author

JoshOrndorff commented Oct 27, 2023

Hi there 👋

I wanted to check in with an update on progress, timeline, and even a bit of family life because I am now 1 week past my estimate for when I would submit milestone 1.

The great news is that, just today, I achieved a first working PoC for the Tuxedo parachain! I'm very excited! Details in Off-Narrative-Labs/Tuxedo#130
Screenshot: Logs of Tuxedo collator authoring and including valid parachain blocks

Of course there are still lots of hacks to be cleaned up and more tests and docs to write. So I'm not ready to submit yet, but I am feeling quite positive about this, and confident the submission will come shortly.

The other good news (for me, although perhaps more neutral for the grant progress) is that my daughter is most likely going to be born in the next week, so my attention to Tuxedo will be limited for a little while.

My proposal, if it's okay with the grants team, is that we allow the first milestone to slip by 3 weeks which would put it ~ November 15th. I do not foresee needing extra time for milestones 2 or 3, so they would just move back correspondingly by the same three weeks.

I hope this slightly modified timeline sounds agreeable 🙏

@takahser
Copy link
Collaborator

@JoshOrndorff thanks for the update. Yes, that works. Happy to hear about your fam growing, I trust everything will go smooth with the birth of your daughter, all the best! Thanks for the update, we look forward to the delivery.

@keeganquigley
Copy link
Contributor

Hi @JoshOrndorff how is milestone 2 coming along?

@JoshOrndorff
Copy link
Contributor Author

Thanks for asking. The truth is I've been working on family things and PBA a lot. And the time I've spent on Tuxedo are in support of teams trying to build with it.

I'll prioritize the milestone this week and I may be able to submit by Friday.

@keeganquigley
Copy link
Contributor

Great thanks for the update @JoshOrndorff we just want to make sure it is still being worked on :)

@keeganquigley
Copy link
Contributor

Hi @JoshOrndorff are you able to provide an update on the delivery of milestone 2?

@JoshOrndorff
Copy link
Contributor Author

Okay, I'm happy to say I've finally submitted milestone 2: w3f/Grant-Milestone-Delivery#1167

Looking forward to your review, and thanks for your patience.

@keeganquigley
Copy link
Contributor

Hi @JoshOrndorff hope you're having a good summer. Are you still planning to submit milestone 3 at some point?

@keeganquigley
Copy link
Contributor

pinging @JoshOrndorff

@JoshOrndorff
Copy link
Contributor Author

JoshOrndorff commented Aug 18, 2024

@keeganquigley I think it is best to cancel milestone three for two main reasons.

First is that I got too burnt out on Polkadot and Substrate stuff after the last PBA and I don't have the motivation to work on this right now. I wish it weren't like that but I'd rather be honest about it.

Second is that when I, or someone else, does feel motivated to work on Tuxedo, I think there are higher priorities than benchmarking (the topic of this third milestone).

Specifically, I think that FRAME pallet that wraps an entire Tuxedo runtime would be very useful to let people try Tuxedo in the existing frame-dominant landscape without making the huge commitment of abandoning FRAME because Tuxedo might be better in some ways.

This idea was inspired by @takahser in the comments above. While I initially didn't think it was a very good idea (and my criticisms are still valid) I now believe that this lower entry barrier is worth the performance tradeoff.

Thanks for your patience as I worked through the first two milestones and figured out that now is not the right time for me to be working on this. I really appreciate the support you have given me in exploring UTXOs on Substrate.

@keeganquigley
Copy link
Contributor

Thanks @JoshOrndorff for the update, sounds good we will go ahead and close it for now; we can always look at opening it again in the future if/when you should choose to work on it again. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review The project is ready to be reviewed by the committee members.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants