diff --git a/arbitrum/multigas/doc.go b/arbitrum/multigas/doc.go new file mode 100644 index 0000000000..98d3b75f31 --- /dev/null +++ b/arbitrum/multigas/doc.go @@ -0,0 +1,7 @@ +// Package multigas defines multi-dimensional gas for the EVM. +// +// This package introduces mechanisms to track each resource used by the EVM separately. The +// possible resources are computation, history growth, storage access, and storage growth. By +// tracking each one individually and setting specific constraints, we can increase the overall gas +// target for the chain. +package multigas diff --git a/arbitrum/multigas/resources.go b/arbitrum/multigas/resources.go new file mode 100644 index 0000000000..c7020ca941 --- /dev/null +++ b/arbitrum/multigas/resources.go @@ -0,0 +1,16 @@ +package multigas + +// ResourceKind represents a dimension for the multi-dimensional gas. +type ResourceKind uint8 + +const ( + ResourceKindUnknown ResourceKind = iota + ResourceKindComputation + ResourceKindHistoryGrowth + ResourceKindStorageAccess + ResourceKindStorageGrowth + NumResourceKind +) + +// MultiGas tracks gas for each resource separately. +type MultiGas [NumResourceKind]uint64