Skip to content

Deprecate the conditional route handlers - #1497

Draft
enlight wants to merge 6 commits into
masterfrom
new-tx-router
Draft

enlight wants to merge 6 commits into
masterfrom
new-tx-router

Conversation

@enlight

@enlight enlight commented Sep 23, 2019

Copy link
Copy Markdown
Contributor
  • No need to unmarshal every tx multiple times to figure out if it's an EVM tx or not before it hits Call/DeployTxHandler.
  • New tx handlers always set TxHandlerResult.Info as soon as they figure out the tx type, legacy handlers didn't do so if the tx failed.
  • Cleaned up error handling a bit in the new DeployTxHandler.

Related:
loomnetwork/go-loom#478

- No need to unmarshal every tx multiple times to figure out if it's an
EVM tx or not before it hits Call/DeployTxHandler.
- New tx handlers always set TxHandlerResult.Info as soon as they
  figure out the tx type, legacy handlers didn't do so if the tx failed.
- Cleaned up error handling a bit.
@enlight
enlight requested a review from pathornteng October 2, 2019 11:21

@pathornteng pathornteng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So after we activate the config, EvmTx is not going to run with loomchain.NoopTxHandler on CheckTx anymore. Need to think about how this would affect receipts and other things.

Comment thread router.go
@enlight

enlight commented Oct 2, 2019

Copy link
Copy Markdown
Contributor Author

So after we activate the config, EvmTx is not going to run with loomchain.NoopTxHandler on CheckTx anymore. Need to think about how this would affect receipts and other things.

It won't affect receipts and other things because the new CallTxHandler doesn't actually run any of that code, see https://github.com/loomnetwork/loomchain/pull/1497/files#diff-141a5928106d9d5a533ebaf05559359cR49

@pathornteng pathornteng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should also enable some e2e test for this router to make sure that it works.

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

Successfully merging this pull request may close these issues.

2 participants