!ciojfMuGYygKQdJjpD:matrix.org

Frontier

6803 Members
https://github.com/paritytech/frontier/18 Servers

Load older messages


SenderMessageTime
12 Jan 2021
@jnaviasky:matrix.orgjnaviaskylooks like EVM is pegged to minor version 0.7 but the new substrate uses 0.817:30:10
@jnaviasky:matrix.orgjnaviasky * looks like EVM is pegged to minor version 0.7 of primitive-types but the new substrate uses 0.817:30:42
@jnaviasky:matrix.orgjnaviasky Wei Tang: hi, wondering if you had any idea about getting this in: https://github.com/rust-blockchain/ethereum/pull/7 -- once this is in, we can bump the rust-blockchain/evm types and then fix these frontier build issues 18:00:24
@sorpaas:matrix.parity.ioWei TangDone! Will handle releases tomorrow!22:12:55
13 Jan 2021
@jnaviasky:matrix.orgjnaviaskyexcellent, looking forward to it15:58:55
@jnaviasky:matrix.orgjnaviaskyRedacted or Malformed Event17:25:25
@jnaviasky:matrix.orgjnaviasky

trying to understand how the gasometer's working. i have a contract that spawns a sub-contract in one of its methods. here's a log snippet from the evm when i estimate that method's gas:

2021-01-13 13:10:24.612  TRACE        http.worker00 evm:Running opcode: Ok(Push(1)), Pre gas-left: 4294945967    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Computed costs: memory_gas: 36, gas_cost: 3, total used gas: 228    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Running opcode: Err(Create), Pre gas-left: 4294945964    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Computed costs: memory_gas: 36, gas_cost: 32000, total used gas: 231    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Running opcode: Ok(Push(1)), Pre gas-left: 4227805934    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Computed costs: memory_gas: 0, gas_cost: 3, total used gas: 0    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Running opcode: Ok(Push(1)), Pre gas-left: 4227805931    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Computed costs: memory_gas: 0, gas_cost: 3, total used gas: 3    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Running opcode: Ok(MStore), Pre gas-left: 4227805928    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Computed costs: memory_gas: 9, gas_cost: 3, total used gas: 6    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Running opcode: Ok(Push(1)), Pre gas-left: 4227805916    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Computed costs: memory_gas: 9, gas_cost: 3, total used gas: 9    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Running opcode: Ok(Dup(1)), Pre gas-left: 4227805913    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Computed costs: memory_gas: 9, gas_cost: 3, total used gas: 12    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Running opcode: Ok(Push(2)), Pre gas-left: 4227805910    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Computed costs: memory_gas: 9, gas_cost: 3, total used gas: 15    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Running opcode: Ok(Push(1)), Pre gas-left: 4227805907    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Computed costs: memory_gas: 9, gas_cost: 3, total used gas: 18    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Running opcode: Ok(CodeCopy), Pre gas-left: 4227805904    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Computed costs: memory_gas: 21, gas_cost: 24, total used gas: 21    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Running opcode: Ok(Push(1)), Pre gas-left: 4227805868    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Computed costs: memory_gas: 21, gas_cost: 3, total used gas: 45    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Running opcode: Ok(Return), Pre gas-left: 4227805865    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Computed costs: memory_gas: 21, gas_cost: 0, total used gas: 48    
2021-01-13 13:10:24.613  DEBUG        http.worker00 evm:Create execution using address 0xb600…1ae4: Succeed(Returned)    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Running opcode: Ok(Dup(1)), Pre gas-left: 4227761065    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Computed costs: memory_gas: 36, gas_cost: 3, total used gas: 67185130    
2021-01-13 13:10:24.613  TRACE        http.worker00 evm:Running opcode: Ok(IsZero), Pre gas-left: 4227761062    
18:16:09
@jnaviasky:matrix.orgjnaviaskynotice that the gas drops by 67m at the Create opcode, and it's not reflected in the used gas until after the return -- but why such a big number? that seems like hugely more than 32000 + memory_cost as defined in the constants/logic18:16:51
@jnaviasky:matrix.orgjnaviaskyI believe this is the same sort of thing as raised here: https://github.com/paritytech/frontier/pull/252#issuecomment-75470052318:17:22
@joshyorndorff:matrix.orgJoshy Orndorff invited @notlesh:matrix.orgnotlesh.18:54:33
@notlesh:matrix.orgnotlesh joined the room.18:54:43
@notlesh:matrix.orgnotlesh👋18:54:57
@joshyorndorff:matrix.orgJoshy Orndorff
In reply to @joshyorndorff:matrix.org

