Skip to content

Conversation

@dzikowski
Copy link
Collaborator

No description provided.

Signed-off-by: Jakub Dzikowski <jakub.t.dzikowski@gmail.com>
Signed-off-by: Jakub Dzikowski <jakub.t.dzikowski@gmail.com>
Signed-off-by: Jakub Dzikowski <jakub.t.dzikowski@gmail.com>
…llisions

- Introduced setCurrentTime method to manage transaction timestamps more effectively.
- Ensured timestamps are at least 100 ms in the past to prevent silent test failures.
- Updated GalaChainContext to use a constant for nanos per millisecond for clarity.

Signed-off-by: Jakub Dzikowski <jakub.t.dzikowski@gmail.com>
Signed-off-by: Jakub Dzikowski <jakub.t.dzikowski@gmail.com>
Comment on lines +173 to +180
// We observed that with higly optimized testing code with a very short
// latency, test process may fail silently with no stack trace because
// of (1) a timestamp collision, or (2) a timestamp that equals or exceeds
// the current time.
//
// To avoid this, we first force the timestamp to be at least 100 ms
// in the past, and then in case of a timestamp collision, we increment
// the timestamp by 1 millisecond.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is an additional thing that turned out to be required for testing updated contracts. The performance boost was significant enough to make the timestamp issue to occur.

@dzikowski dzikowski changed the title Feat: Replace elliptic with secp256k1-node Feat: Replace elliptic with secp256k1-node to improve performance Oct 30, 2025
@dzikowski dzikowski marked this pull request as ready for review November 28, 2025 10:47
@dzikowski dzikowski added the v3 To be released in version 3 of SDK label Dec 15, 2025
Signed-off-by: Jakub Dzikowski <jakub.t.dzikowski@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v3 To be released in version 3 of SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants