diff --git a/docs/src/api/methods/_getStakeActivation.mdx b/docs/src/api/methods/_getStakeActivation.mdx index abd1d0bafb..28b2d8a814 100644 --- a/docs/src/api/methods/_getStakeActivation.mdx +++ b/docs/src/api/methods/_getStakeActivation.mdx @@ -41,6 +41,7 @@ Configuration object containing the following fields: epoch for which to calculate activation details. If parameter not provided, defaults to current epoch. + **DEPRECATED**, inputs other than the current epoch return an error. diff --git a/rpc/src/rpc.rs b/rpc/src/rpc.rs index 393c53b6a8..3e284b1f94 100644 --- a/rpc/src/rpc.rs +++ b/rpc/src/rpc.rs @@ -1719,14 +1719,10 @@ impl JsonRpcRequestProcessor { min_context_slot: config.min_context_slot, })?; let epoch = config.epoch.unwrap_or_else(|| bank.epoch()); - if bank.epoch().saturating_sub(epoch) > solana_sdk::stake_history::MAX_ENTRIES as u64 { + if epoch != bank.epoch() { return Err(Error::invalid_params(format!( - "Invalid param: epoch {epoch:?} is too far in the past" - ))); - } - if epoch > bank.epoch() { - return Err(Error::invalid_params(format!( - "Invalid param: epoch {epoch:?} has not yet started" + "Invalid param: epoch {epoch:?}. Only the current epoch ({:?}) is supported", + bank.epoch() ))); }