Skip to content

v1.22.0

Latest

Choose a tag to compare

@edridudi edridudi released this 12 Sep 15:44
· 11 commits to main since this release
394ed90

Aligns the client with Koios v1.4.2 and fixes five bugs, three of which made calls throw.

Fixed

getProposalList threw on every call. proposal_list.withdrawal became an array of objects keyed by stake_address; the model expected a single object keyed by stake_addr, so Jackson threw MismatchedInputException. ProposalProcedure.withdrawal had the same key mismatch and silently returned null. (#192)

tx_info threw on any ParameterChange proposal. ProposalProcedure.paramProposal was List<Object>, but the API returns a JSON object. (#192)

proposal_voting_summary threw on every real proposal. The two passive vote-power fields are lovelace strings past Integer.MAX_VALUE but were typed Integer. (#192)

getLatestEpochInfo returned stale data. Without an explicit sort it returned whatever row came back first — epoch 553 while the chain tip was 655, roughly two years behind, silently. getLatestEpochParameters had the same flaw. Thanks @skisel-bt. (#191)

The retry backoff was 1000x too short. sleep() takes milliseconds but was handed seconds, so the default 60s wait was really 60ms — the client hammered rate-limited endpoints and burned every retry in under a second. Separately, retriesCount was an exclusive loop bound, so only retriesCount - 1 attempts were made and KOIOS_JAVA_LIB_RETRIES_COUNT=1 issued no request at all. (#205)

Breaking

Several getters changed. The first two never bound anything and always returned null:

Before After
CommitteeMember.getCcHotd() getCcHotId()
DRepInfo.getRegistered() (Boolean) getDrepStatus() (String)
Proposal.getWithdrawal() (TxWithdrawal) List<ProposalWithdrawal>
ProposalProcedure.getWithdrawal() List<ProposalWithdrawal>
ProposalProcedure.getParamProposal() (List<Object>) JsonNode
ProposalVotingSummary passive vote power getters (Integer) String

NetworkService gains getEraSummaries, which breaks external implementors of the interface.

Retry timing now behaves as documented. A rate-limited call can take up to ~10 minutes across five attempts instead of failing in under a second. Tune with KOIOS_JAVA_LIB_RETRY_SLEEP_TIME_SEC (floor lowered from 60s to 1s) and KOIOS_JAVA_LIB_RETRIES_COUNT.

Added

era_summaries endpoint (NetworkService.getEraSummaries), plus fields the API returns that the models were dropping silently: Proposal.previousGovActionProposalId, DRepInfo.liveDelegatorCount, Asset.assetNameAscii, AssetSummary.fingerprint, DRepMetadata.bytes, era on Tip/EpochInfo/EpochParams/EpochBlockProtocols/BlockInfo, Totals treasury/reserve withdrawal and donation fields, PoolCalidusKey.registered and .bytes, and validContract on RawTx/BlockTxCbor.

Install

<dependency>
    <groupId>io.github.cardano-community</groupId>
    <artifactId>koios-java-client</artifactId>
    <version>1.22.0</version>
</dependency>

Internal

MockWebServer harness covering error paths and the retry loop (#205, first step of #6). Dependency updates: jackson-databind 2.18.10, bcprov-jdk15to18 1.86, lombok 1.18.48, slf4j 2.0.19, compiler plugin 3.16.0, source plugin 3.4.0 (#203, #204). Dependabot no longer proposes JUnit majors, which require Java 17 (#197).

Full changelog: v1.21.1...v1.22.0