Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c8e5575
feat(context-config): implement context groups and migration support
rtb-12 Feb 18, 2026
995d3d2
feat(context-config): implement group management functionality
rtb-12 Feb 18, 2026
5e4cb25
feat(context-config): enhance context-group management with registrat…
rtb-12 Feb 19, 2026
1ece103
feat(context-config): implement target application management for con…
rtb-12 Feb 19, 2026
65b473d
feat(context-proxy): add proxy methods for group registration and unr…
rtb-12 Feb 19, 2026
4209eda
fix(Cargo.toml): update calimero-context-config dependency to use git…
rtb-12 Feb 19, 2026
a4d4f42
refactor(context-config): streamline code formatting and improve read…
rtb-12 Feb 19, 2026
fa8852e
refactor(context-config): improve function signatures and test assert…
rtb-12 Feb 19, 2026
20645f6
feat(context-config): enhance group management with nonce tracking an…
rtb-12 Feb 19, 2026
c00f21a
feat(context-config): add context registration approval functionality
rtb-12 Feb 19, 2026
a720981
feat(context-config): add context IDs tracking for group management
rtb-12 Feb 19, 2026
169bee6
refactor(context-config): clear group data during context reset
rtb-12 Feb 19, 2026
807a9e8
feat(context-proxy): update proxy_unregister_from_group to include gr…
rtb-12 Feb 19, 2026
308a927
feat(context-config): add fetch_group_nonce query method
rtb-12 Mar 4, 2026
a01fb00
feat(context-config): add group invitation commit/reveal contract logic
rtb-12 Mar 5, 2026
ec1e014
feat(context-config): add group_members view and join-context-via-group
rtb-12 Mar 5, 2026
d067199
feat(context-config): cascade group member removal to contexts
rtb-12 Mar 6, 2026
521f98d
fix(groups): propagate migration method on-chain for lazy upgrade peers
rtb-12 Mar 6, 2026
b1a9240
feat(context-config): add group permission system with capabilities a…
rtb-12 Mar 9, 2026
a93be63
test(context-config): add contract integration tests for group permis…
rtb-12 Mar 9, 2026
5833948
fix(context-config): address three BugBot issues in group management
rtb-12 Mar 17, 2026
370394b
fix(context-config): clean up visibility/allowlist on unregister and …
rtb-12 Mar 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ tokio = "1.35.1"

calimero-context-config-near = { path = "./contracts/near/context-config" }

[patch."https://github.com/calimero-network/core"]
calimero-context-config = { path = "../core/crates/context/config" }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local filesystem path patch committed in Cargo.toml

High Severity

The [patch] section overrides calimero-context-config with a local filesystem path (../core/crates/context/config). This breaks builds for anyone who doesn't have the core repo checked out at that exact relative path, including CI pipelines. The corresponding Cargo.lock also lost its git source line, confirming the override is active.

Fix in Cursor Fix in Web


[profile.release]
strip = "symbols"
lto = "fat"
Expand Down
1 change: 1 addition & 0 deletions contracts/near/context-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ migrations = []
## migrations (mutually exclusive) ##
01_guard_revisions = []
02_nonces = []
03_context_groups = []
## migrations (mutually exclusive) ##
32 changes: 31 additions & 1 deletion contracts/near/context-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
reason = "Needed to separate NEAR functionality"
)]

use calimero_context_config::types::{Application, ContextId, ContextIdentity};
use calimero_context_config::types::{
AppKey, Application, ContextGroupId, ContextId, ContextIdentity, SignerId,
};
use calimero_context_config::Timestamp;
use near_sdk::borsh::{BorshDeserialize, BorshSerialize};
use near_sdk::store::{IterableMap, IterableSet, LazyOption};
Expand All @@ -29,6 +31,8 @@ pub struct ContextConfigs {
proxy_code: LazyOption<Vec<u8>>,
proxy_code_hash: LazyOption<CryptoHash>,
next_proxy_id: u64,
groups: IterableMap<ContextGroupId, OnChainGroupMeta>,
context_group_refs: IterableMap<ContextId, ContextGroupId>,
}

#[derive(Debug)]
Expand All @@ -48,6 +52,23 @@ struct Context {
pub used_open_invitations: Guard<IterableSet<CryptoHash>>,
/// A map that stores pending commitments for the given context.
pub commitments_open_invitations: IterableMap<CryptoHash, BlockHeight>,
pub group_id: Option<ContextGroupId>,
}

#[derive(Debug)]
#[near(serializers = [borsh])]
pub struct OnChainGroupMeta {
pub app_key: AppKey,
pub target_application: Application<'static>,
pub admins: IterableSet<SignerId>,
pub admin_nonces: IterableMap<SignerId, u64>,
pub members: IterableSet<SignerId>,
pub approved_registrations: IterableSet<ContextId>,
/// Forward index: contexts that belong to this group.
/// Enables O(k) pagination in `group_contexts` where k is this group's
/// context count, instead of scanning the global `context_group_refs` map.
pub context_ids: IterableSet<ContextId>,
pub context_count: u64,
}

#[derive(Copy, Clone, Debug, BorshSerialize, BorshDeserialize, BorshStorageKey)]
Expand All @@ -62,6 +83,13 @@ enum Prefix {
MemberNonces(ContextId) = 6,
UsedOpenInvitations(ContextId) = 7,
CommitmentsOpenInvitations(ContextId) = 8,
Groups = 9,
GroupAdmins(ContextGroupId) = 10,
ContextGroupRefs = 11,
GroupAdminNonces(ContextGroupId) = 12,
GroupMembers(ContextGroupId) = 13,
GroupApprovedRegistrations(ContextGroupId) = 14,
GroupContextIds(ContextGroupId) = 15,
}

#[derive(Copy, Clone, Debug)]
Expand All @@ -88,6 +116,8 @@ impl Default for ContextConfigs {
proxy_code: LazyOption::new(Prefix::ProxyCode, None),
proxy_code_hash: LazyOption::new(Prefix::ProxyCodeHash, None),
next_proxy_id: 0,
groups: IterableMap::new(Prefix::Groups),
context_group_refs: IterableMap::new(Prefix::ContextGroupRefs),
}
}
}
Expand Down
Loading
Loading