-
Notifications
You must be signed in to change notification settings - Fork 274
Precompile pre post handling #524
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
Changes from 1 commit
6a3ebe1
9474829
0d2c92b
29277c5
83036b7
7e10491
dcfd120
584bcaa
73aee4b
2eff72e
e3c0899
cd79963
be31bea
67b7f7c
0d4ad9f
cde76df
ffdda86
e6d6d78
794122d
eb2bb88
2edac77
15bcbe8
485ed59
5fa5bb5
67116e0
972e486
9d5246c
336f0cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,23 +22,30 @@ type StatefulPrecompiledContract interface { | |
|
|
||
| // PredicateContext provides context to stateful precompile predicates | ||
| type PredicateContext struct { | ||
| SnowCtx *snow.Context | ||
| SnowCtx *snow.Context | ||
| // Note: ProposerVMBlockCtx may be nil if the Snowman Consensus Engine calls BuildBlock or Verify | ||
| // instead of BuildBlockWithContext or VerifyWithContext. | ||
| // In this case, it is up to the precompile to determine if a nil ProposerVMBlockCtx is valid. | ||
| ProposerVMBlockCtx *block.Context | ||
| } | ||
|
|
||
| // Predicater is an optional interface for StatefulPrecompiledContracts to implement. | ||
| // If implemented, the predicate will be enforced on every transaction in a block, prior to the block's execution. | ||
| // If VerifyPredicate returns an error, the block will fail verification with no further processing. | ||
| // WARNING: this is not intended to be used for custom precompiles. Backwards compatibility with custom precompiles that | ||
| // use the Predicater interface will not be supported. | ||
| // Note: ProposerVMBlockCtx may be nil if the engine does not specify it. In this case, | ||
| // it's up to the precompile to determine if a nil ProposerVMBlockCtx is valid. | ||
| // WARNING: If you are implementing a custom precompile, beware that subnet-evm | ||
| // will not maintain backwards compatibility of this interface and your code should not | ||
| // rely on this. Designed for use only by precompiles that ship with subnet-evm. | ||
| type Predicater interface { | ||
| VerifyPredicate(predicateContext *PredicateContext, storageSlots []byte) error | ||
| } | ||
|
|
||
| // Accepter is an optional interface for StatefulPrecompiledContracts to implement. | ||
| // If implemented, Accept will be called for every log with the address of the precompile when the block is accepted. | ||
| // WARNING: this is not intended to be used for custom precompiles. Backwards compatibility with custom precompiles that | ||
| // use the Accepter interface will not be supported. | ||
| // WARNING: If you are implementing a custom precompile, beware that subnet-evm | ||
| // will not maintain backwards compatibility of this interface and your code should not | ||
| // rely on this. Designed for use only by precompiles that ship with subnet-evm. | ||
| type Accepter interface { | ||
| Accept(txHash common.Hash, logIndex int, topics []common.Hash, logData []byte) error | ||
|
||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.