Skip to content

Commit 03c1985

Browse files
authored
Update trace fallback to v0.13.1 (#1890)
1 parent e8f8d38 commit 03c1985

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

rpc/trace.go

+6-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ import (
1515
"github.com/NethermindEth/juno/vm"
1616
)
1717

18-
var traceFallbackVersion = semver.MustParse("0.12.3")
18+
var traceFallbackVersion = semver.MustParse("0.13.1")
19+
20+
const excludedVersion = "0.13.1.1"
1921

2022
func adaptBlockTrace(block *BlockWithTxs, blockTrace *starknet.BlockTrace) ([]TracedBlockTransaction, error) {
2123
if blockTrace == nil {
@@ -198,8 +200,9 @@ func (h *Handler) traceBlockTransactions(ctx context.Context, block *core.Block,
198200
if !isPending {
199201
if blockVer, err := core.ParseBlockVersion(block.ProtocolVersion); err != nil {
200202
return nil, ErrUnexpectedError.CloneWithData(err.Error())
201-
} else if blockVer.Compare(traceFallbackVersion) != 1 || h.forceFeederTracesForBlocks.Contains(block.Number) {
202-
// version <= 0.12.3 or forcing fetch some blocks from feeder gateway
203+
} else if (blockVer.Compare(traceFallbackVersion) != 1 && block.ProtocolVersion != excludedVersion) ||
204+
h.forceFeederTracesForBlocks.Contains(block.Number) {
205+
// version <= 0.13.1 and not 0.13.1.1 or forcing fetch some blocks from feeder gateway
203206
return h.fetchTraces(ctx, block.Hash)
204207
}
205208

0 commit comments

Comments
 (0)