Upgradable Solidity smart contracts #43
Replies: 4 comments 3 replies
-
@mohamedelshami @conor10 Happy to hear your opinion if you have opinions here |
Beta Was this translation helpful? Give feedback.
-
To-do: Send over details on BMC, BSH, BMV implementation structure design changes |
Beta Was this translation helpful? Give feedback.
-
I have read the proposed document from @flowersinthesand and a did bit of research on the EIP-2535 standard. Here are some of my thoughts based on my understanding so far:
Having said that, there're some downsides:
I'm more in favor of the first approach which is to separate the contracts into smaller components. So general rule of thumb is to separate contracts into state contracts and implementation. There are cases like BMV where MPT and Accumulator be easily broken down into 3 contracts, each one of those contracts has its own state. In the long term, we can still introduce a simplified proxy In terms of coding practices in Solidity, not sure how much size optimization can be done but there are some tips here https://soliditydeveloper.com/max-contract-size. In short, I would say we attempt the first approach first while staying open to introduce the Diamond pattern or something similar in the future. |
Beta Was this translation helpful? Give feedback.
-
Closing as we concluded to adopt 'Separating Smart Contracts' |
Beta Was this translation helpful? Give feedback.
-
At first, we, ICONDAO, considered introducing the upgradable plugin by OpenZeppelin as a solution to this problem but after all encountered EIP-170: Contract code size limit issue, writing smart contracts and implementing features.
Here are solutions we found to circumvent the issue: https://docs.google.com/document/d/1IWiZv4UDvdDyykEfLCLXPGjkW_O__iHeRgOtt8ttGG0/edit#
We prefer Separating Smart Contracts to Implementing EIP-2535: Diamonds as a solution in that it's not safe enough to write a new implementation for the standard in draft at the moment. However, we would like to hear various opinions on this first. Team, please read it and share your thought.
Beta Was this translation helpful? Give feedback.
All reactions