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

[types] Add chain_id and max_gas_amount to Transaction #681

Merged
merged 4 commits into from
Aug 23, 2023

Conversation

jolestar
Copy link
Contributor

@jolestar jolestar commented Aug 22, 2023

Summary

  1. Add chain_id and max_gas_amount to Transaction.
  2. Add sequence_number and max_gas_amount to TxContext.
  3. Add chain_id as transaction_validator::validate argument.
  4. Add TxResult to TxContext after tx is executed for the transaction validator to get gas_used in the post_execute function.

resolve #680

@vercel
Copy link

vercel bot commented Aug 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
rooch ⬜️ Ignored (Inspect) Visit Preview Aug 23, 2023 7:24am

@jolestar jolestar marked this pull request as ready for review August 23, 2023 05:27
@jolestar
Copy link
Contributor Author

cc @feliciss and @yubing744

pub enum ChainID {
Dev = 20230103,
Test = 20230102,
Main = 20230101,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Or directly represent by 1,2,3, it will be easier.

Dev = 3,
Test = 2,
Main = 1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rooch's ChainID must not conflict with Ethereum or Ethereum fork chain id.

@jolestar
Copy link
Contributor Author

I merge this PR first. @steelgeek091 please help to resolve the conflict with #684

@jolestar jolestar merged commit 3f9bfc8 into main Aug 23, 2023
3 checks passed
@jolestar jolestar deleted the chain_id_max_gas_amount branch August 23, 2023 07:57
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.

[Types] Add ChainID and GasLimit to transaction
2 participants