From 03c1985f533af2eceab01ca74eca31a144321329 Mon Sep 17 00:00:00 2001 From: wojciechos Date: Tue, 4 Jun 2024 19:31:43 +0200 Subject: [PATCH] Update trace fallback to v0.13.1 (#1890) --- rpc/trace.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/rpc/trace.go b/rpc/trace.go index e3dd09617a..7766cb7919 100644 --- a/rpc/trace.go +++ b/rpc/trace.go @@ -15,7 +15,9 @@ import ( "github.com/NethermindEth/juno/vm" ) -var traceFallbackVersion = semver.MustParse("0.12.3") +var traceFallbackVersion = semver.MustParse("0.13.1") + +const excludedVersion = "0.13.1.1" func adaptBlockTrace(block *BlockWithTxs, blockTrace *starknet.BlockTrace) ([]TracedBlockTransaction, error) { if blockTrace == nil { @@ -198,8 +200,9 @@ func (h *Handler) traceBlockTransactions(ctx context.Context, block *core.Block, if !isPending { if blockVer, err := core.ParseBlockVersion(block.ProtocolVersion); err != nil { return nil, ErrUnexpectedError.CloneWithData(err.Error()) - } else if blockVer.Compare(traceFallbackVersion) != 1 || h.forceFeederTracesForBlocks.Contains(block.Number) { - // version <= 0.12.3 or forcing fetch some blocks from feeder gateway + } else if (blockVer.Compare(traceFallbackVersion) != 1 && block.ProtocolVersion != excludedVersion) || + h.forceFeederTracesForBlocks.Contains(block.Number) { + // version <= 0.13.1 and not 0.13.1.1 or forcing fetch some blocks from feeder gateway return h.fetchTraces(ctx, block.Hash) }