Skip to content

Restore old behavior: Don't record oracle if blob known from same block.#4510

Merged
afck merged 3 commits intolinera-io:mainfrom
afck:fix-double-oracle-response
Sep 8, 2025
Merged

Restore old behavior: Don't record oracle if blob known from same block.#4510
afck merged 3 commits intolinera-io:mainfrom
afck:fix-double-oracle-response

Conversation

@afck
Copy link
Contributor

@afck afck commented Sep 8, 2025

Motivation

#4413 introduced a bug where we record redundant oracle responses:

  • blob_used itself already records the response, so there is no need to call replay_oracle_response.
  • If the blob was published or created by this block, there is no reason to record an oracle response either.

Proposal

Restore the old behavior.

Test Plan

This caused the remote tests against Testnet Conway to break, and with this fix on the testnet_conway branch, they work again.

Release Plan

  • Nothing to do / These changes follow the usual release cycle.

Links

@ma2bd
Copy link
Contributor

ma2bd commented Sep 8, 2025

@afck How hard is it to cover this behavior with a unit test?

@afck
Copy link
Contributor Author

afck commented Sep 8, 2025

I'll try to extend a test to check for this regression.

I just noticed that the test that originally uncovered the problem was removed in #4397, and replaced by a client test (which we wouldn't run against the network). (My bad: I suggested replacing more tests with client tests.)

@afck
Copy link
Contributor Author

afck commented Sep 8, 2025

Extended the test in 3407f6d.

@afck afck enabled auto-merge September 8, 2025 13:38
@afck afck disabled auto-merge September 8, 2025 13:39
@afck afck added this pull request to the merge queue Sep 8, 2025
afck added a commit that referenced this pull request Sep 8, 2025
## Motivation

#4502 reverted a
refactoring, because a bug was introduced: the behavior of
`read_data_blob` was changed, and a duplicate oracle response was
inserted.

## Proposal

Restore the refactoring and fix the bug.

## Test Plan

I ran the tests against Testnet Conway, and they pass now. 

## Release Plan

- Nothing to do / These changes follow the usual release cycle.

## Links

- Original refactoring: #4413
- Revert PR: #4502
- Fix on main branch: #4510.
- [reviewer
checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
Merged via the queue into linera-io:main with commit ad2fec6 Sep 8, 2025
28 checks passed
@afck afck deleted the fix-double-oracle-response branch September 8, 2025 15:19
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