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 transaction serialization #941

Merged
merged 5 commits into from
Nov 23, 2023
Merged

Fix transaction serialization #941

merged 5 commits into from
Nov 23, 2023

Conversation

aslesarenko
Copy link
Member

This PR fixes the tx serialization regression bug.

@@ -41,6 +41,18 @@ object CollectionUtil {
result
}

/** Concatenate all the arrays in the sequence. */
def concatArrays[T: ClassTag](seq: Traversable[Array[T]]): Array[T] = {
Copy link
Member

Choose a reason for hiding this comment

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

Adding here method for one test just is overkill, for tests ++ is okay

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

Copy link
Member

Choose a reason for hiding this comment

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

push the code


// TODO v6.0: enforce ordering e.g. using the code below (see https://github.com/ScorexFoundation/sigmastate-interpreter/issues/681)
// if (VersionContext.current.activatedVersion > JitActivationVersion) {
Copy link
Member

Choose a reason for hiding this comment

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

Such Versioning does not work here, as old clients will be broken after activation. Remove misleading TODO

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

values <- {
// TODO v6.0: enforce ordering e.g. using the code below (see https://github.com/ScorexFoundation/sigmastate-interpreter/issues/681)
// if (VersionContext.current.activatedVersion > JitActivationVersion) {
// ContextExtension(mutable.LinkedHashMap(values: _*))
Copy link
Member

Choose a reason for hiding this comment

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

the same TODO issue basically

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

@aslesarenko
Copy link
Member Author

@kushti what should I do with failing serialization roundtrip tests?

@kushti
Copy link
Member

kushti commented Nov 23, 2023

@kushti what should I do with failing serialization roundtrip tests?

I think an issue, to start with

@aslesarenko aslesarenko marked this pull request as ready for review November 23, 2023 16:16
@aslesarenko
Copy link
Member Author

I think an issue, to start with

There is an issue #681
Should I refer to it from the ignored tests?

@kushti
Copy link
Member

kushti commented Nov 23, 2023

I think an issue, to start with

There is an issue #681 Should I refer to it from the ignored tests?

I guess vice-versa , so you should refer to the tests from the issue, which is about way different level of visibility.

The issue is far from ideal , as talks there are mostly about JSON serialization

@aslesarenko
Copy link
Member Author

aslesarenko commented Nov 23, 2023

talks there are mostly about JSON serialization

Actually, the problem is not just with binary, but also with Json, and issue highlights these complexity.
Will add references.

@aslesarenko aslesarenko merged commit 9f372c5 into develop Nov 23, 2023
4 checks passed
@aslesarenko aslesarenko deleted the fix-tx-serializer branch May 1, 2024 15:29
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