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

SqlBackend throws TimeBeforeError if NodeFetch refers to contract created in the same transaction #1435

Closed
gerolf-da opened this issue May 28, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@gerolf-da
Copy link
Contributor

commented May 28, 2019

The SqlBackend rejects transactions with a NodeFetch that refers to a contract created by a NodeCreate within the same transaction. The reason is that the active contract lookup in the PostgresLedgerDao wrongly maps the record time to the ledger effective time. The subsequent check to validate timings then fails and rejects the transaction altogether.

gerolf-da added a commit that referenced this issue May 28, 2019

Use effective_at to populate contracts loaded in SqlBackend
Because the record time was mapped to the ledger effective time field
when deserializing contracts from the SQL database, a subsequent
comparison between the LETs of two nodes in the same transaction caused
the transaction to be rejected.

Fixes #1435.

gerolf-da added a commit that referenced this issue May 28, 2019

Use effective_at to populate contracts loaded in SqlBackend
Because the record time was mapped to the ledger effective time field
when deserializing contracts from the SQL database, a subsequent
comparison between the LETs of two nodes in the same transaction caused
the transaction to be rejected.

Fixes #1435.

gerolf-da added a commit that referenced this issue May 29, 2019

Use effective_at to populate contracts loaded in SqlBackend
Because the record time was mapped to the ledger effective time field
when deserializing contracts from the SQL database, a subsequent
comparison between the LETs of two nodes in the same transaction caused
the transaction to be rejected.

Fixes #1435.

gerolf-da added a commit that referenced this issue May 29, 2019

Use effective_at to populate contracts loaded in SqlBackend
Because the record time was mapped to the ledger effective time field
when deserializing contracts from the SQL database, a subsequent
comparison between the LETs of two nodes in the same transaction caused
the transaction to be rejected.

Fixes #1435.

gerolf-da added a commit that referenced this issue May 29, 2019

Use effective_at to populate contracts loaded in SqlBackend
Because the record time was mapped to the ledger effective time field
when deserializing contracts from the SQL database, a subsequent
comparison between the LETs of two nodes in the same transaction caused
the transaction to be rejected.

Fixes #1435.

gerolf-da added a commit that referenced this issue May 29, 2019

Use effective_at to populate contracts loaded in SqlBackend (#1436)
Because the record time was mapped to the ledger effective time field
when deserializing contracts from the SQL database, a subsequent
comparison between the LETs of two nodes in the same transaction caused
the transaction to be rejected.

Fixes #1435.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.