Skip to content

CapabilityRegistry: addDON#13103

Merged
DeividasK merged 15 commits intodevelopfrom
KS-128-public-registry-add-remove-don
May 13, 2024
Merged

CapabilityRegistry: addDON#13103
DeividasK merged 15 commits intodevelopfrom
KS-128-public-registry-add-remove-don

Conversation

@DeividasK
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented May 6, 2024

Go solidity wrappers are out-of-date, regenerate them via the make wrappers-all command

@aiagentdev-1990 aiagentdev-1990 changed the title Ks 128 public registry add remove don Ks 128 public registry add DONs May 8, 2024
@aiagentdev-1990 aiagentdev-1990 marked this pull request as ready for review May 8, 2024 08:39
@DeividasK
Copy link
Copy Markdown
Contributor Author

@cds95 took this over. I approve this PR.

@DeividasK DeividasK changed the title Ks 128 public registry add DONs CapabilityRegistry: addDON May 10, 2024
Comment on lines +51 to +54
/// @dev This is stored as a map so that we can easily update to a set of
/// new capabilities by incrementing the configCount and creating a
/// new set of supported capability IDs
mapping(uint32 configCount => EnumerableSet.Bytes32Set capabilityId) supportedCapabilityIds;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a use case for seeing the capabilities supported by a node at a previous config count?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Asking because we only seem to return the latest - is this just less gassy?

Copy link
Copy Markdown
Contributor

@aiagentdev-1990 aiagentdev-1990 May 13, 2024

Choose a reason for hiding this comment

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

Yes we basically need a quick way to track the latest supported capability IDs after updateNodes is called. The alternative would have been to loop through all the capability IDs and remove them from the set one by one and adding the new capability IDs. Adding the configCount allows us to just read the latest supported IDs.

Comment on lines +576 to +577
function getDONCapabilityConfig(uint32 donId, bytes32 capabilityId) external view returns (bytes memory) {
return s_dons[donId].capabilityConfigs[capabilityId];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this also return the configuration contract's getCapabilityConfiguration(donId) as well?

@cl-sonarqube-production
Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants