Skip to content

Prevent invalid changes to enums - #4463

Merged
turbolent merged 6 commits into
masterfrom
bastian/improve-enums
Apr 8, 2026
Merged

turbolent merged 6 commits into
masterfrom
bastian/improve-enums

Conversation

@turbolent

Copy link
Copy Markdown
Member

Description

Several "enum" types in the codebase use iota-based const blocks where the numeric values are part of the on-disk or on-wire format (CBOR encoding of values, storage domains, computation metering, hashing). If a value is accidentally changed (e.g by reordering, inserting a new case in the middle, removing a case, or replacing a _ placeholder), it silently breaks backward compatibility.

For example, I had accidentally added a new computation kind in e1e6728, which shifted/changed the value of the following existing kinds.

We already had some minimal protection, for some types, which caught e.g. appended cases but missed:

  • Value drift / existing constant's value changes (e.g. by inserting a case before it)
  • Replaced placeholders: a _ is replaced with a new named case (count stays the same)
  • Missing coverage: several enum types had no snapshot tests at all (StorageDomain, ComputationKind, values.CBORTag, ccf.CBORTag)

This PR improves the enums with additional comments and adds more comprehensive tests:

  • Prevent changes of values for existing values, by asserting value of every named constant in 6 enum types: PrimitiveStaticType, StorageDomain, ComputationKind, HashInputType, values.CBORTag, ccf.CBORTag
  • Detect introduction of new cases when existing _ placeholders are replaces
  • Detect introduction of new cases when they are added at the end
    • Added _Count constants where missing (StorageDomain, ComputationKind)
  • Added String() functions using stringer where missing (StorageDomain, HashInputType)
  • Introduced type CBORTag byte for both values.CBORTag and ccf.CBORTag, which were previously untyped constants, enabling stringer generation and type safety
  • Moved values.CBORTag test from interpreter/encoding_test.go to values/encode_test.go

This catches the following

  • Value of existing constant changes: Per-value require.Equal fails
  • New case appended: _Count value assertion fails
  • _ placeholder replaced with named case: Stringer loop detects non-numeric String()
  • Existing case removed: Per-value assertion fails (constant no longer exists → compile error)

I verified the prevention of invalid changes, e.g. by adding a new ComputationKind by replacing an existing _ placeholder. This causes a test failure after go generate.


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@github-actions

github-actions Bot commented Apr 8, 2026 •

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 057e7a9.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

@github-actions

github-actions Bot commented Apr 8, 2026 •

Copy link
Copy Markdown

Benchstat comparison

  • Base branch: onflow:master
  • Base commit: eb6737f
Results

