Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Upgrade SDK to 0.47 #1465

Closed
wants to merge 50 commits into from
Closed

Upgrade SDK to 0.47 #1465

wants to merge 50 commits into from

Conversation

itsdevbear
Copy link
Contributor

@itsdevbear itsdevbear commented Nov 16, 2022

Closes: #1316, #1461

There are a set of tasks we probably want to hit simulateously to this upgrade.

Description

WIP


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@itsdevbear itsdevbear requested a review from a team as a code owner November 16, 2022 00:18
@itsdevbear itsdevbear requested review from MalteHerrmann and 4rgon4ut and removed request for a team November 16, 2022 00:18
@itsdevbear itsdevbear marked this pull request as draft November 16, 2022 00:18
@itsdevbear
Copy link
Contributor Author

./init.sh works, chain runs and can submit transactions, just tests giga failing now.

@itsdevbear itsdevbear changed the title Upgrade to 0.47 Upgrade SDK to 0.47 Nov 16, 2022
Copy link
Contributor

@MalteHerrmann MalteHerrmann left a comment

Choose a reason for hiding this comment

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

This is quite a lot to digest and there seems to be a mixup with the SDK version, which was the basis for quite a few changes?

Also, I see quite a lot of stuff commented out and several things, that I could not really put into context as to how they are related to preparing the SDK update for v0.47.

Before I continue reviewing can you check the version issue?

app/ante/eth.go Outdated Show resolved Hide resolved
init.sh Outdated Show resolved Hide resolved
testutil/network/network.go Outdated Show resolved Hide resolved
server/start.go Outdated Show resolved Hide resolved
scripts/protocgen.sh Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
@itsdevbear
Copy link
Contributor Author

itsdevbear commented Nov 16, 2022

@MalteHerrmann its a heavy WIP, commenting stuff out to get it compiling and then going to slowly start bringing stuff back :)

If you look in go.mod there are some funky replaces to get the compiler / versioning happy.

@MalteHerrmann
Copy link
Contributor

@MalteHerrmann its a heavy WIP, commenting stuff out to get it compiling and then going to slowly start bringing stuff back :)

If you look in go.mod there are some funky replaces to get the compiler / versioning happy.

@itsdevbear I see, thanks for putting in the work. :) Was only reviewing because you explicitly asked for a review a couple of hours ago.

On a different note, I would still suggest to maybe rework the description you have added, because it says e.g. that #1460 breaks sdk v0.47, which is not true.

@itsdevbear
Copy link
Contributor Author

itsdevbear commented Nov 16, 2022

Oh I think it auto added a review, but appreciate any help / time you have, since this is a bit of an ugly task haha. Notably if you're able to assist with the integration tests, Nix hates M1 ARM Macs and I haven't been able to get them running (we moved our @berachain repo's to full go testing no python or nix).

#1460 was going to be broken, the 46.5 change has been backported into 0.47.x now, gotta just make the update.

@itsdevbear
Copy link
Contributor Author

itsdevbear commented Nov 16, 2022

@MalteHerrmann 79a8f9c should do it

Once we get a proper 0.47-alpha release cut it should clean up the dep mess. Should be soon? @tac0turtle :P

// Sets gas limit to max uint32 to not error with javascript dev tooling
// This -1 value indicating no block gas limit is set to max uint64 with geth hexutils
// which errors certain javascript dev tooling which only supports up to 53 bits
return int64(^uint32(0)), nil

Check failure

Code scanning / gosec

Potential integer overflow by integer type conversion

Potential integer overflow by integer type conversion
@itsdevbear
Copy link
Contributor Author

Realised I had forgot to override the default mempool behaviour here.

For those following along, I added a really basic mempool (with hella bugs) to get us going here. Next step will be to migrate a lot of the ante handler / feemarket into a mempool impl.

@codecov
Copy link

codecov bot commented Nov 21, 2022

Codecov Report

Merging #1465 (6008fc0) into main (39309e0) will decrease coverage by 0.41%.
The diff coverage is 43.75%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1465      +/-   ##
==========================================
- Coverage   68.70%   68.28%   -0.42%     
==========================================
  Files         103      104       +1     
  Lines        9937     9980      +43     
==========================================
- Hits         6827     6815      -12     
- Misses       2730     2787      +57     
+ Partials      380      378       -2     
Impacted Files Coverage Δ
app/ante/eip712.go 58.03% <ø> (ø)
app/ante/handler_options.go 70.58% <ø> (ø)
app/upgrades.go 40.00% <0.00%> (ø)
client/testnet.go 0.00% <0.00%> (ø)
encoding/config.go 100.00% <ø> (ø)
ethereum/eip712/encoding.go 79.03% <ø> (ø)
rpc/backend/utils.go 43.93% <0.00%> (ø)
rpc/types/utils.go 0.00% <0.00%> (ø)
types/mempool.go 0.00% <0.00%> (ø)
x/evm/module.go 56.25% <ø> (+3.79%) ⬆️
... and 14 more

@itsdevbear itsdevbear requested review from MalteHerrmann and removed request for 4rgon4ut November 25, 2022 02:05
@itsdevbear
Copy link
Contributor Author

Still need to add the proper mempool that can handle eth txn, but would love a once over @MalteHerrmann

@yihuang
Copy link
Contributor

yihuang commented Nov 25, 2022

I guess no need to do all these features in a single PR, we can upgrade dependency first, fix minimal breaking apis, then do the features one by one?

@itsdevbear
Copy link
Contributor Author

This is pretty much the minimal. 0.47 is a huge upgrade.

@fedekunze
Copy link
Contributor

@itsdevbear FYI, this PR doesn't address #1231 because PostHandlers are only executed on a successful tx

@itsdevbear itsdevbear closed this Dec 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Transition x/evm and x/feemarket to v0.47 App wiring.
5 participants