Skip to content

Node 10.7 integration#1050

Draft
geo2a wants to merge 16 commits intomasterfrom
geo2a/10.7-integration
Draft

Node 10.7 integration#1050
geo2a wants to merge 16 commits intomasterfrom
geo2a/10.7-integration

Conversation

@geo2a
Copy link

@geo2a geo2a commented Dec 9, 2025

This PR brings the new Ledger and Consensus packages and attempts to integrate them into API.

@geo2a geo2a force-pushed the geo2a/10.7-integration branch from 6938982 to e695dcc Compare December 9, 2025 15:51
@geo2a geo2a force-pushed the geo2a/10.7-integration branch from 2f79591 to 463b9e8 Compare December 22, 2025 14:42
@geo2a geo2a force-pushed the geo2a/10.7-integration branch from 463b9e8 to eed7d01 Compare January 2, 2026 08:58
@carbolymer carbolymer force-pushed the geo2a/10.7-integration branch from 0679166 to ae8a93f Compare January 5, 2026 07:52
, Plutus.EraPlutusContext (ShelleyLedgerEra era)
, L.Script (ShelleyLedgerEra era) ~ L.AlonzoScript (ShelleyLedgerEra era)
, L.ScriptsNeeded (ShelleyLedgerEra era) ~ L.AlonzoScriptsNeeded (ShelleyLedgerEra era)
, L.ShelleyEraTxCert (ShelleyLedgerEra era)
Copy link
Contributor

@carbolymer carbolymer Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% convinced about this change. Depending on the legacy certificates support, we might need to revert this and split AlonzoEraOnwardsConstraints into two:

  1. from Alonzo to Conway including ShelleyEraTxCert
  2. from Dijkstra onwards.

This needs to be double checked and if anything pops out during cardano-cli integration.

@geo2a geo2a self-assigned this Jan 30, 2026
@geo2a geo2a force-pushed the geo2a/10.7-integration branch 2 times, most recently from 91d8ca3 to 12fbb1e Compare February 2, 2026 16:00
@geo2a geo2a force-pushed the geo2a/10.7-integration branch from 12fbb1e to 88149e9 Compare February 6, 2026 08:25
@Jimbo4350 Jimbo4350 mentioned this pull request Feb 9, 2026
3 tasks
@geo2a geo2a force-pushed the geo2a/10.7-integration branch 6 times, most recently from 6227b26 to 89109c0 Compare February 12, 2026 18:13
@geo2a geo2a force-pushed the geo2a/10.7-integration branch 3 times, most recently from 46864d5 to 8711784 Compare February 19, 2026 10:07
@geo2a geo2a force-pushed the geo2a/10.7-integration branch from 8711784 to c476239 Compare February 19, 2026 11:26
(Consensus.GetCBOR (Consensus.GetStakeSnapshots (fmap (Set.map unStakePoolKeyHash) mPoolIds)))
caseShelleyToBabbageOrConwayEraOnwards
(const $ error "toConsensusQueryShelleyBased: QueryStakeSnapshot is only available in the Conway era")
( const $

Check notice

Code scanning / HLint

Redundant $ Note

cardano-api/src/Cardano/Api/Query/Internal/Type/QueryInMode.hs:624:15: Suggestion: Redundant $
  
Found:
  const
    $ (Some
         (consensusQueryInEraInMode
            era
            (Consensus.GetCBOR
               (Consensus.GetStakeSnapshots
                  (fmap (Set.map unStakePoolKeyHash) mPoolIds)))))
  
Perhaps:
  const
    (Some
       (consensusQueryInEraInMode
          era
          (Consensus.GetCBOR
             (Consensus.GetStakeSnapshots
                (fmap (Set.map unStakePoolKeyHash) mPoolIds)))))
Comment on lines +625 to +630
( Some
( consensusQueryInEraInMode
era
(Consensus.GetCBOR (Consensus.GetStakeSnapshots (fmap (Set.map unStakePoolKeyHash) mPoolIds)))
)
)

Check notice

Code scanning / HLint

Redundant bracket Note

cardano-api/src/Cardano/Api/Query/Internal/Type/QueryInMode.hs:(625,11)-(630,11): Suggestion: Redundant bracket
  
Found:
  const
    $ (Some
         (consensusQueryInEraInMode
            era
            (Consensus.GetCBOR
               (Consensus.GetStakeSnapshots
                  (fmap (Set.map unStakePoolKeyHash) mPoolIds)))))
  
Perhaps:
  const
    $ Some
        (consensusQueryInEraInMode
           era
           (Consensus.GetCBOR
              (Consensus.GetStakeSnapshots
                 (fmap (Set.map unStakePoolKeyHash) mPoolIds))))
( consensusQueryInEraInMode
era
(Consensus.GetCBOR (Consensus.GetStakeSnapshots (fmap (Set.map unStakePoolKeyHash) mPoolIds)))
caseShelleyToBabbageOrConwayEraOnwards
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lehins I'm integrating the move of the GetStakeSnapshot query implementation from Consensus to Ledger, and it seems a little more involved that you anticipated.

Specifically, I've had to introduce this change, because I've started seeing type errors about era bound. I think this is because you've added the SL.EraGov era in Consensus.

If I understand correctly, it means that this query would not be available in any era anymore, but rather only from Conway. This does not seem like a problem to me, as Mainnet is already in Conway. However, does it mean that we're loosing the capability to issue this query to a syncing node until it has reached Conway?

Copy link
Contributor

@lehins lehins Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is incorrect. EraGov instance is available in all eras, except byron of course
It is ConwayEraGov type class instanced that are only available in Conway onwards

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lehins! @Jimbo4350 @carbolymer could you guys have a loot at this code and help me to correctly integrate this change?

@geo2a geo2a force-pushed the geo2a/10.7-integration branch 3 times, most recently from fd21353 to 71e925a Compare February 26, 2026 10:00
@geo2a geo2a force-pushed the geo2a/10.7-integration branch from 71c97b6 to 0dab4b5 Compare February 26, 2026 17:59
geo2a and others added 13 commits February 26, 2026 19:00
Co-authored-by: Georgy Lukyanov <georgy.lukyanov@iohk.io>
Co-authored-by: Javier Sagredo <jasataco@gmail.com>
update to cardano-crypto-class-2.3.1
- Introduce transaction levels
- Use `StrictMaybe` in transaction body
- Update key roles
- Replace Witness with Guard
- `PoolParams` -> `StakePoolParams`
- Remove redundant patterns in `Cardano.Api.Tx.Internal.Output.toShelleyTxOut`
- Add ledger lenses for `ChainAccountState` to exports from `Cardano.Api.Ledger`
- Rename Ledger's `PParams` fields
- Shelley.RewardAccount -> Shelley.AccountAddress
- Integrate `PoolMetadata` hash type change
- `Coin` -> `CompactCoin Coin`
- Use new name of the Constitution script hash
- Update CostModel JSON format
- Update ledger event patterns
@geo2a geo2a force-pushed the geo2a/10.7-integration branch from 0dab4b5 to 5407021 Compare February 26, 2026 18:00
@geo2a geo2a force-pushed the geo2a/10.7-integration branch from 5407021 to e3bb731 Compare February 26, 2026 18:02
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.

5 participants