You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
Add a mechanism to check for max CCU size that is accepted by the network and based on that we create a CCU with number of CCMs it can hold making sure it respects the overall size of CCU transaction.
we need to calculate the max CCU size ~15kb and determine the number of CCMs that can be included in a sequence. For ex, ccm1, ccm2, ccm3, ccm4, ccm5,..ccm(n) where ccm2 is at the certified height, then we chose from ccm3 to ccm(n) in a way that we can fit into max CCU size, sizeOf[ccm3....ccm(m)] < MAX_CCU_SIZE taking rest of the properties of CCU transaction into account.
In the newBlockHandler, before calling createCCU. We call the function getListOfCCM(ccm []) => list of ccm where getListOfCCM implements the above logic and returns a list of CCMs that can be included in a CCU respecting max size.
Acceptance Criteria
A CCU with size under max size is created including sufficiently large CCMs
### What was the problem?
This PR resolves#7458
### How was it solved?
Cross chain messages are now grouped into a collection < MAX_CCM_SIZE,
each group could be used to create a CCU
### How was it tested?
Test cases added
Description
Add a mechanism to check for max CCU size that is accepted by the network and based on that we create a CCU with number of CCMs it can hold making sure it respects the overall size of CCU transaction.
we need to calculate the max CCU size ~15kb and determine the number of CCMs that can be included in a sequence. For ex,
ccm1, ccm2, ccm3, ccm4, ccm5,..ccm(n)
where ccm2 is at the certified height, then we chose from ccm3 to ccm(n) in a way that we can fit into max CCU size,sizeOf[ccm3....ccm(m)] < MAX_CCU_SIZE
taking rest of the properties of CCU transaction into account.In the
newBlockHandler
, before callingcreateCCU
. We call the functiongetListOfCCM(ccm []) => list of ccm
wheregetListOfCCM
implements the above logic and returns a list of CCMs that can be included in a CCU respecting max size.Acceptance Criteria
Additional Information
The text was updated successfully, but these errors were encountered: