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

analyzing smart contract cost and efficiency #711

Merged
merged 12 commits into from
Jul 18, 2024

Conversation

Myestery
Copy link
Contributor

@Myestery Myestery commented Jun 21, 2024

@briwylde08

Bounty submission for #609
fix #609

@Myestery
Copy link
Contributor Author

@briwylde08
This is ready for review

@briwylde08
Copy link
Contributor

Thank you for your contribution! We will review and get back to you. I did allocate three weeks to our reviewers and there's a lot to review so apologies in advance if there are any delays!

@briwylde08 briwylde08 requested review from Julian-dev28 and Shaptic and removed request for Julian-dev28 June 21, 2024 15:43
Copy link
Contributor

@Shaptic Shaptic left a comment

Choose a reason for hiding this comment

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

Hi @Myestery! Thank you for your contribution. I think this could use a lot more information on specific techniques and examples for us to consider it for the documentation. While you do touch on some topics, it would be great to have deeper dives on optimization techniques. For example, you could start with a complicated, expensive contract that is unoptimized, then go step by step on various ways on how you can save on instruction or storage costs (e.g. combining steps in a loop, different storage mechanisms, events over storage, etc.). You already do this a bit, but the complex_transfer and simple_transfer are accomplishing fundamentally different things; it'd be better if they accomplished the same thing, but one was much cheaper than the other.

@Myestery
Copy link
Contributor Author

@Shaptic I have added more context, examples and deep dive to the documentation
Please Re-review

@Myestery Myestery requested a review from Shaptic June 28, 2024 10:25
@Myestery
Copy link
Contributor Author

Hello @briwylde08 @Shaptic
This is ready for merge

@briwylde08
Copy link
Contributor

Sorry for the delay on this one @Myestery! We are working on getting it re-reviewed after your edits. Thank you for your patience! 🙏

Copy link
Contributor

@Shaptic Shaptic left a comment

Choose a reason for hiding this comment

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

This is coming along nicely, but there's still some room for improvement for this to be maximally useful for readers. I added a few comments below! Feel free to tag me again when they're resolved.

@Myestery
Copy link
Contributor Author

Hello @Shaptic
I have modified the docs following your comments.
I took out some parts that were irrelevant too

Ready for your Review

@Myestery
Copy link
Contributor Author

Hello @Shaptic
This is ready for another review

@Shaptic
Copy link
Contributor

Shaptic commented Jul 15, 2024

@Myestery this is looking really good at first glance, I'll do a final review first thing tomorrow!

@Myestery Myestery requested a review from Shaptic July 17, 2024 19:11
Copy link
Contributor

@Shaptic Shaptic 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 reminder - this looks great!! This will be super helpful to people new to optimizing their code for the smart contract environment. Passing it off to @briwylde08 for a final look at grammar etc. + bounty approval.

@briwylde08
Copy link
Contributor

Hi @Myestery! Thank you for the amazing work (and @Shaptic for the thoughtful reviews)! I just made some editorial nit fixes but once that builds we'll get this merged. Let's take the award conversation back over to the corresponding issue!

@briwylde08 briwylde08 merged commit d8eecec into stellar:main Jul 18, 2024
1 check passed
Myestery added a commit to Myestery/stellar-docs that referenced this pull request Jul 24, 2024
* analyzing smart contract cost and efficiency

* talk about contract size

* formatting & words

* add more examples and expand deep dive

* format:mdx

* fix docusaurus Admonitions

* fix code samples using bash

* add storage mechanisms to docs

* attend to PR comments

* Add a small typo fix

* editorial nits

---------

Co-authored-by: Bri <92327786+briwylde08@users.noreply.github.com>
Co-authored-by: George <Shaptic@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a guide for analyzing smart contract cost and efficiency
3 participants