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

feat: client input caching #26

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

xJonathanLEI
Copy link
Contributor

Adds an option to cache client input in the exact same format that would be fed into the client program. When used in combination with --chain-id this allows to host to run completely offline.

Copy link
Contributor

@puma314 puma314 left a comment

Choose a reason for hiding this comment

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

Looks generally good, just minor style things

// and decide on whether to panic later.
//
// On the other hand chain ID is always needed.
let (rpc_url, chain_id) = match (args.rpc_url, args.chain_id) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Small code-style thing, but it might be cleaner as a separate function instead of shoved into this already long function

}
};

let client_input_from_cache = if let Some(cache_dir) = args.cache_dir.as_ref() {
Copy link
Contributor

Choose a reason for hiding this comment

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

same here, might be nice to have this as a separate function for cleanliness / readability purposes

@xJonathanLEI
Copy link
Contributor Author

@puma314 Refactored a bit to cut down the spaghetti.

@xJonathanLEI
Copy link
Contributor Author

Rebased due to conflicts. Will merge once CI passes.

@xJonathanLEI xJonathanLEI merged commit 6699f67 into succinctlabs:main Aug 27, 2024
2 checks passed
@xJonathanLEI xJonathanLEI deleted the dev/input_cache branch August 27, 2024 21:46
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.

2 participants