# BfcOffences

### Description

The Bifrost Node tracks offences of validators and penalizes them to maintain network stability. The related implementation is defined in the `pallet_bfc_offences` module which is a central module implemented to handle offences reported through multiple modules and is responsible for counting offences and processing validator slashing.

### Extrinsics

**set\_offence\_expiration(new: `SessionIndex`)**

* interface: `api.tx.bfcOffences.setOffenceExpiration`
* summary: Sets a new offence expiration for all validators. It must be specified in sessions. The origin should be the root.

**set\_max\_offence\_count(new: `OffenceCount`)**

* interface: `api.tx.bfcOffences.setMaxOffenceCount`
* summary: Sets a new maximum offence count for all validators. The origin should be the root.

**set\_offence\_activation(is\_active: `bool`)**

* interface: `api.tx.bfcOffences.setOffenceActivation`
* summary: Sets the activation of validator offence management. The origin should be the root.

**set\_slash\_activation(is\_active: `bool`)**

* interface: `api.tx.bfcOffences.setOffenceActivation`
* summary: Sets the activation of validator slashing. The origin should be the root.

### Storage Values

**ValidatorOffences(`AccountId`): `Option<ValidatorOffenceInfo<BalanceOf>>`**

* interface: `api.query.bfcOffences.validatorOffences`
* summary: The current offence state of a specific validator.

**OffenceExpirationInSessions(): `SessionIndex`**

* interface: `api.query.bfcOffences.offenceExpirationInSessions`
* summary: The current offence expiration in sessions.

**MaximumOffenceCount(): `OffenceCount`**

* interface: `api.query.bfcOffences.maximumOffenceCount`
* summary: The current maximum offence count for all validators.

**IsOffenceActive(): `bool`**

* interface: `api.query.bfcOffences.isOffenceActive`
* summary: The current activation of validator offence management.

**IsSlashActive(): `bool`**

* interface: `api.query.bfcOffences.isSlashActive`
* summary: The current activation of validator slashing.

###

### Constants

**DefaultOffenceExpirationInSessions: `SessionIndex`**

* interface: `api.consts.bfcOffences.defaultOffenceExpirationInSessions`
* summary: The default offence expiration in sessions.

**DefaultMaximumOffenceCount: `OffenceCount`**

* interface: `api.consts.bfcOffences.defaultMaximumOffenceCount`
* summary: The default maximum offence count for all validators.

**IsOffenceActive: `bool`**

* interface: `api.consts.bfcOffences.isOffenceActive`
* summary: The activation of validator offence management.

**IsSlashActive: `bool`**

* interface: `api.consts.bfcOffences.isSlashActive`
* summary: The activation of validator slashing.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bifrostnetwork.com/bifrost-network/developer-documentations/pallet-interfaces/bfcoffences.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
