-
Notifications
You must be signed in to change notification settings - Fork 39
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
CLI Feature: State management #22
Comments
Hi 👋 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! |
Hey @sideninja , I would love to have this feature. I like the snapshot concept, but what would you think to extend this task a bit more to instead emulator to expose subset of git functionality, it would provide a git compatibility layer on storage. When new block committed, commit to git state and use Block information, transaction status / events etc as git commit message. Git is already providing log, tag, branch, remote origin etc support. Also as cli command same required functionality can be achieved. (just using git as underlying version controlling) |
That's a very interesting idea. |
yeah I first tried on ledger side, but branching is a big problem there, moving on a single like is easy, when you try to branch things are getting a bit complicated. But with git module it is almost supporting every git operation + cli can translate cli command to git commands too. Also log is pretty nice. |
Team: https://www.hackerearth.com/challenges/hackathon/flip-fest/dashboard/3744a70/team/ So I will work on this one, I would like to integrate also with onflow/cadence#1160 so we can have a command to use in testing to load, save and switch to some snapshot. |
@bluesign Awesome, you're approved 😄 |
I managed to finish first part: integrating git to emulator, committing to git on transaction executions etc. But stuck with integrating into cadence ( as discussed in onflow/cadence#1160 ) Actually I managed to integrate by creating a new So far I manage to create a But if someone from FVM side can give some light, maybe there is a better way to do this. |
Maybe @janezpodhostnik can help with FVM. |
Thanks, it would be the easiest I guess. Otherwise another option would require another RPC channel. |
@bluesign and I had a chat, and I've also done some thinking. Here are my notes. Creating a new The suggestion was that the ScriptProcessors would be able to "pass on" the predeclared values to the next It might also help if there was the possibility to add global predeclared values to the context that are appended to each script/tx processor. I have to check if that would be helpful. I am slightly worried that "operational", emulator specific, cadence functions are being added, as that might be confusing for user when they switch to/from the emulator. Namespacing these functions would definitely help, but maybe it might be worth considering having another communication channel to/from the emulator for these kind of functionalities. |
After @janezpodhostnik's comment, I am leaning more towards to a different RPC for cli and emulator to talk, if there are no objections I will go that path. ( Glue code to extend go functions to emulator I will develop on a separate project, as it is almost ready ) |
I think establishing another channel of communication between CLI and emulator would be good. I was thinking that channel could even be HTTP API as there is already HTTP API listening on port 8080 and handles metrics and liveness checks and that feels to me already as an API that could be extended and would be emulator management API. I could even see more developer APIs added there, think APIs specific to local usage and not supported by the network such as triggering new blocks to APIs, getting account storage, etc etc. Creating a new grpc service I fear may cause confusion, although I think separating things by communication protocol is never a good design decision in this case as there already is an HTTP API it just might be ok. What do you think? |
yeah I was thinking RPC as HTTP API actually, I am extending 8080 with some rest methods then. That will be very good. If you have any more ideas please share. I am thinking below currently:
|
Ohh I missread as grpc, yeah be free to implement it as RPC. Ohh wow, would love to see those as part of the emulator, specially the storage explorer is quite needed for dev, but at some later point that will be natively supported by Cadence, however until that day comes it's still great addition. |
Good day @bluesign! 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
🎖IMPORTANT: We will only proceed with prize payouts once all members have confirmed with 👍 on the post. 2. Video Demo (optional)
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. |
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! |
Description (Problem Statement)
The CLI should allow saving the current state and then later restarting from that point similar to how you can use git to move between states. This feature is mostly implemented in the PR branch but should be tested, extended with a test suite, and ensure the UX is great.
Experience Required
Minimum Feature Set (Acceptance Criteria)
A developer has commands to achieve the following actions:
The state should be persistent between restarts
Extension (Optional) Feature Set
Interoperability with the Emulator GUI task.
Milestone Requirements
Software Requirements
Maintainability
Code should be written with best practices in mind.
Testing
Tests should cover all the code implementing this functionality.
Other Requirements
Documentation
Code standards or guidelines
Judging Criteria
Resources
The text was updated successfully, but these errors were encountered: