Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Koios] IndexOutofBoundException while getting protocol parameters #473

Closed
satran004 opened this issue Dec 13, 2024 · 0 comments
Closed
Assignees

Comments

@satran004
Copy link
Member

This is happening because of the recent cost model update, which added new built-ins to Plutus V3.

INFO  | 2024-12-13 14:43:31 | [Test worker] impl.BackendServiceImpl (BackendServiceImpl.java:64) - Koios URL: https://preprod.koios.rest/api/v1/

Index 251 out of bounds for length 251
java.lang.IndexOutOfBoundsException: Index 251 out of bounds for length 251
	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
	at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
	at java.base/java.util.Objects.checkIndex(Objects.java:372)
	at java.base/java.util.ArrayList.get(ArrayList.java:458)
	at com.bloxbean.cardano.client.backend.koios.KoiosEpochService.lambda$convertToCostModels$2(KoiosEpochService.java:249)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
	at com.bloxbean.cardano.client.backend.koios.KoiosEpochService.lambda$convertToCostModels$3(KoiosEpochService.java:247)
	at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
	at com.bloxbean.cardano.client.backend.koios.KoiosEpochService.convertToCostModels(KoiosEpochService.java:233)
	at com.bloxbean.cardano.client.backend.koios.KoiosEpochService.convertToProtocolParams(KoiosEpochService.java:177)
	at com.bloxbean.cardano.client.backend.koios.KoiosEpochService.getProtocolParameters(KoiosEpochService.java:107)
	at com.bloxbean.cardano.client.backend.api.DefaultProtocolParamsSupplier.getProtocolParams(DefaultProtocolParamsSupplier.java:19)
	at com.bloxbean.cardano.client.function.TxBuilderContext.<init>(TxBuilderContext.java:62)
	at com.bloxbean.cardano.client.function.TxBuilderContext.init(TxBuilderContext.java:260)
	at com.bloxbean.cardano.client.quicktx.QuickTxBuilder$TxContext.build(QuickTxBuilder.java:263)
	at com.bloxbean.cardano.client.quicktx.QuickTxBuilder$TxContext.buildAndSign(QuickTxBuilder.java:394)
	at com.bloxbean.cardano.client.quicktx.QuickTxBuilder$TxContext.complete(QuickTxBuilder.java:440)
	at com.bloxbean.cardano.client.quicktx.QuickTxBuilder$TxContext.completeAndWait(QuickTxBuilder.java:509)
	at com.bloxbean.cardano.client.quicktx.QuickTxBuilder$TxContext.completeAndWait(QuickTxBuilder.java:497)
	at com.bloxbean.cardano.client.quicktx.QuickTxBuilder$TxContext.completeAndWait(QuickTxBuilder.java:477)
@satran004 satran004 self-assigned this Dec 13, 2024
satran004 added a commit that referenced this issue Dec 13, 2024
satran004 added a commit that referenced this issue Dec 13, 2024
* fix: #473 use index nos if length of default plutus ops is not same as fetched values size.

* Next snapshot version
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

No branches or pull requests

1 participant