Improving the deployment process #747
Replies: 9 comments 43 replies
-
Before starting the implementation, I propose to create a model that can implement all the requirements that were outlined above. In my opinion the task is not trivial, it will be quite difficult to generalize all chains. And for this reason, it is worth starting with a plan and a vision in order to jointly come to a better solution. |
Beta Was this translation helpful? Give feedback.
-
Here are some of the features in a deployment script that can be helpful:
|
Beta Was this translation helpful? Give feedback.
-
I'd like to suggest next deployment model. This model removes dependencies between different chains and makes workflow straight. Each chain will have independent deployment process. Directory structurecontracts - This folder stores all btp contracts implementation deploy - This folder stores deployment scripts for specific chains deployments - This folder stores publick deployment artifacts after deploy. (contract addresses, transaction hashes, block numbers, abi and so on) provisioning - This folder for deployment framework. (Python, ....) keystores - keystore is not part of the project and resides on the user's file system Deployment processCase 1: The hub network contracts are already deployed (Icon) and I am deploying a new chain (Bsc) integration to a pre-existing service
Example:
Example: Case 2: The hub network contracts are not already deployed and I am deploying the entire solution
Case 3: I am deploying an update to one or more contracts on one or more chains Each chain has own update scripts. We will run them in the order we need. Case 4: I am setting up one or more bidirectional relays To run a relay we should have only a relay config file. We can easily do it using existing deployment artifacts from the deployment folder. Case 5: I am deploying and update to all relays The process with several relays shouldn't be different. Also I think it make sense to move the relay functionality into separate repository (icon-bridge-relay / icon-relay). It will help avoid any dependencies between contracts and relay. |
Beta Was this translation helpful? Give feedback.
-
A few questions - |
Beta Was this translation helpful? Give feedback.
-
Based on the suggestion above and after some internal discussions, I've created a git issue #775 to decide on an acceptable directory structure. Please check and let me know for necessary improvements. The filenames and types(shell or python) can be changed based on which language we agree to write the scripts in. |
Beta Was this translation helpful? Give feedback.
-
During discussion about the deployment process with @manishbista28, we came to some changes in the structure. |
Beta Was this translation helpful? Give feedback.
-
Let's also discussed the next step. Let's suppose we deployed all chains.
Or
Next step We want to run a relay. |
Beta Was this translation helpful? Give feedback.
-
Let's also discuss a convenient approach to storing private keys from different chains. The discussion points that I can see are:
I think it should be configurable for deployment process.
Each contract create 3 files.
Should the current approach be simplified?
Should we put all the keys in one directory or different ones?
|
Beta Was this translation helpful? Give feedback.
-
Few useful features specific to scripts:
|
Beta Was this translation helpful? Give feedback.
-
Currently the deployment process for ICON Bridge smart contracts and relay relies on many esoteric bash scripts. It requires modifying too many commands depending on what the target environment is, and runs a very high risk of user error.
The deployment process should be very clear, very easy, and very fast. I should be able to deploy to a new EVM chain in under 10 minutes in all of the following cases on any network environment:
Currently, the hub network is specifically ICON.
I would like to do the following:
/docker
,/docker-compose
,/devnet
,/build
/provisioning
directory for all setup/provisioning/users
directory for all identity management. This would be where relay server, relay wallet, and contract owner access and secrets get defined/provisioning/networks
directory for all blockchain provisioning. This would be where kubernetes yaml files define the containers for the local chain environment/provisioning/relays
directory for relay provisioning. This would be where kubernetes yaml files define the containers for the relay/provisioning/smart-contracts
directory for smart contract provisioning. Each execution environment and chain would have its own subfolder, such as/provisioning/smart-contracts/jvm/icon
,/provisioning/smart-contracts/evm/bsc
,/provisioning/smart-contracts/wasm/near
, etc.state.json
in Uniswap's deployment scriptsI would like to know what everyone else's thoughts are and whether I'm missing anything. I get the impression that the e2e framework is doing a lot of this provisioning separately as well, even though it should probably be dependent on this occurring (or calling provisioning on its own when necessary based on config)
Beta Was this translation helpful? Give feedback.
All reactions