duneanalytics / spellbook

SQL views for Dune
Other
1.15k stars 1.06k forks source link

[BUG] evms.transactions has rows with negative gas used #6565

Closed MSilb7 closed 2 weeks ago

MSilb7 commented 4 weeks ago

Description

evms.transactions has rows with negative gas used, which causes queries using it to fail

See: https://dune.com/queries/3992009

jeff-dude commented 4 weeks ago

looks like this is due to mode chain using a different data type in the raw data for that field.

SELECT
     gas_used,
     typeof(gas_used)
FROM
  "delta_prod"."mode"."transactions"
limit
  10

returns uint256

SELECT
     gas_used,
     typeof(gas_used)
FROM
  "delta_prod"."ethereum"."transactions"
limit
  10

returns bigint

jeff-dude commented 4 weeks ago

@0xBoxer @agaperste are we enforcing data types on hosted blockchains? why does mode differ than fully managed chains?

agaperste commented 4 weeks ago

Thanks for raising @jeff-dude, I will discuss with blockchain team internally

jeff-dude commented 2 weeks ago

thank you for raising @MSilb7 i can confirm there was a bug in data types from the hosted blockchains being added. the blockchain team has fix and i've refreshed the view, now the query runs.