I'm working on updating Frontier to a newer Substrate and running into a lot of errors like this:

error[E0053]: method `block_number` has an incompatible type for trait
   --> frame/evm/src/runner/stack.rs:256:2
    |
256 |     fn block_number(&self) -> U256 {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `primitive_types::U256`, found struct `sp_core::U256`
    |
    = note: expected fn pointer `fn(&stack::Backend<'vicinity, T>) -> primitive_types::U256`
               found fn pointer `fn(&stack::Backend<'vicinity, T>) -> sp_core::U256`
    = note: perhaps two different versions of crate `primitive_types` are being used?

Does anyone know some context about the primitive_types crate? And which source of U256 should I be using?

So notlesh and I have spent a day diving in on this, and it seems the issue is that the ethereum crate's published version does not yet have a few dependencies updated. These updates are reflected in the ethereum crate's github repo thanks to the latest pull request merge.
18:56:50
@joshyorndorff:matrix.orgJoshy Orndorff sorpaas: Would you be able to publish a release of ethereum with these updates? 18:57:45
@jnaviasky:matrix.orgjnaviaskyI have a PR up on rust-blockchain/evm as well that should fix it there too18:57:48
@jnaviasky:matrix.orgjnaviaskyjust need to wait for the publish18:57:54
@jnaviasky:matrix.orgjnaviasky(this was also what i spent a day diving into yesterday, heh)18:58:35
@notlesh:matrix.orgnotleshlol.18:58:50
@notlesh:matrix.orgnotleshyou must mean: https://github.com/rust-blockchain/evm/pull/718:58:52
@jnaviasky:matrix.orgjnaviaskyif you want a "for now" fix, I can give you my branches18:58:59
@jnaviasky:matrix.orgjnaviaskyyes18:59:00
@notlesh:matrix.orgnotleshlooks like CI failed: https://github.com/rust-blockchain/evm/pull/7/checks?check_run_id=169029635718:59:18
@jnaviasky:matrix.orgjnaviaskythe branch i was pegged to yesterday got deleted because it was merged in, so yeah the build of it will fail now19:00:08
@notlesh:matrix.orgnotleshgotcha19:00:24
@jnaviasky:matrix.orgjnaviaskyor something weird happened with the git configuration -- but the code changes are pretty straightforward19:00:47
@notlesh:matrix.orgnotlesh in our case, we depend on ethereum which in turn depends on evm, so we'd need ethereum to bump its evm version once evm updates its ethereum-types version... 19:00:50
@jnaviasky:matrix.orgjnaviaskyyes, same for me19:00:59
@jnaviasky:matrix.orgjnaviasky

I was using these overrides in my node though:


[patch.crates-io]
# frontier deps
evm = { git = "https://github.com/hicommonwealth/evm.git", branch = "jake.opcode-gas-debug" }
evm-runtime = { git = "https://github.com/hicommonwealth/evm.git", branch = "jake.opcode-gas-debug" }
evm-gasometer = { git = "https://github.com/hicommonwealth/evm.git", branch = "jake.opcode-gas-debug" }
ethereum = { git = "https://github.com/rust-blockchain/ethereum.git", branch = "vorot93/bump-deps" }

19:01:35
@jnaviasky:matrix.orgjnaviasky *

I was using these overrides in my node though:


[patch.crates-io]
# frontier deps
evm = { git = "https://github.com/hicommonwealth/evm.git", branch = "jnaviask.primitive-types-0.8" }
evm-runtime = { git = "https://github.com/hicommonwealth/evm.git", branch = "jnaviask.primitive-types-0.8" }
evm-gasometer = { git = "https://github.com/hicommonwealth/evm.git", branch = "jnaviask.primitive-types-0.8" }
ethereum = { git = "https://github.com/rust-blockchain/ethereum.git", branch = "vorot93/bump-deps" }

19:01:59
@notlesh:matrix.orgnotleshthanks for sharing, that might get us going for now 👍️19:02:11

Show newer messages


Back to Room ListRoom Version: 5