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

VM, Block, Blockchain: Ensure backwards compatibility with legacy transactions #1085

Closed
holgerd77 opened this issue Feb 5, 2021 · 1 comment

Comments

@holgerd77
Copy link
Member

EIP-2718 is introducing a new typed transaction format which is currently worked on along #1048 and which will likely lead to a major breaking release on the transaction library.

For not having to do breaking releases on the other consuming libraries (VM, Block, Blockchain) we need to think early on about how best to integrate a new version into the other libraries.

One first suggestion (idea) is to add a Transaction.fromLegacyTransaction() static constructor to the new Transaction class which consumes a v3 tx and creates a v4 tx from it and then can be used in VM, Block, Blockchain to transform (based on some characteristics of the old class) to continue to operate on the new version.

This needs some dedicated analysis if this is possible without side effects (one condition is that a tx is just consumed by e.g. the VM and not modified, which might be the case regarding that we even switched to an immutable design for the class).

Also some TODO: we likely want to have at least some basic test setup (maybe the API test are enough e.g. for the VM?) where we can run both tx v3 and v4 towards the VM.runTx() method and see that things continue to work. //cc @cgewecke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment