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: v3 api sync call #906

Merged
merged 25 commits into from
Aug 27, 2024
Merged

feat: v3 api sync call #906

merged 25 commits into from
Aug 27, 2024

Conversation

krpeacock
Copy link
Contributor

@krpeacock krpeacock commented Jul 18, 2024

Description

Implements sync_call functionality from the v3 api for improved performance. See dfinity/interface-spec#265 for more details

Changes:

  • feat: sync_call support in HttpAgent and Actor
    • Skips polling if the sync call succeeds and provides a certificate
    • Falls back to v2 api if the v3 endpoint 404's
    • Adds certificate to SubmitResponse endpoint
    • adds callSync option to HttpAgent.call, which defaults to true

Fixes SDK-1448

How Has This Been Tested?

Updates to unit tests and e2e tests run against dfx 0.22.0 and 0.23.0 to ensure backwards compatibility

Checklist:

  • My changes follow the guidelines in CONTRIBUTING.md.
  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@krpeacock krpeacock changed the title Kai/sdk 1448 sync call feat: v3 api sync call Jul 18, 2024
Copy link
Contributor

github-actions bot commented Jul 18, 2024

size-limit report 📦

Path Size
@dfinity/agent 85.96 KB (+0.38% 🔺)
@dfinity/candid 13.58 KB (0%)
@dfinity/principal 4.97 KB (0%)
@dfinity/auth-client 60.36 KB (+0.11% 🔺)
@dfinity/assets 80.98 KB (+0.23% 🔺)
@dfinity/identity 57.56 KB (+0.11% 🔺)
@dfinity/identity-secp256k1 131.01 KB (+0.3% 🔺)

@krpeacock krpeacock marked this pull request as ready for review August 13, 2024 19:09
@krpeacock krpeacock requested a review from a team as a code owner August 13, 2024 19:09
packages/agent/src/actor.ts Outdated Show resolved Hide resolved
packages/agent/src/actor.ts Outdated Show resolved Hide resolved
packages/agent/src/actor.ts Show resolved Hide resolved
packages/agent/src/actor.ts Outdated Show resolved Hide resolved
@krpeacock krpeacock enabled auto-merge (squash) August 27, 2024 17:35
@krpeacock krpeacock merged commit 5d5415e into main Aug 27, 2024
16 checks passed
@krpeacock krpeacock deleted the kai/SDK-1448-sync-call branch August 27, 2024 17:38
AlexV525 added a commit to AstroxNetwork/agent_dart that referenced this pull request Oct 15, 2024
AlexV525 added a commit to AstroxNetwork/agent_dart that referenced this pull request Oct 15, 2024
AlexV525 added a commit to AstroxNetwork/agent_dart that referenced this pull request Oct 15, 2024
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