polaris icon indicating copy to clipboard operation
polaris copied to clipboard

chore(precompile): account safety checks, generic interface refactor

Open calbera opened this issue 1 year ago • 5 comments

closes #423

calbera avatar Mar 21 '23 18:03 calbera

Codecov Report

Merging #503 (430d6fb) into main (ccd71b8) will decrease coverage by 5.22%. The diff coverage is 100.00%.

:exclamation: Current head 430d6fb differs from pull request most recent head f184770. Consider uploading reports for the commit f184770 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #503      +/-   ##
==========================================
- Coverage   63.52%   58.31%   -5.22%     
==========================================
  Files          93       93              
  Lines        3753     3766      +13     
==========================================
- Hits         2384     2196     -188     
- Misses       1285     1497     +212     
+ Partials       84       73      -11     
Impacted Files Coverage Δ
cosmos/x/evm/keeper/keeper.go 87.75% <ø> (ø)
eth/core/chain.go 0.00% <ø> (ø)
cosmos/precompile/auth/auth.go 81.25% <100.00%> (-0.75%) :arrow_down:
cosmos/precompile/governance/governance.go 76.52% <100.00%> (ø)
cosmos/precompile/staking/staking.go 90.36% <100.00%> (ø)
cosmos/x/evm/keeper/host.go 100.00% <100.00%> (ø)
cosmos/x/evm/plugins/precompile/genesis.go 94.11% <100.00%> (+94.11%) :arrow_up:
cosmos/x/evm/plugins/precompile/plugin.go 78.94% <100.00%> (+0.37%) :arrow_up:

... and 2 files with indirect coverage changes

codecov[bot] avatar Mar 21 '23 19:03 codecov[bot]

@itsdevbear at time of InitGenesis, it seems the context is not setup?

0xd9A998CaC66092748FfEc7cFBD155Aae1737C2fF
acc is nil


0x4381dC2aB14285160c808659aEe005D51255adD7
acc is nil


0xBDF49C3C3882102fc017FFb661108c63a836D065
acc is nil


0x93354845030274cD4bf1686Abd60AB28EC52e1a7
acc is nil


0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2
acc is nil

calbera avatar Mar 22 '23 00:03 calbera

Check the genesis ordering, need to setup auth module before evm module

itsdevbear avatar Mar 22 '23 00:03 itsdevbear

https://github.com/berachain/polaris/blob/da7eeae7aa0c0fe7de2ec6b69fea7f3d4dd45b1e/cosmos/runtime/config/runtime.go#L91-L98 auth is before evm

calbera avatar Mar 22 '23 01:03 calbera

Hmmm, try making sure it is propagating through the plugins correctly.

itsdevbear avatar Mar 22 '23 01:03 itsdevbear