old.txtnew.txt
time/opdelta
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ByteArrayTransfer-41.20µs ± 0%1.19µs ± 0%~(p=1.000 n=1+1)
ByteArrayValueToByteSlice-483.0ns ± 0%80.6ns ± 0%~(p=1.000 n=1+1)
ByteSliceToByteArrayValue-4994ns ± 0%1033ns ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ContractFunctionInvocation-4360µs ± 0%357µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/encoding/ccf goos:linux goarch:amd64
DecodeBatchEventsCCF-4125ms ± 0%126ms ± 0%~(p=1.000 n=1+1)
DecodeBatchEventsJSON-4412ms ± 0%409ms ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowFees.FeesDeducted-42.82µs ± 0%2.82µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowFees.TokensWithdrawn-42.12µs ± 0%2.09µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-42.90µs ± 0%2.87µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-43.15µs ± 0%3.11µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowIDTableStaking.NewWeeklyPayout-42.13µs ± 0%2.12µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowIDTableStaking.RewardsPaid-42.47µs ± 0%2.48µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowToken.TokensDeposited-42.58µs ± 0%2.55µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowToken.TokensDeposited_with_nil_receiver-42.48µs ± 0%2.47µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowToken.TokensMinted-42.11µs ± 0%2.08µs ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowToken.TokensWithdrawn-42.53µs ± 0%2.60µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowFees.FeesDeducted-410.0µs ± 0%10.0µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowFees.TokensWithdrawn-45.89µs ± 0%5.83µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-49.20µs ± 0%9.13µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-412.4µs ± 0%12.3µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowIDTableStaking.NewWeeklyPayout-46.07µs ± 0%5.95µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowIDTableStaking.RewardsPaid-47.87µs ± 0%7.70µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowToken.TokensDeposited-48.18µs ± 0%8.10µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowToken.TokensDeposited_with_nil_receiver-47.43µs ± 0%7.29µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowToken.TokensMinted-45.97µs ± 0%5.91µs ± 0%~(p=1.000 n=1+1)
DecodeJSON/FlowToken.TokensWithdrawn-48.14µs ± 0%8.04µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
EMVAddressTransfer-43.47µs ± 0%3.32µs ± 0%~(p=1.000 n=1+1)
Emit-44.49ms ± 0%4.61ms ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/encoding/ccf goos:linux goarch:amd64
EncodeBatchEventsCCF-481.9ms ± 0%81.8ms ± 0%~(p=1.000 n=1+1)
EncodeBatchEventsJSON-491.7ms ± 0%91.9ms ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowFees.FeesDeducted-41.83µs ± 0%1.83µs ± 0%~(all equal)
EncodeCCF/FlowFees.TokensWithdrawn-41.45µs ± 0%1.44µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-41.79µs ± 0%1.79µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-42.10µs ± 0%2.07µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.NewWeeklyPayout-41.52µs ± 0%1.49µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowIDTableStaking.RewardsPaid-41.64µs ± 0%1.65µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensDeposited-41.64µs ± 0%1.65µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensDeposited_with_nil_receiver-41.62µs ± 0%1.65µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensMinted-41.45µs ± 0%1.45µs ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowToken.TokensWithdrawn-41.64µs ± 0%1.66µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowFees.FeesDeducted-42.14µs ± 0%2.12µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowFees.TokensWithdrawn-41.25µs ± 0%1.25µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-41.93µs ± 0%1.94µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-42.61µs ± 0%2.60µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowIDTableStaking.NewWeeklyPayout-41.27µs ± 0%1.28µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowIDTableStaking.RewardsPaid-41.62µs ± 0%1.65µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowToken.TokensDeposited-41.88µs ± 0%1.89µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowToken.TokensDeposited_with_nil_receiver-41.47µs ± 0%1.48µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowToken.TokensMinted-41.24µs ± 0%1.26µs ± 0%~(p=1.000 n=1+1)
EncodeJSON/FlowToken.TokensWithdrawn-41.86µs ± 0%1.88µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
EnumTransfer-41.41µs ± 0%1.38µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ExportType/composite_type-4243ns ± 0%245ns ± 0%~(p=1.000 n=1+1)
ExportType/simple_type-474.6ns ± 0%75.2ns ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ImperativeFib-420.3µs ± 0%20.4µs ± 0%~(p=1.000 n=1+1)
InterpretRecursionFib-42.12ms ± 0%2.18ms ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_interpreter-4901ns ± 0%830ns ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_sub-interpreter-4322ns ± 0%340ns ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
RuntimeFungibleTokenTransferInterpreter-4583µs ± 0%603µs ± 0%~(p=1.000 n=1+1)
RuntimeFungibleTokenTransferVM-4679µs ± 0%659µs ± 0%~(p=1.000 n=1+1)
RuntimeResourceDictionaryValues-42.61ms ± 0%2.59ms ± 0%~(p=1.000 n=1+1)
RuntimeResourceTracking-49.28ms ± 0%9.91ms ± 0%~(p=1.000 n=1+1)
RuntimeScriptNoop-414.8µs ± 0%14.2µs ± 0%~(p=1.000 n=1+1)
RuntimeVMInvokeContractImperativeFib-436.7µs ± 0%36.9µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ValueIsSubtypeOfSemaType-459.0ns ± 0%60.0ns ± 0%~(p=1.000 n=1+1)
 
alloc/opdelta
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ByteArrayTransfer-41.08kB ± 0%1.08kB ± 0%~(p=1.000 n=1+1)
ByteArrayValueToByteSlice-432.0B ± 0%32.0B ± 0%~(all equal)
ByteSliceToByteArrayValue-4851B ± 0%865B ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ContractFunctionInvocation-4144kB ± 0%144kB ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/encoding/ccf goos:linux goarch:amd64
DecodeBatchEventsCCF-471.5MB ± 0%71.5MB ± 0%~(p=1.000 n=1+1)
DecodeBatchEventsJSON-4262MB ± 0%262MB ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowFees.FeesDeducted-41.50kB ± 0%1.50kB ± 0%~(all equal)
DecodeCCF/FlowFees.TokensWithdrawn-41.31kB ± 0%1.31kB ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-41.58kB ± 0%1.58kB ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-41.60kB ± 0%1.60kB ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.NewWeeklyPayout-41.36kB ± 0%1.36kB ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.RewardsPaid-41.48kB ± 0%1.48kB ± 0%~(all equal)
DecodeCCF/FlowToken.TokensDeposited-41.42kB ± 0%1.42kB ± 0%~(all equal)
DecodeCCF/FlowToken.TokensDeposited_with_nil_receiver-41.41kB ± 0%1.41kB ± 0%~(all equal)
DecodeCCF/FlowToken.TokensMinted-41.31kB ± 0%1.31kB ± 0%~(all equal)
DecodeCCF/FlowToken.TokensWithdrawn-41.43kB ± 0%1.43kB ± 0%~(all equal)
DecodeJSON/FlowFees.FeesDeducted-46.37kB ± 0%6.37kB ± 0%~(all equal)
DecodeJSON/FlowFees.TokensWithdrawn-43.84kB ± 0%3.84kB ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-45.82kB ± 0%5.82kB ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-47.80kB ± 0%7.80kB ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.NewWeeklyPayout-43.90kB ± 0%3.90kB ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.RewardsPaid-44.86kB ± 0%4.86kB ± 0%~(all equal)
DecodeJSON/FlowToken.TokensDeposited-45.23kB ± 0%5.23kB ± 0%~(all equal)
DecodeJSON/FlowToken.TokensDeposited_with_nil_receiver-44.78kB ± 0%4.78kB ± 0%~(all equal)
DecodeJSON/FlowToken.TokensMinted-43.86kB ± 0%3.86kB ± 0%~(all equal)
DecodeJSON/FlowToken.TokensWithdrawn-45.23kB ± 0%5.23kB ± 0%~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
EMVAddressTransfer-42.44kB ± 0%2.44kB ± 0%~(p=1.000 n=1+1)
Emit-41.49MB ± 0%1.49MB ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/encoding/ccf goos:linux goarch:amd64
EncodeBatchEventsCCF-465.8MB ± 0%65.8MB ± 0%~(p=1.000 n=1+1)
EncodeBatchEventsJSON-440.7MB ± 0%40.7MB ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowFees.FeesDeducted-41.29kB ± 0%1.29kB ± 0%~(all equal)
EncodeCCF/FlowFees.TokensWithdrawn-41.24kB ± 0%1.24kB ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-41.51kB ± 0%1.51kB ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-41.48kB ± 0%1.48kB ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.NewWeeklyPayout-41.42kB ± 0%1.42kB ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.RewardsPaid-41.50kB ± 0%1.50kB ± 0%~(all equal)
EncodeCCF/FlowToken.TokensDeposited-41.29kB ± 0%1.29kB ± 0%~(all equal)
EncodeCCF/FlowToken.TokensDeposited_with_nil_receiver-41.27kB ± 0%1.27kB ± 0%~(all equal)
EncodeCCF/FlowToken.TokensMinted-41.24kB ± 0%1.24kB ± 0%~(all equal)
EncodeCCF/FlowToken.TokensWithdrawn-41.29kB ± 0%1.29kB ± 0%~(all equal)
EncodeJSON/FlowFees.FeesDeducted-4896B ± 0%896B ± 0%~(all equal)
EncodeJSON/FlowFees.TokensWithdrawn-4536B ± 0%536B ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-4920B ± 0%920B ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-41.11kB ± 0%1.11kB ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.NewWeeklyPayout-4584B ± 0%584B ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.RewardsPaid-4784B ± 0%784B ± 0%~(all equal)
EncodeJSON/FlowToken.TokensDeposited-4808B ± 0%808B ± 0%~(all equal)
EncodeJSON/FlowToken.TokensDeposited_with_nil_receiver-4672B ± 0%672B ± 0%~(all equal)
EncodeJSON/FlowToken.TokensMinted-4544B ± 0%544B ± 0%~(all equal)
EncodeJSON/FlowToken.TokensWithdrawn-4800B ± 0%800B ± 0%~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
EnumTransfer-4828B ± 0%828B ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ExportType/composite_type-4120B ± 0%120B ± 0%~(all equal)
ExportType/simple_type-40.00B 0.00B ~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ImperativeFib-48.30kB ± 0%8.30kB ± 0%~(all equal)
InterpretRecursionFib-41.19MB ± 0%1.19MB ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_interpreter-4976B ± 0%976B ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-4232B ± 0%232B ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
RuntimeFungibleTokenTransferInterpreter-4165kB ± 0%165kB ± 0%~(p=1.000 n=1+1)
RuntimeFungibleTokenTransferVM-4188kB ± 0%188kB ± 0%~(p=1.000 n=1+1)
RuntimeResourceDictionaryValues-41.76MB ± 0%1.76MB ± 0%~(p=1.000 n=1+1)
RuntimeResourceTracking-46.97MB ± 0%6.97MB ± 0%~(p=1.000 n=1+1)
RuntimeScriptNoop-48.09kB ± 0%8.09kB ± 0%~(p=1.000 n=1+1)
RuntimeVMInvokeContractImperativeFib-413.4kB ± 0%13.4kB ± 0%~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ValueIsSubtypeOfSemaType-432.0B ± 0%32.0B ± 0%~(all equal)
 
