Skip to content

Replace fault type Malicious with NoChains.#4462

Merged
afck merged 1 commit intolinera-io:mainfrom
afck:fault-type-no-chains
Sep 2, 2025
Merged

Replace fault type Malicious with NoChains.#4462
afck merged 1 commit intolinera-io:mainfrom
afck:fault-type-no-chains

Conversation

@afck
Copy link
Contributor

@afck afck commented Sep 2, 2025

Motivation

We simulate a range of validator faults in the linera-core tests. One of them is called Malicious, but it really just initializes the storage with wrong chains and returns ArithmeticErrors in some cases. After #3787 (comment), the wrong initialization even causes the chains to have different chain ID, not just a wrong balance, so they will often return InactiveChain errors.

Even before that chain, the storage initialization fault didn't play well with set_fault_type: Even if we switch them to Honest, they will still be faulty due to their storage contents.

Proposal

Replace Malicious with NoChains: Storage does get initialized, but these validators return InactiveChain anyway, when handling block proposals, certificates or chain info queries.

Test Plan

CI

Release Plan

  • Nothing to do / These changes follow the usual release cycle.
  • (But might as well be backported: It's test only and not problematic.)

Links

@afck afck requested review from bart-linera and deuszx September 2, 2025 08:55
@afck afck enabled auto-merge September 2, 2025 09:06
Copy link
Contributor

@bart-linera bart-linera left a comment

Choose a reason for hiding this comment

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

The idea used to be that malicious nodes have the same chains as honest ones, only a different idea about the chain balances - but that became impossible once the initial balance started affecting the chain ID with the changing of ChainDescriptions into blobs.

The change makes sense 👍

@afck afck added this pull request to the merge queue Sep 2, 2025
Merged via the queue into linera-io:main with commit d684ffb Sep 2, 2025
28 checks passed
@afck afck deleted the fault-type-no-chains branch September 2, 2025 09:58
afck added a commit to afck/linera-protocol that referenced this pull request Sep 4, 2025
## Motivation

We simulate a range of validator faults in the `linera-core` tests. One
of them is called `Malicious`, but it really just initializes the
storage with wrong chains and returns `ArithmeticError`s in some cases.
After
linera-io#3787 (comment),
the wrong initialization even causes the chains to have different chain
ID, not just a wrong balance, so they will often return `InactiveChain`
errors.

Even before that chain, the storage initialization fault didn't play
well with `set_fault_type`: Even if we switch them to `Honest`, they
will still be faulty due to their storage contents.

## Proposal

Replace `Malicious` with `NoChains`: Storage _does_ get initialized, but
these validators return `InactiveChain` anyway, when handling block
proposals, certificates or chain info queries.

## Test Plan

CI

## Release Plan

- Nothing to do / These changes follow the usual release cycle.
- (But might as well be backported: It's test only and not problematic.)

## Links

- Closes linera-io#3858.
- [reviewer
checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
@afck afck mentioned this pull request Sep 4, 2025
ma2bd pushed a commit that referenced this pull request Sep 5, 2025
## Motivation

We simulate a range of validator faults in the `linera-core` tests. One
of them is called `Malicious`, but it really just initializes the
storage with wrong chains and returns `ArithmeticError`s in some cases.
After
#3787 (comment),
the wrong initialization even causes the chains to have different chain
ID, not just a wrong balance, so they will often return `InactiveChain`
errors.

Even before that chain, the storage initialization fault didn't play
well with `set_fault_type`: Even if we switch them to `Honest`, they
will still be faulty due to their storage contents.

## Proposal

Replace `Malicious` with `NoChains`: Storage _does_ get initialized, but
these validators return `InactiveChain` anyway, when handling block
proposals, certificates or chain info queries.

## Test Plan

CI

## Release Plan

- Nothing to do / These changes follow the usual release cycle.
- (But might as well be backported: It's test only and not problematic.)

## Links

- Closes #3858.
- [reviewer
checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
ma2bd pushed a commit that referenced this pull request Sep 5, 2025
## Motivation

We simulate a range of validator faults in the `linera-core` tests. One
of them is called `Malicious`, but it really just initializes the
storage with wrong chains and returns `ArithmeticError`s in some cases.
After
#3787 (comment),
the wrong initialization even causes the chains to have different chain
ID, not just a wrong balance, so they will often return `InactiveChain`
errors.

Even before that chain, the storage initialization fault didn't play
well with `set_fault_type`: Even if we switch them to `Honest`, they
will still be faulty due to their storage contents.

## Proposal

Replace `Malicious` with `NoChains`: Storage _does_ get initialized, but
these validators return `InactiveChain` anyway, when handling block
proposals, certificates or chain info queries.

## Test Plan

CI

## Release Plan

- Nothing to do / These changes follow the usual release cycle.
- (But might as well be backported: It's test only and not problematic.)

## Links

- Closes #3858.
- [reviewer
checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
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.

Rethink faulty validators in tests

3 participants