-
Notifications
You must be signed in to change notification settings - Fork 7
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
refactor: remove duplicate chain extensions across runtimes #78
Comments
Agree on keeping pop exentions in the runtime |
I guess the rationale for it being outside the runtime directory is simply a classification, where the subdirectories are implementations of runtimes. No big deal either way to me. I think it probably makes sense, but a few things to consider:
|
But will most differences between devnet, testnet and mainnet not be additive? I'm thinking in light of adding new features I see your point though where constants can be chosen to be different which is not additive, I found this implementation used by frequency which we can take as an inspiration: prod_or_testnet_or_local |
Nevertheless, this requires more careful consideration and refactoring the tests is urgent for now so I will only do that. |
I am taking a look at the current testnet extension to migrate, but seems like it is quite out-dated right now (no versioning support so the env buffer is decoded in a different way, first two bytes in devnet is a version while first two bytes in testnet is a function ID), wonder how would we want to handle it?
|
Perhaps it can simply start by moving the extension to |
Close #163 |
I think we should create a separate folder for the extension in the runtime folder, outside devnet/testnet, which the runtimes than take as a dependency, similar to a pallet. We can then have a devnet and testnet feature in the extension crate so that we can deploy new integrations separately first on devnet and then testnet, but still being able to work in one folder instead of all the different runtime folders. The common folder doesn't make sense to me since there are non common things as mentioned above.
Astar has something similar but outside the runtime folder: https://github.com/AstarNetwork/Astar/tree/master/chain-extensions. I would like to maintain it in the runtime folder.
As for the tests, I think we should create a test folder in the chain extension crate where we divide the tests per use case; e.g. fungibles, non-fungiles.
The text was updated successfully, but these errors were encountered: