flip-fest icon indicating copy to clipboard operation
flip-fest copied to clipboard

Emulator Feature: Report gas used

Open srinjoyc opened this issue 4 years ago • 6 comments

👋   If you are interested in working on this issue, please check out the Getting Started guide on HackerEarth!

Description (Problem Statement)

There should be a way to see transaction gas (computation) usage.

Gas usage is not the same as transaction fees. Transaction fees are currently static, but in the future they will depend on the gas used by the transaction.

Executed transactions are currently logged like this (when in verbose mode):

image

The transaction executed line should also include gas usage.

To get the gas usage of the transaction, you can get started here. This field gets filled after the transaction is run. This information should be intercepted on the emulator.

Experience Required

  • Experience with Go
  • Some understanding of the Flow's architecture

Minimum Feature Set (Acceptance Criteria)

  • When executing a transaction in the emulator gas usage should be visible in the emulator logs

Software Requirements

Maintainability

  • The tools or libraries used to construct the solution should be well vetted and well maintained
  • Code should be written in a way where it's easily extensible to new functionality and semantic enough for open-source developers to contribute to.

Testing

  • Wherever possible unit tests should be written
  • Meet testing guidelines of the repo

Other Requirements

Documentation

  • Edit the current documentation to add a description of this new feature

Code standards or guidelines

Judging Criteria

Resources

srinjoyc avatar Sep 09 '21 14:09 srinjoyc

Hi 👋 my name is Gregor, and as a software engineer working on developer tools, I will be your point of contact for this task, so good luck, and don't hesitate to reach out to me with any problems or questions.

I'll keep an eye on your progress and will be reviewing your code.

You can comment here or find me on Discord (I'm sideninja#1970). Join the Flow Discord server if you're not there already!

devbugging avatar Sep 16 '21 08:09 devbugging

Hi

  1. Team: https://www.hackerearth.com/challenges/hackathon/flip-fest/dashboard/c511683/team/
  2. @avcdsld (There are three of us on the team, but I'm the only one participating in this issue.)
  3. plan time: 2021-09-26

avcdsld avatar Sep 26 '21 14:09 avcdsld

Hi @sideninja I have created a PR for this issue, can you please check it? Please let me know if any corrections need to be made. I am glad to have had this opportunity. https://github.com/onflow/flow-emulator/pull/87

avcdsld avatar Sep 26 '21 15:09 avcdsld

@avcdsld Your PR has been accepted and merged, since this was a task that has obvious correct implementation it has been merged. Existing PR here: https://github.com/onflow/flow-emulator/pull/87

--

If you believe you have a revolutionary better idea on how to implement this you are always free to do so, but we believe this task is too small to have many other approaches.

devbugging avatar Sep 29 '21 09:09 devbugging

Good day @avcdsld!

Thanks so much for all your hardwork & participation. In order to finalize winners & prepare for prize payout, we'll need the following actions from your end.

Please provide the following information by Nov 17, 2021, (in this GH Issue is fine):

1. Team Information

  • Team Members Information - Github Username + Email Contact + Percentage of prize allocation (total should = 100%)
  • All mentioned members MUST react to the post with a 👍 which will act as confirmation that the information is correct, or a 👎 to indicate that the information is not correct.
  • We will be reaching out via e-mail

🎖IMPORTANT: We will only proceed with prize payouts once all members have confirmed with 👍 on the post.

2. Video Demo (optional)

  • Please provide a 5-minute video demo to be featured & showcased in the FLIP Fest Closing Ceremonies
  • Link format & Downloadable (eg. Google Drive, Vimeo)
  • Content Format (Problem Statement, your work / how you solved it, final outcome)

We will be hosting Closing Ceremonies on November 23rd, 8AM PT where we'll having closing remarks from Dete & will be announcing the winners! I'll share the details here before Nov 17.

kimcodeashian avatar Nov 12 '21 23:11 kimcodeashian

Hey folks,

We've received and reviewed over 82 submissions! What an amazing community on Flow! To commemorate all the hard work done, we have finalized winners and will be announcing them during our Closing Ceremony on Nov 23rd, 8AM PT. Be sure to join us - there may be some attendance prizes & a keynote from our CTO, Dete 😉!

RSVP here so you don't miss out! See you then!

kimcodeashian avatar Nov 17 '21 00:11 kimcodeashian