Skip to content

Commit d2b0085

Browse files
Eliminate authenticated_caller_id from the OperationContext (#4371)
## Motivation It is not used and not set to any other value than `None`. ## Proposal Straight removal. I am not 100% sure, but I think that it is not an error that it is not used. The `authenticated_caller_id` is instead available via the call_stack. ## Test Plan The CI. ## Release Plan - Nothing to do / These changes follow the usual release cycle. ## Links None.
1 parent 6035584 commit d2b0085

File tree

9 files changed

+0
-14
lines changed

9 files changed

+0
-14
lines changed

linera-chain/src/block_tracker.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ impl<'resources, 'blobs> BlockExecutionTracker<'resources, 'blobs> {
142142
height: self.block_height,
143143
round,
144144
authenticated_signer: self.authenticated_signer,
145-
authenticated_caller_id: None,
146145
timestamp: self.timestamp,
147146
};
148147
Box::pin(chain.execute_operation(

linera-core/src/unit_tests/wasm_worker_tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ where
262262
let operation_context = OperationContext {
263263
chain_id: creator_chain.id(),
264264
authenticated_signer: None,
265-
authenticated_caller_id: None,
266265
height: run_block.height,
267266
round: Some(0),
268267
timestamp: Timestamp::from(3),

linera-execution/src/execution.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ where
9292
let context = OperationContext {
9393
chain_id,
9494
authenticated_signer: None,
95-
authenticated_caller_id: None,
9695
height: application_description.block_height,
9796
round: None,
9897
timestamp: local_time,

linera-execution/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -412,10 +412,6 @@ pub struct OperationContext {
412412
/// The authenticated signer of the operation, if any.
413413
#[debug(skip_if = Option::is_none)]
414414
pub authenticated_signer: Option<AccountOwner>,
415-
/// `None` if this is the transaction entrypoint or the caller doesn't want this particular
416-
/// call to be authenticated (e.g. for safety reasons).
417-
#[debug(skip_if = Option::is_none)]
418-
pub authenticated_caller_id: Option<ApplicationId>,
419415
/// The current block height.
420416
pub height: BlockHeight,
421417
/// The consensus round number, if this is a block that gets validated in a multi-leader round.

linera-execution/src/test_utils/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ pub fn create_dummy_operation_context(chain_id: ChainId) -> OperationContext {
118118
height: BlockHeight(0),
119119
round: Some(0),
120120
authenticated_signer: None,
121-
authenticated_caller_id: None,
122121
timestamp: Default::default(),
123122
}
124123
}

linera-execution/src/unit_tests/system_tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ async fn new_view_and_context() -> (
1919
let context = OperationContext {
2020
chain_id: ChainId::from(&description),
2121
authenticated_signer: None,
22-
authenticated_caller_id: None,
2322
height: BlockHeight::from(7),
2423
round: Some(0),
2524
timestamp: Default::default(),

linera-execution/tests/revm.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ async fn test_fuel_for_counter_revm_application() -> anyhow::Result<()> {
8686
height: BlockHeight(0),
8787
round: Some(0),
8888
authenticated_signer: None,
89-
authenticated_caller_id: None,
9089
timestamp: Default::default(),
9190
};
9291

@@ -210,7 +209,6 @@ async fn test_terminate_execute_operation_by_lack_of_fuel() -> anyhow::Result<()
210209
height: BlockHeight(0),
211210
round: Some(0),
212211
authenticated_signer: None,
213-
authenticated_caller_id: None,
214212
timestamp: Default::default(),
215213
};
216214

@@ -387,7 +385,6 @@ async fn test_basic_evm_features() -> anyhow::Result<()> {
387385
height: BlockHeight(0),
388386
round: Some(0),
389387
authenticated_signer: None,
390-
authenticated_caller_id: None,
391388
timestamp: Default::default(),
392389
};
393390

linera-execution/tests/test_system_execution.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ async fn test_simple_system_operation() -> anyhow::Result<()> {
4949
height: BlockHeight(0),
5050
round: Some(0),
5151
authenticated_signer: Some(owner),
52-
authenticated_caller_id: None,
5352
timestamp: Default::default(),
5453
};
5554
let mut controller = ResourceController::default();

linera-execution/tests/wasm.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ async fn test_fuel_for_counter_wasm_application(
7272
height: BlockHeight(0),
7373
round: Some(0),
7474
authenticated_signer: None,
75-
authenticated_caller_id: None,
7675
timestamp: Default::default(),
7776
};
7877
let increments = [2_u64, 9, 7, 1000];

0 commit comments

Comments
 (0)