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

Update security best practices with journaling #2356

Merged

Conversation

andrew-lee-work
Copy link
Contributor

  • Update how handle risks of outcalls to possibly untrusted canisters.
  • Update how to handle traps.
  • Add journaling section

Thank you for your contribution to the IC Developer Portal.
Before submitting your Pull Request, please make sure that:

- Update how handle risks of outcalls to possibly untrusted canisters.
- Update how to handle traps.
- Add journaling section
…ces.md

Reference the GoldDAO/gldt-swap implementation as an example of journaling.
Copy link
Member

@oggy-dfin oggy-dfin left a comment

Choose a reason for hiding this comment

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

I like the approach in theory but I'm not sure if it can be easily put into practice with the main IC canisters as they stand right now - see comments below.

Copy link
Contributor

@robin-kunzler robin-kunzler left a comment

Choose a reason for hiding this comment

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

Thanks a lot @andrew-lee-work ! LGTM, left a few comments / questions, see below. I think we need to decide what to do given @oggy-dfin 's concerns.

andrew-lee-work and others added 2 commits February 12, 2024 21:21
…y-best-practices.md


Accept Robin's suggestion to fix a typo in the text he wrote.

Co-authored-by: Robin Künzler <[email protected]>
…curity-best-practices.md


Lower the section level of Journaling.

Co-authored-by: Robin Künzler <[email protected]>
andrew-lee-work and others added 6 commits February 20, 2024 11:15
Old link was to a branch that had the underlying commit changed. The new tag link is fixed to a commit as long as normal version tag conventions are followed by the project.
…ing in recovery

Apply guaranteed message ordering to simplify example recovery process.
…gers

Emphasize manual recovery. This is because ICP ledger and ICRC ledgers make it difficult to determine whether a particular transaction has succeeded in an automated way.
Add another note on encouraging manual recovery when finding out the result of a call is difficult to automate.
@andrew-lee-work
Copy link
Contributor Author

Follow-up issue: #2727

Add details on idempotent retries for task flows.
Give more context for journal example structures and flows and clarify the examples.
@roelstorms
Copy link
Contributor

I believe all references to IC documentation need to be made relatively. So all https://internetcomputer.org/docs/current/... need to be replaced. If had someone change my PR to fix this but maybe we can try to do that ourselves?

andrew-lee-work and others added 7 commits April 4, 2024 11:48
Fix missing text in callback cleanup section.

Co-authored-by: Roel Storms <[email protected]>
Add clarification that results may be lost if a trap occurs AND there is no self-call to commit it.

Co-authored-by: oggy-dfin <[email protected]>
andrew-lee-work and others added 5 commits April 24, 2024 14:38
Add uniqueness requirement for transaction hash.
Remove section `Example journaling structures and flows`. Readers should refer to GoldDAO example instead.
@andrew-lee-work andrew-lee-work merged commit ac1d201 into master Apr 24, 2024
3 of 4 checks passed
@andrew-lee-work andrew-lee-work deleted the andrew-lee-work/security-best-practices-journaling branch April 24, 2024 23:30
Copy link

🤖 Preview build failed.

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.

5 participants