File tree Expand file tree Collapse file tree
main/agents/relayer/src/msg/metadata
sealevel/programs/ism/composite-ism/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ async fn build_metadata_from_spec_inner(
156156 }
157157
158158 CompositeIsmMetadataSpec :: Aggregation {
159- threshold : _ ,
159+ threshold,
160160 sub_specs,
161161 } => {
162162 let ism_count = sub_specs. len ( ) ;
@@ -169,6 +169,11 @@ async fn build_metadata_from_spec_inner(
169169 }
170170 }
171171
172+ let valid_count = sub_results. iter ( ) . filter ( |r| r. is_some ( ) ) . count ( ) ;
173+ if valid_count < * threshold as usize {
174+ return Err ( MetadataBuildError :: CouldNotFetch ) ;
175+ }
176+
172177 // Pack into aggregation format:
173178 // [start_0(4b)][end_0(4b)] ... [start_n(4b)][end_n(4b)] [data_0] [data_1] ...
174179 // (0,0) means no metadata for that ISM.
Original file line number Diff line number Diff line change @@ -83,9 +83,9 @@ pub enum IsmNode {
8383 /// verify time, so heap usage is O(1) and the number of supported domains is
8484 /// unlimited.
8585 ///
86- /// Each domain PDA is at seeds `[DOMAIN_ISM_SEED, &[table_id], & domain.to_le_bytes()]`.
87- /// The `table_id` field namespaces this routing table so that multiple `Routing`
88- /// nodes in the same ISM tree can coexist (e.g. inside an `Aggregation`) .
86+ /// Each domain PDA is at seeds `[DOMAIN_ISM_SEED, &domain.to_le_bytes()]`
87+ /// (see [`derive_domain_pda`]). At most one `Routing` node is allowed per ISM
88+ /// tree (enforced by `validate_config`), so no namespace field is needed .
8989 ///
9090 /// `RateLimited` inside a domain PDA is disallowed by `SetDomainIsm` validation
9191 /// (writeback requires the domain PDA to be writable, which is not supported).
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ pub fn update_config_instruction(
125125 program_id,
126126 data : Instruction :: UpdateConfig ( root) . encode ( ) ?,
127127 accounts : vec ! [
128- AccountMeta :: new ( owner, true ) ,
128+ AccountMeta :: new_readonly ( owner, true ) ,
129129 AccountMeta :: new( storage_pda_key, false ) ,
130130 ] ,
131131 } )
You can’t perform that action at this time.
0 commit comments