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

Decide attached gas based on transaction type #166

Open
saketh-are opened this issue Jan 30, 2025 · 0 comments
Open

Decide attached gas based on transaction type #166

saketh-are opened this issue Jan 30, 2025 · 0 comments
Assignees

Comments

@saketh-are
Copy link
Contributor

Currently we attach the maximum of 300 Tgas to every outgoing transaction:

let action = FunctionCallAction {
method_name,
args,
gas: 300000000000000,
deposit: 0,
};

As a result, we are able to send fewer respond txs before running into congestion limits. Based on testing respond calls consume only 7.62 Tgas, so we should lower the attached gas to 10 Tgas.

We have introduced other types of outgoing transactions as well, which may consume more or less gas:

pub enum ChainSendTransactionRequest {
Respond(ChainRespondArgs),
// TODO(#150): Implement join.
#[allow(dead_code)]
Join(ChainJoinArgs),
VotePk(ChainVotePkArgs),
// TODO(#43): Implement vote_reshared.
#[allow(dead_code)]
VoteReshared(ChainVoteResharedArgs),
}

The attached gas should be decided based on the transaction type.

@saketh-are saketh-are self-assigned this Jan 30, 2025
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

No branches or pull requests

1 participant