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

OpenBrush Third Grant(follow up 2) #921

Merged
merged 4 commits into from
May 30, 2022
Merged

Conversation

TtomaS7
Copy link
Contributor

@TtomaS7 TtomaS7 commented Apr 29, 2022

Preview

Project Abstract

Overview

The mission of this project is to make ink! usable and facilitate WASM ecosystem adoption.

To be successful with this mission, we have outlined several steps that would need to be taken.

  1. OpenBrush is a library for secure smart contract development on ink!, same as
    OpenZeppelin on Ethereum.
  2. OpenBrush should serve as a starting point for every developer entering a Polkadot(ink!) ecosystem.
  3. In addition to having a standard implementation, Openbrush should also have macroses to simplify and abstract up applications(smart contracts) development.
  4. For Openbrush to fulfill its purpose, several changes must be made & several blockers to be overcome in ink! and in Substrate's pallet-contracts. We are committed to doing that in the context of this project.

This project is important to us as it's our strategic goal to accelerate Polkadot ecosystem development. Applications on Ink! are a considerable part of it.

It is an application for a follow-up 2 grant. The initial grant covered the first and second milestones:

The second grant covered the 3-5 milestones:

For which grant level are you applying?

  • Level 3: Unlimited, 5 approvals (for > $100k Web3 Foundation Council approval)

Application Checklist

  • The application template has been copied, renamed ( project_name.md) and updated.
  • A BTC or Ethereum (DAI/USDT) address for the payment of the milestones is provided inside the application.
  • I have read and acknowledged the terms and conditions.
  • 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.

How Did You Hear About our grants program?

  • Personal Recommendation
  • Substrate Builders Program
  • Other: Supercolony applied for the two Grants before

@TtomaS7 TtomaS7 changed the title Follow up 2 Grant for OpenBrush with 6-9 milestones Grant 3 OpenBrush(follow up 2) Apr 29, 2022
@TtomaS7 TtomaS7 changed the title Grant 3 OpenBrush(follow up 2) OpenBrush Third Grant(follow up 2) Apr 29, 2022
@semuelle
Copy link
Member

Hi @TtomaS7, thank you for your application. Good to see SuperColony being busy. We will take a look at your application as soon as possible, we just have a bit of a backlog currently, so it might take a few days.

@TtomaS7
Copy link
Contributor Author

TtomaS7 commented Apr 29, 2022

Thanks!
I`m waiting for your review.

@semuelle semuelle self-assigned this May 9, 2022
@semuelle
Copy link
Member

semuelle commented May 9, 2022

Sorry for the wait, @TtomaS7. I just check your application, and it generally looks good. The only issue I have, for now, is that the total FTE for milestones 6-9, according to my calculations, is 2.63, not 3. Can you verify?

@athei
Copy link

athei commented May 9, 2022

cc @cmichi @ascjones @HCastano

@xgreenx
Copy link
Contributor

xgreenx commented May 9, 2022

Sorry for the wait, @TtomaS7. I just check your application, and it generally looks good. The only issue I have, for now, is that the total FTE for milestones 6-9, according to my calculations, is 2.63, not 3. Can you verify?

Yea, we didn't know that value we need to use. Average of 4 milestones = 2.63 or maximum among all milestones = 3. We selected maximum=)

@semuelle semuelle added the ready for review The project is ready to be reviewed by the committee members. label May 9, 2022
Copy link

@athei athei left a comment

Choose a reason for hiding this comment

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

I see that you are planning multiple chain extensions. I think we need a way to compose them at the substrate and ink! level. Otherwise it would be quite bothersome so support more than one of them in one chain.

Comment on lines 276 to 278
| 1. | Implement `delegate_call` in contract-pallet | The ethereum has a [`delegatecall`](https://docs.soliditylang.org/en/v0.8.10/introduction-to-smart-contracts.html#delegatecall-callcode-and-libraries) function that helps to achieve upgradable functionality in contracts. We will add the support of that function into the `contract-pallet`. With that function the OpenBurhs will provide the implementation fo `Proxy` and `Diamond` patterns. |
| 2. | Implement `set_code_hash` in contract-pallet | The usage of `Proxy` pattern adds overhead during each execution of the contract. It increase the cost of execution, and size of the proof of verification. Instead of `delegate_call` the `contract-pallet` can provide a separate function to change the source code fo the contract. It simplifies the flow and allow to easy upgrade the contract in the future. |
| 3. | Import `delegate_call`, `set_code_hash` in ink! and update `Proxy` example | Support of `delegate_call`, `set_code_hash` on ink! level and providing a user-friendly abstraction. The ink! already provides an abstraction for cross-contract communication, we will extend it to support `delegate_call`. |
Copy link

Choose a reason for hiding this comment

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

Aren't those steps already done?

Copy link
Contributor

@xgreenx xgreenx May 12, 2022

Choose a reason for hiding this comment

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

Yes, it was done.

We created milestones 6-8 several months ago, and we've started work on the 6th milestone before publishing the Grant for it.
We couldn't post it because the 4th milestone was not finished(we waited for the finalization of the PSPs). We've started work on the 5th milestone, but it depends on ink! team and we waited for feedback. At the same time, we started to participate in the Substrate Builders Program, where we represented milestones 6-8. We agreed that the Supercolony would not take money for the SBP, and we can apply with the same milestones for the Grant.

So we started work on it when:

  • The milestone four was almost done we only waited for the finalization of PSPs.
  • Part of milestone five was done, but it required feedback from ink! team.
  • Milestone six is part of the SBP, but funds from the Grant that is not published.

We discussed this with the SBP team and they said that it is okay if a small part of the tasks will be ready in the grant.

We planned to publish it soon, but after:

  • We got more feedback and changed the PSP, it took more time for finalization.
  • We changed the scope of milestone 5 because refactoring of the storage is more critical and also affects part of milestone 6(it was not clear what the scope is).

All that created delays to post the Grant 3. And it is why part of the tasks already are ready=)

@xgreenx
Copy link
Contributor

xgreenx commented May 12, 2022

I see that you are planning multiple chain extensions. I think we need a way to compose them at the substrate and ink! level. Otherwise it would be quite bothersome so support more than one of them in one chain.

Yea, we had the same thoughts. Right now ink! supports only one ChainExtension on the codegen level. It is why we created it manually without codegen. But we have some ideas on how we can improve it and we plan to discuss it in the issue in ink! repository=)

On substrate-level we planned to use a simple model like:

match func_id {
      // Instead of 0x1 it will be actual selectors of methods. It is only for example here.
      0x1 | 0x2 | 0x3 ... | 0xF => PalletAssetExtension::process(func_id),
      0x11 | 0x12 | 0x13 ... | 0x1F => PalletUniquiesExtension::process(func_id),
      0x21 | 0x22 | 0x23 ... | 0x2F => SomePalletExtension::process(func_id),
}

If someone wants to add support for another extension, it is a separate block in match. But we can think how to better do that.

athei
athei previously approved these changes May 18, 2022
cmichi
cmichi previously approved these changes May 18, 2022
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. I have just one question. The price per dev per week has almost doubled compared to your previous applications. Why is this the case and would you be willing to reduce the price?

@Noc2
Copy link
Collaborator

Noc2 commented May 18, 2022

And keep in mind it’s usually easier/faster to get the grant accepted, in case we don’t need the additional approval from the web3 council (below 100k).

@TtomaS7
Copy link
Contributor Author

TtomaS7 commented May 18, 2022

Thanks for the application. I have just one question. The price per dev per week has almost doubled compared to your previous applications. Why is this the case and would you be willing to reduce the price?

Hello!
The price per hour was approximately 50$ in previous grant/milestones.

Formula per hour rate = Milestone Price / weeks / 5 days per week / 8 hours per day / people assigned

Milestone 1: 10000/2/5/8/2.5 = 50
Milestone 2: 35000/7/5/8/2.5 = 50
Milestone 3: 12000/4/5/8/1.5 = 50
Milestone 4: 22500/4.5/5/8/2.5 = 50
Milestone 5: 15000/4/5/8/2 = 47

We assigned more senior people for OpenBrush (the experience has been showed us that we underestimated our work) and I as Product Owner started to work on OpenBrush a lot from Marketing and promotion side - we have mentioned it on our Proposal. This is why the rate was increased to 75$ per hour.

Milestone 6: 54000/6/5/8/3 = 75
Milestone 7: 52500/7/5/8/2.5 = 75
Milestone 8: 45000/6/5/8/2.5 = 75
Milestone 9: 30000/4/5/8/2.5 = 75

And keep in mind it’s usually easier/faster to get the grant accepted, in case we don’t need the additional approval from the web3 council (below 100k).

We definitely understand that. We could split it into 6-7 and 8-9, but we don't want to create again a situation where we started working on the following Grant when we didn't deliver the previous one. We decided to make a big one for the next six months to avoid that.

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 additional information and fast reply. A 50% increase is quite a lot. Could you reduce the price a little bit? My personal suggestion would also be to initially apply for milestone 6 and 7 via grants for less than 100k. But that’s up to you.

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.

Btw. it seems “set_code_hash” is already implemented use-ink/ink#1203 Is willser part of your team and could you comment on this? Also are their other parts that are already implemented?

@TtomaS7
Copy link
Contributor Author

TtomaS7 commented May 20, 2022

Thanks for the additional information and fast reply. A 50% increase is quite a lot. Could you reduce the price a little bit?

The developers' salary on the market grows, and based on the previous milestones, we always underestimate the expenses. Both influenced the rate per hour.

My personal suggestion would also be to initially apply for milestone 6 and 7 via grants for less than 100k. But that’s up to you.

Can we apply for Grant 4 with milestones 8 and 9 after the delivery of milestone 6?

@TtomaS7
Copy link
Contributor Author

TtomaS7 commented May 20, 2022

Btw. it seems “set_code_hash” is already implemented use-ink/ink#1203 Is willser part of your team and could you comment on this? Also are their other parts that are already implemented?

willser is not part of the team. Someone implemented the set_code_hash before us=)

As mentioned in that comment:

We didn't exclude set_code_hash from point 3 because we want the exact description of milestone six as in SBP.

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 detailed reply. In this case, please remove set_code_hash and any related amount of work. Otherwise we would essentially pay you for work done by somebody else. For me it would be fine if you already apply for the next grant after the delivery of milestone 6.

@xgreenx xgreenx dismissed stale reviews from cmichi and athei via ca672c4 May 23, 2022 08:49
@xgreenx
Copy link
Contributor

xgreenx commented May 23, 2022

Thanks for the detailed reply. In this case, please remove set_code_hash and any related amount of work. Otherwise we would essentially pay you for work done by somebody else. For me it would be fine if you already apply for the next grant after the delivery of milestone 6.

We split the grant into 6-7 and 8-9 milestones and reduced the rate to fit the < 100 000 requirement.
Removed the set_code_hash from 6.3.

Noc2
Noc2 previously approved these changes May 23, 2022
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 update. I’m happy to go ahead with it.

SBalaguer
SBalaguer previously approved these changes May 23, 2022
@TtomaS7
Copy link
Contributor Author

TtomaS7 commented May 23, 2022

So do we need Web3F council members on our pitch call, then?

@semuelle
Copy link
Member

So do we need Web3F council members on our pitch call, then?

The pitch call is with the grants committee. The council reviews the application separately.

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.

LGTM. Just one request: we fund documentation of projects (articles, docs, videos, etc.), but we specifically don't fund marketing. I'd suggest removing the SEO deliverable and renaming/rephrasing the other "Marketing" deliverables.

@TtomaS7 TtomaS7 dismissed stale reviews from SBalaguer and Noc2 via d7f13e6 May 23, 2022 15:42
@TtomaS7
Copy link
Contributor Author

TtomaS7 commented May 23, 2022

The pitch call is with the grants committee. The council reviews the application separately.

Good, so we don’t need all the participants on our pitch call.

LGTM. Just one request: we fund documentation of projects (articles, docs, videos, etc.), but we specifically don't fund marketing. I'd suggest removing the SEO deliverable and renaming/rephrasing the other "Marketing" deliverables.

Okay, I've removed SEO optimization part

@Noc2 Noc2 requested a review from SBalaguer May 24, 2022 13:37
Copy link
Contributor

@hakan-w3f hakan-w3f left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@Noc2 Noc2 merged commit af7907e into w3f:master May 30, 2022
@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 grantsPR@web3.foundation 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! 🚀

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.

9 participants