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

Change core/vm/interface to use uint256.Int as opposed to big.Int #24041

Closed
axic opened this issue Dec 2, 2021 · 2 comments
Closed

Change core/vm/interface to use uint256.Int as opposed to big.Int #24041

axic opened this issue Dec 2, 2021 · 2 comments

Comments

@axic
Copy link
Member

axic commented Dec 2, 2021

There are TODOs in all the call related implementations, like this: https://github.com/ethereum/go-ethereum/blob/master/core/vm/instructions.go#L583-L589. It is memory/speed optimisation for the 0-value case.

Based on my understanding the reason is that the code in core/vm/evm.go relies on big.Int. Would it be a large change moving that to uint256.Int?

Update: Indeed that would be a big change. Either the conversion can be shifted to core/vm/evm.go, or a total overhaul would include changing StateDB and the tracer too. This sounds like a large effort, only worth if the speed difference between big.Int and uint256.Int is significant enough.

@holiman
Copy link
Contributor

holiman commented Dec 3, 2021

yes, it's a large project. I've started doing it a couple of times, but it's hard to make it small. It bleeds all over the place, even if one tries to start in the blocks/transactions, or try to do it internally in the state/trie it sooner or later becomes a giant mess.

@holiman
Copy link
Contributor

holiman commented Feb 14, 2022

Closing this - not really an actionable ticket, just a potential future project

@holiman holiman closed this as completed Feb 14, 2022
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

No branches or pull requests

2 participants