Skip to content

Commit

Permalink
restoring entry_point to payment execution
Browse files Browse the repository at this point in the history
  • Loading branch information
EdHastingsCasperAssociation committed Apr 1, 2024
1 parent 05becbf commit 1c53766
Show file tree
Hide file tree
Showing 24 changed files with 488 additions and 311 deletions.
19 changes: 7 additions & 12 deletions execution_engine/src/engine_state/execution_kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,36 +49,31 @@ impl<'a> ExecutionKind<'a> {
R: StateReader<Key, StoredValue, Error = GlobalStateError>,
{
match executable_item {
ExecutableItem::Stored(target) => Self::new_stored(
ExecutableItem::Invocation(target) => Self::new_stored(
tracking_copy,
named_keys,
target,
entry_point,
protocol_version,
),
ExecutableItem::CustomPayment(module_bytes)
| ExecutableItem::SessionModuleBytes {
ExecutableItem::PaymentBytes(module_bytes)
| ExecutableItem::SessionBytes {
kind: TransactionSessionKind::Standard,
module_bytes,
} => Ok(ExecutionKind::Standard(module_bytes)),
ExecutableItem::SessionModuleBytes {
ExecutableItem::SessionBytes {
kind: TransactionSessionKind::Installer,
module_bytes,
} => Ok(ExecutionKind::Installer(module_bytes)),
ExecutableItem::SessionModuleBytes {
ExecutableItem::SessionBytes {
kind: TransactionSessionKind::Upgrader,
module_bytes,
} => Ok(ExecutionKind::Upgrader(module_bytes)),
ExecutableItem::SessionModuleBytes {
ExecutableItem::SessionBytes {
kind: TransactionSessionKind::Isolated,
module_bytes,
} => Ok(ExecutionKind::Isolated(module_bytes)),
ExecutableItem::DeploySessionModuleBytes(module_bytes) => {
Ok(ExecutionKind::Deploy(module_bytes))
}
ExecutableItem::StandardPayment => Err(Error::Deprecated(
"standard payment is no longer handled by the execution engine".to_string(),
)),
ExecutableItem::LegacyDeploy(module_bytes) => Ok(ExecutionKind::Deploy(module_bytes)),
}
}

Expand Down
2 changes: 1 addition & 1 deletion execution_engine/src/engine_state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ impl ExecutionEngineV1 {
entry_point,
args,
authorization_keys,
phase,
}: WasmV1Request,
) -> WasmV1Result {
// NOTE to core engineers: it is intended for the EE to ONLY execute wasm targeting the
Expand Down Expand Up @@ -112,7 +113,6 @@ impl ExecutionEngineV1 {
return WasmV1Result::precondition_failure(gas_limit, Error::TrackingCopy(tce))
}
};
let phase = executable_item.phase();
let execution_kind = match ExecutionKind::new(
&mut *tc.borrow_mut(),
&named_keys,
Expand Down
Loading

0 comments on commit 1c53766

Please sign in to comment.