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

fix: decrease the ingress expiry to 3 min #937

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [Unreleased]

## [2.1.2] - 2024-09-30
- Decrease the ingress_expiry to 3 min
- fix: revert https://github.com/dfinity/agent-js/pull/923 allow option to set agent replica time

## [2.1.1] - 2024-09-13
Expand Down
4 changes: 2 additions & 2 deletions packages/agent/src/agent/http/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export enum RequestStatusResponseStatus {
Done = 'done',
}

// Default delta for ingress expiry is 5 minutes.
const DEFAULT_INGRESS_EXPIRY_DELTA_IN_MSECS = 5 * 60 * 1000;
// Default delta for ingress expiry is 3 minutes.
const DEFAULT_INGRESS_EXPIRY_DELTA_IN_MSECS = 3 * 60 * 1000;

// Root public key for the IC, encoded as hex
export const IC_ROOT_KEY =
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/src/agent/http/transforms.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test('it should round down to the nearest minute', () => {
// 2021-04-26T17:47:11.314Z - high precision
jest.setSystemTime(new Date(1619459231314));

const expiry = new Expiry(5 * 60 * 1000);
const expiry = new Expiry(3 * 60 * 1000);
expect(expiry['_value']).toEqual(BigInt(1619459460000000000));

const expiry_as_date_string = new Date(
Expand Down
Loading