allocs/opdelta
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ByteArrayTransfer-47.00 ± 0%7.00 ± 0%~(all equal)
ByteArrayValueToByteSlice-41.00 ± 0%1.00 ± 0%~(all equal)
ByteSliceToByteArrayValue-45.00 ± 0%5.00 ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ContractFunctionInvocation-42.25k ± 0%2.25k ± 0%~(all equal)
pkg:github.com/onflow/cadence/encoding/ccf goos:linux goarch:amd64
DecodeBatchEventsCCF-41.53M ± 0%1.53M ± 0%~(p=1.000 n=1+1)
DecodeBatchEventsJSON-45.44M ± 0%5.44M ± 0%~(p=1.000 n=1+1)
DecodeCCF/FlowFees.FeesDeducted-431.0 ± 0%31.0 ± 0%~(all equal)
DecodeCCF/FlowFees.TokensWithdrawn-427.0 ± 0%27.0 ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-431.0 ± 0%31.0 ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-433.0 ± 0%33.0 ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.NewWeeklyPayout-427.0 ± 0%27.0 ± 0%~(all equal)
DecodeCCF/FlowIDTableStaking.RewardsPaid-430.0 ± 0%30.0 ± 0%~(all equal)
DecodeCCF/FlowToken.TokensDeposited-432.0 ± 0%32.0 ± 0%~(all equal)
DecodeCCF/FlowToken.TokensDeposited_with_nil_receiver-430.0 ± 0%30.0 ± 0%~(all equal)
DecodeCCF/FlowToken.TokensMinted-427.0 ± 0%27.0 ± 0%~(all equal)
DecodeCCF/FlowToken.TokensWithdrawn-432.0 ± 0%32.0 ± 0%~(all equal)
DecodeJSON/FlowFees.FeesDeducted-4142 ± 0%142 ± 0%~(all equal)
DecodeJSON/FlowFees.TokensWithdrawn-479.0 ± 0%79.0 ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-4118 ± 0%118 ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-4179 ± 0%179 ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.NewWeeklyPayout-478.0 ± 0%78.0 ± 0%~(all equal)
DecodeJSON/FlowIDTableStaking.RewardsPaid-499.0 ± 0%99.0 ± 0%~(all equal)
DecodeJSON/FlowToken.TokensDeposited-4110 ± 0%110 ± 0%~(all equal)
DecodeJSON/FlowToken.TokensDeposited_with_nil_receiver-498.0 ± 0%98.0 ± 0%~(all equal)
DecodeJSON/FlowToken.TokensMinted-479.0 ± 0%79.0 ± 0%~(all equal)
DecodeJSON/FlowToken.TokensWithdrawn-4110 ± 0%110 ± 0%~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
EMVAddressTransfer-429.0 ± 0%29.0 ± 0%~(all equal)
Emit-440.0k ± 0%40.0k ± 0%~(all equal)
pkg:github.com/onflow/cadence/encoding/ccf goos:linux goarch:amd64
EncodeBatchEventsCCF-41.00M ± 0%1.00M ± 0%~(p=1.000 n=1+1)
EncodeBatchEventsJSON-4902k ± 0%902k ± 0%~(p=1.000 n=1+1)
EncodeCCF/FlowFees.FeesDeducted-420.0 ± 0%20.0 ± 0%~(all equal)
EncodeCCF/FlowFees.TokensWithdrawn-420.0 ± 0%20.0 ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.DelegatorRewardsPaid-420.0 ± 0%20.0 ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.EpochTotalRewardsPaid-420.0 ± 0%20.0 ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.NewWeeklyPayout-420.0 ± 0%20.0 ± 0%~(all equal)
EncodeCCF/FlowIDTableStaking.RewardsPaid-420.0 ± 0%20.0 ± 0%~(all equal)
EncodeCCF/FlowToken.TokensDeposited-421.0 ± 0%21.0 ± 0%~(all equal)
EncodeCCF/FlowToken.TokensDeposited_with_nil_receiver-421.0 ± 0%21.0 ± 0%~(all equal)
EncodeCCF/FlowToken.TokensMinted-420.0 ± 0%20.0 ± 0%~(all equal)
EncodeCCF/FlowToken.TokensWithdrawn-421.0 ± 0%21.0 ± 0%~(all equal)
EncodeJSON/FlowFees.FeesDeducted-420.0 ± 0%20.0 ± 0%~(all equal)
EncodeJSON/FlowFees.TokensWithdrawn-413.0 ± 0%13.0 ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.DelegatorRewardsPaid-417.0 ± 0%17.0 ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.EpochTotalRewardsPaid-426.0 ± 0%26.0 ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.NewWeeklyPayout-413.0 ± 0%13.0 ± 0%~(all equal)
EncodeJSON/FlowIDTableStaking.RewardsPaid-416.0 ± 0%16.0 ± 0%~(all equal)
EncodeJSON/FlowToken.TokensDeposited-420.0 ± 0%20.0 ± 0%~(all equal)
EncodeJSON/FlowToken.TokensDeposited_with_nil_receiver-415.0 ± 0%15.0 ± 0%~(all equal)
EncodeJSON/FlowToken.TokensMinted-414.0 ± 0%14.0 ± 0%~(all equal)
EncodeJSON/FlowToken.TokensWithdrawn-419.0 ± 0%19.0 ± 0%~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
EnumTransfer-413.0 ± 0%13.0 ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ExportType/composite_type-43.00 ± 0%3.00 ± 0%~(all equal)
ExportType/simple_type-40.00 0.00 ~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ImperativeFib-4176 ± 0%176 ± 0%~(all equal)
InterpretRecursionFib-417.7k ± 0%17.7k ± 0%~(all equal)
NewInterpreter/new_interpreter-415.0 ± 0%15.0 ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-44.00 ± 0%4.00 ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
RuntimeFungibleTokenTransferInterpreter-43.08k ± 0%3.08k ± 0%~(all equal)
RuntimeFungibleTokenTransferVM-43.61k ± 0%3.61k ± 0%~(all equal)
RuntimeResourceDictionaryValues-436.7k ± 0%36.7k ± 0%~(all equal)
RuntimeResourceTracking-4129k ± 0%129k ± 0%~(p=1.000 n=1+1)
RuntimeScriptNoop-4114 ± 0%114 ± 0%~(all equal)
RuntimeVMInvokeContractImperativeFib-4426 ± 0%426 ± 0%~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ValueIsSubtypeOfSemaType-41.00 ± 0%1.00 ± 0%~(all equal)
 

@turbolent
turbolent merged commit b585d8d into master Apr 8, 2026
17 of 20 checks passed
@turbolent
turbolent deleted the bastian/improve-enums branch April 8, 2026 15:58
@turbolent turbolent mentioned this pull request Apr 17, 2026
6 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址