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

fix: update gas_limit variable type from u32 to u64 #45

Closed
wants to merge 0 commits into from
Closed

fix: update gas_limit variable type from u32 to u64 #45

wants to merge 0 commits into from

Conversation

ctrl-danny
Copy link

Motivation

When collecting transactions data from other EVM chains (BSC) there were some transactions that had a gas_limit greater than u32::MAX() which caused an integer overflow error.

Solution

Update data type for gas_limit variable from u32 to u64.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@RilRil
Copy link

RilRil commented Aug 29, 2023

thanks it helped me ^^

@sslivkoff
Copy link
Member

is the gas limit of BSC blocks ever that large? the most gas I'm seeing on BSC blocks is 139M gas

I'm wondering if it would also be necessary to modify the datatype of the Block schema to u64

for this PR can you also update the indicator here

("gas_limit", ColumnType::UInt32),

@ctrl-danny
Copy link
Author

In BSC there are transactions that use u64::MAX as the gas limit. This is most commonly seen in the last transaction of the block where the validator deposits to the validator set. I can also update the lines you indicated.

Example here: https://bscscan.com/tx/0x7dcda3c9b1ced4c01f5634a88ab72a34ffc3d3f4c1fe1aed88c2fca0d0a34efd

@ctrl-danny ctrl-danny closed this Sep 8, 2023
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.

3 participants