Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(BOUN-1236): add initial canister interface #2424

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

rikonor
Copy link
Contributor

@rikonor rikonor commented Nov 4, 2024

This is an initial PR adding the canister interface (candid and Rust bindings) for the log anonymization canister. Follow up PRs will add the actual canister and client code.

@rikonor rikonor self-assigned this Nov 4, 2024
@rikonor rikonor requested a review from a team as a code owner November 4, 2024 19:24
@rikonor rikonor changed the title feat(BOUN-1236]): add initial canister interface feat(BOUN-1236): add initial canister interface Nov 4, 2024
@github-actions github-actions bot added the feat label Nov 4, 2024
Copy link
Contributor

@nikolay-komarevskiy nikolay-komarevskiy left a comment

Choose a reason for hiding this comment

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

Good job, see my comments below.

type QueryError = variant {
Unauthorized;
Unavailable;
Leader : record { LeaderMode; vec Pair };
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you choose a more descriptive name for this error variant? Leader feels a bit unclear to me.

body : blob;
};

service : (InitArg) -> {
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be very helpful to add comments, otherwise it is difficult to understand the interface.
Consider adopting a consistent naming convention for type signatures, such as:

submit : (SubmitRequest) -> (SubmitResponse)
register : (RegisterRequest) -> (RegisterResponse)

This would also enhance type consistency across the Rust codebase.

anyhow = { workspace = true }
async-trait = { workspace = true }
candid = { workspace = true }
# ic-canister-client = { git = "https://github.com/dfinity/ic.git", rev = "2d7dfc0135966f04973f1992587a2846e7475bec" }
Copy link
Contributor

Choose a reason for hiding this comment

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

What about this?

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

Successfully merging this pull request may close these issues.

3 participants