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

Implement gas metering abstraction #79

Closed
seunlanlege opened this issue Jul 6, 2022 · 8 comments
Closed

Implement gas metering abstraction #79

seunlanlege opened this issue Jul 6, 2022 · 8 comments
Assignees

Comments

@seunlanlege
Copy link
Contributor

seunlanlege commented Jul 6, 2022

So currently we naively relay all packets to the counter party chain. In production its more likely that these batches will be too expensive (probably even more than is allowed into a block) to relay all at once. So we probably want to first estimate the gas cost somehow then split them up into batches based on this estimate.

@seunlanlege
Copy link
Contributor Author

We could also leave this up to the Chain implementors to estimate and deliver these transaction batch by batch?

@blasrodri
Copy link
Contributor

This is an interesting space. Is there any resource we can look at in order to understand how this has been done by others?

@seunlanlege
Copy link
Contributor Author

seunlanlege commented Sep 10, 2022

Thought about this a bit more and we can definitely implement this tx queue in the relayer core rather than for every chain.

We'll just introduce a new api to chain

trait Chain {
    async fn block_max_execution_weight(&self) -> u64;

    async fn estimate_execution_weight(&self, msgs: Vec<Any>) -> u64;

...

@seunlanlege
Copy link
Contributor Author

This is an interesting space. Is there any resource we can look at in order to understand how this has been done by others?

I unfortunately don't have this sir, but I don't think that the implementation details of a gas aware tx queue are so complex they require a reference.

@seunlanlege
Copy link
Contributor Author

Yes this issue is based on the idea that most blockchains have an api for estimating gas costs.

@blasrodri
Copy link
Contributor

Perfect. Thanks

@seunlanlege seunlanlege self-assigned this Sep 16, 2022
@seunlanlege seunlanlege transferred this issue from another repository Oct 6, 2022
@seunlanlege seunlanlege transferred this issue from ComposableFi/composable-ibc Oct 6, 2022
@seunlanlege seunlanlege transferred this issue from ComposableFi/composable Oct 27, 2022
@seunlanlege
Copy link
Contributor Author

closed in #81

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants