Feat/initialize facet operational counter#1065
Open
marcosio wants to merge 21 commits intodevelopmentfrom
Open
Feat/initialize facet operational counter#1065marcosio wants to merge 21 commits intodevelopmentfrom
marcosio wants to merge 21 commits intodevelopmentfrom
Conversation
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
…eFacet Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Marcos Serradilla Diez <marcos@io.builders>
…tializer
Each setFacetToReady now increments a counter; when it reaches
configTargetCount the config transitions to operational atomically,
emitting TokenOperational with no separate setOperationalStatus call
needed — O(1) regardless of config size.
Adds _prepareReinitialization for upgrade flows (k=0 → immediate;
k>0 → REINIT_PENDING with target). Refactors facetVersionStatus and
facetLastVersion to composite keccak256 keys to prevent cross-context
collisions. Extends IInitializer with TokenOperational, setConfigTargetCount,
getConfigInitializedCount and getConfigTargetCount.
Includes GasBenchmarkInitializerHarness, gas benchmark tests asserting
O(1) cost at N={1,5,10,25,50,100} under the Hedera 7.5M limit, and
ADR-002 documenting the decision and rejected alternatives.
Backward compatible: target=0 (default) is a no-op and preserves the
existing setOperationalStatus flow.
Signed-off-by: Marcos Serradilla Diez <marcos@io.builders>
Signed-off-by: Mario Francia <mariofranciarius@gmail.com> Signed-off-by: Marcos Serradilla Diez <marcos@io.builders>
Signed-off-by: jaime-iobermudez <jaime.bermudez@io.builders>
…20 (#1003) Signed-off-by: Marcos Serradilla Diez <marcos@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders> Signed-off-by: Marcos Serradilla Diez <marcos@io.builders> Co-authored-by: Marcos Serradilla Diez <marcos@io.builders>
Signed-off-by: jaime-iobermudez <jaime.bermudez@io.builders>
Replace 101 parallel eth_call to getStaticResolverKey() with offline lookup via atsRegistry.getFacetDefinition(). Hedera Solo JSON-RPC relay rate-limits the concurrent reads; Hardhat tolerates them. Resolver keys are deterministic and already available in the generated registry, so no on-chain round-trip is needed. Two follow-on fixes: - error()/warn()/debug() now print the data argument in text mode (Error name+message+stack, ethers reason/shortMessage/code/data, or JSON for plain objects). Previously the data was silently dropped in text mode, masking the real exception body in CI logs. - registerFacets() batch loop hardened: Math.ceil + strict <, plus a defensive empty-slice guard. Previously sent an empty final tx when facets.length % FACET_REGISTRATION_BATCH_SIZE === 0. Signed-off-by: Miguel_LZPF <miguel.carpena@io.builders>
…ation Signed-off-by: Miguel_LZPF <miguel.carpena@io.builders>
Signed-off-by: Miguel_LZPF <miguel.carpena@io.builders>
Signed-off-by: Miguel_LZPF <miguel.carpena@io.builders>
Signed-off-by: Miguel_LZPF <miguel.carpena@io.builders>
Signed-off-by: Axel-IoBuilders <108282711+Axel-IoBuilders@users.noreply.github.com> Signed-off-by: jaime-iobermudez <jaime.bermudez@io.builders> Co-authored-by: jaime-iobermudez <jaime.bermudez@io.builders>
Signed-off-by: mamoralesiob <miguelangel@io.builders>
Signed-off-by: jaime-iobermudez <jaime.bermudez@io.builders>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of change
Testing
Node version:
Checklist