Skip to content

Conversation

@AlbertoMolinaIoBuilders
Copy link
Contributor

Description

Type of change

  • Bug fix 🐞
  • New feature ✨
  • Breaking change 💥
  • Documentation update 📖
  • Refactor 🔧

Testing

Node version:

  • 20
  • 22
  • 24

Checklist

  • Style Guidelines followed ✅
  • Documentation Updated 📚
  • Linters - No New Warnings ⚠️
  • Local Tests Pass ✅
  • Effective Tests Added ✔️
  • No reduction of Coverage

Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Fixed critical configuration ID bug where deployBondFixedRateFromFactory was using
BOND_CONFIG_ID (0x00...02) instead of the correct BOND_FIXED_RATE_CONFIG_ID (0x00...03).
This caused FunctionNotFound("0xd51e10d5") errors during BondFixedRate deployments.

Updated checkpoint utilities to account for the new BondFixedRate configuration:
- Updated totalConfigurations from 2 to 3
- Added "Bond Fixed Rate Configuration" as step 6 for newBlr, step 5 for existingBlr
- Updated getTotalSteps expectations: newBlr 7→8, existingBlr 6→7

Updated test fixtures and assertions:
- Added bondFixedRate configuration to checkpoint test fixture
- Updated configuration count assertions in all relevant tests
- Updated step sequence expectations in getStepName tests
- Removed .only decorator from fixedRate.test.ts to enable parallel test execution
- Fixed linting issues: prefixed unused variables with underscore
- Applied formatting fixes throughout modified files

Signed-off-by: Miguel_LZPF <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Root Cause: Addition of Bond Fixed Rate configuration added 3 new facets to the bond
configuration, increasing the facet count from 44 to 47 and adding a new workflow step
in the deployment process. This caused cascading failures in tests that validated
facet counts and deployment step numbers.

Fixes Applied:

1. test/fixtures/infrastructure.fixture.ts (line 105)
   - Fixed method call from getBondFacets() to getBondFixedRateFacets()
   - Ensures fixture uses correct facet list for bond fixed rate configuration

2. test/scripts/unit/checkpoint/utils.test.ts
   - Line 138: Updated expected bond fixed rate facet count from 44 to 47
   - Line 391: Updated workflow step from "3/7" to "3/8" (new checkpoint write step added)
   - Line 459: Updated workflow step from "2/6" to "2/7" (new checkpoint write step added)

3. test/contracts/unit/resolver/diamondCutManager.test.ts
   - Lines 19-21: Shifted TEST_CONFIG_IDS to avoid conflict with BOND_FIXED_RATE_CONFIG_ID (0x03)
     * PAUSE_TEST: 0x03 → 0x04
     * PAUSE_BATCH_TEST: 0x04 → 0x05
     * BLACKLIST_TEST: 0x05 → 0x06
   - Lines 64-69: Added all test config IDs to cleanup array to ensure proper teardown

Results: All 948 tests now passing (all 7 failures resolved)

Test Coverage:
- Checkpoint utils validation: facet counts and workflow progression
- Infrastructure fixture: bond fixed rate facet initialization
- Diamond cut manager: config ID isolation and cleanup

Signed-off-by: Miguel_LZPF <[email protected]>
Integrates 4 commits from develop:
- Export utilities and deployment tracking enhancements
- TotalBalanceStorageWrapper base implementation (BBND-1224)
- Storage layout breaking change fix
- Scripts DEVELOPER_GUIDE documentation update

Combines coupon interest rate functionality with recent storage layer
improvements and documentation updates.

Resolved conflicts:
- BondStorageWrapper.sol: Kept coupon interest rate field (counponsOrderedListByIds)
- TotalBalancesStorageWrapper.sol: Used FixedRateStorageWrapper inheritance
  (includes PauseStorageWrapper via KpiLinkedRateStorageWrapper) with
  abstract _getTotalBalance method

Signed-off-by: Miguel_LZPF <[email protected]>
@hedera-eng-infrastructure
Copy link

hedera-eng-infrastructure commented Nov 24, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants