diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml
index bfbc1c9a70..a835c222c4 100644
--- a/.github/workflows/main_workflow.yml
+++ b/.github/workflows/main_workflow.yml
@@ -150,7 +150,6 @@ jobs:
tox -e check-abciapp-specs
tox -e check-handlers
tox -e check-dialogues
- tox -e analyse-services
scan:
name: gitleaks
diff --git a/Makefile b/Makefile
index 4b20007feb..e76cf4a92d 100644
--- a/Makefile
+++ b/Makefile
@@ -229,7 +229,6 @@ fix-abci-app-specs:
autonomy analyse fsm-specs --update --app-class AgentRegistrationAbciApp --package packages/valory/skills/registration_abci || (echo "Failed to check registration_abci consistency" && exit 1)
autonomy analyse fsm-specs --update --app-class ResetPauseAbciApp --package packages/valory/skills/reset_pause_abci || (echo "Failed to check reset_pause_abci consistency" && exit 1)
autonomy analyse fsm-specs --update --app-class RegisterResetAbciApp --package packages/valory/skills/register_reset_abci || (echo "Failed to check register_reset_abci consistency" && exit 1)
- autonomy analyse fsm-specs --update --app-class HelloWorldAbciApp --package packages/valory/skills/hello_world_abci || (echo "Failed to check hello_world_abci consistency" && exit 1)
autonomy analyse fsm-specs --update --app-class TransactionSubmissionAbciApp --package packages/valory/skills/transaction_settlement_abci || (echo "Failed to check transaction_settlement_abci consistency" && exit 1)
autonomy analyse fsm-specs --update --app-class OffendAbciApp --package packages/valory/skills/offend_abci || (echo "Failed to check offend_abci consistency" && exit 1)
echo "Successfully validated abcis!"
diff --git a/docs/advanced_reference/commands/autonomy_analyse.md b/docs/advanced_reference/commands/autonomy_analyse.md
index 13c92418e7..f9116b9b9f 100644
--- a/docs/advanced_reference/commands/autonomy_analyse.md
+++ b/docs/advanced_reference/commands/autonomy_analyse.md
@@ -12,7 +12,7 @@ This command verifies that the [`AbciApp` class](../../key_concepts/abci_app_cla
??? example
- The docstring corresponding to the [Hello World agent service](../../demos/hello_world_demo.md) is
+ The docstring corresponding to the [Hello World agent service](https://docs.autonolas.network/demos/hello-world/) is
```python
@@ -23,20 +23,20 @@ This command verifies that the [`AbciApp` class](../../key_concepts/abci_app_cla
Initial states: {RegistrationRound}
Transition states:
- 0. RegistrationRound
+ 1. RegistrationRound
- done: 1.
- 1. CollectRandomnessRound
+ 2. CollectRandomnessRound
- done: 2.
- no majority: 1.
- round timeout: 1.
- 2. SelectKeeperRound
+ 3. SelectKeeperRound
- done: 3.
- no majority: 0.
- round timeout: 0.
- 3. PrintMessageRound
+ 4. PrintMessageRound
- done: 4.
- round timeout: 0.
- 4. ResetAndPauseRound
+ 5. ResetAndPauseRound
- done: 1.
- no majority: 0.
- reset timeout: 0.
diff --git a/docs/advanced_reference/commands/autonomy_fetch.md b/docs/advanced_reference/commands/autonomy_fetch.md
index 9511511b61..43e4d4d604 100644
--- a/docs/advanced_reference/commands/autonomy_fetch.md
+++ b/docs/advanced_reference/commands/autonomy_fetch.md
@@ -55,5 +55,5 @@ autonomy --registry-path=./packages fetch valory/hello_world:0.1.0 --service --l
Fetch the agent service `hello_world` from a remote registry ([IPFS](https://ipfs.io)):
```bash
-autonomy fetch valory/hello_world:0.1.0:bafybeieoqhbwqmg5oiqgkxf6dlizncjvaermwtun4aijqcbyc6ulfl7o4q --service --remote
+autonomy fetch valory/hello_world:0.1.0:bafybeicdcrhpekqbwzeam2fi7npnl6qfwejgo73ftwoy4tofwbrsl5ene4 --service --remote
```
diff --git a/docs/debugging.md b/docs/advanced_reference/developer_tooling/debugging_using_tenderly.md
similarity index 100%
rename from docs/debugging.md
rename to docs/advanced_reference/developer_tooling/debugging_using_tenderly.md
diff --git a/docs/configure_service/analise_test.md b/docs/configure_service/analise_test.md
index 51a6ae6e35..bd71bbaa56 100644
--- a/docs/configure_service/analise_test.md
+++ b/docs/configure_service/analise_test.md
@@ -50,8 +50,7 @@ The `valory/abstract_round_abci` skill packages come with a number of testing to
Fetch the `hello_world` agent, which comes with the `hello_world_abci` {{fsm_app}} skill within:
```bash
- autonomy fetch valory/hello_world:0.1.0:bafybeibwluqq2yywd3stax2kuiqnv4zxxu3rprfkbn7f7e6sf2gelpkdqa
- mv hello_world hello_world_agent
+ autonomy fetch valory/hello_world:0.1.0:bafybeiakoj6jpj5gqyjk5qz2ibgvplgd4azqwxmi56aei7xpu5z47np3e4 --alias hello_world_agent
```
Look at the unit tests for the `hello_world_abci` skill, located in the folder
@@ -77,8 +76,7 @@ The same plugin also provides tools for writing end-to-end tests for agents. The
Fetch the `hello_world` agent:
```bash
- autonomy fetch valory/hello_world:0.1.0:bafybeibwluqq2yywd3stax2kuiqnv4zxxu3rprfkbn7f7e6sf2gelpkdqa
- mv hello_world hello_world_agent
+ autonomy fetch valory/hello_world:0.1.0:bafybeiakoj6jpj5gqyjk5qz2ibgvplgd4azqwxmi56aei7xpu5z47np3e4 --alias hello_world_agent
```
Look at the end-to-end tests, located in the folder
diff --git a/docs/configure_service/service_configuration_file.md b/docs/configure_service/service_configuration_file.md
index 3277444dba..99c72e008b 100644
--- a/docs/configure_service/service_configuration_file.md
+++ b/docs/configure_service/service_configuration_file.md
@@ -7,7 +7,7 @@ The service configuration file `service.yaml` is typically composed of service-s
???+ example
- Here is an example of the service configuration file of the [Hello World service](../demos/hello_world_demo.md):
+ Here is an example of the service configuration file of the [Hello World service](https://docs.autonolas.network/demos/hello-world/):
```yaml title="service.yaml"
name: hello_world
@@ -96,7 +96,7 @@ The {{open_aea}} framework already has the notion of [component overrides](https
Similarly, the {{open_autonomy}} framework has the notion of service-level overrides. You can define them in the service configuration file `service.yaml`, which will be used to generate the deployment environment for the agents.
Service-level overrides follow the mandatory service-specific attributes, separated by `---`.
-You can, for example, override the default `HELLO_WORLD!` string that each agent prints on their console in the [Hello World service](../demos/hello_world_demo.md), which is originally defined in the `hello_world_abci` skill.
+You can, for example, override the default `HELLO_WORLD!` string that each agent prints on their console in the [Hello World service](https://docs.autonolas.network/demos/hello-world/), which is originally defined in the `hello_world_abci` skill.
```yaml title="service.yaml"
name: hello_world
@@ -163,7 +163,7 @@ type: skill
???+ example
- If you wish that each agent outputs a different message in the [Hello World service](../demos/hello_world_demo.md) with four agents, you can define the following multiple override in the `service.yaml` file:
+ If you wish that each agent outputs a different message in the [Hello World service](https://docs.autonolas.network/demos/hello-world/) with four agents, you can define the following multiple override in the `service.yaml` file:
```yaml title="service.yaml"
# (...)
diff --git a/docs/delegate_call.md b/docs/delegate_call.md
deleted file mode 100644
index a78e9c8ebb..0000000000
--- a/docs/delegate_call.md
+++ /dev/null
@@ -1,3 +0,0 @@
-## Delegate call vs call
-
-Delegate call can be difficult to wrap your head around, but think of it this way: a delegate call means "load the code from this address and run it". This means that, when you create the Safe tx with operation=delegatecall, you are telling the Safe to get the code from the contract whose address is provided and execute it.
\ No newline at end of file
diff --git a/docs/demos/hello_world_demo.md b/docs/demos/hello_world_demo.md
deleted file mode 100644
index 43f07a5899..0000000000
--- a/docs/demos/hello_world_demo.md
+++ /dev/null
@@ -1,562 +0,0 @@
-The Hello World service provides an overview of the main components of an [agent service](../get_started/what_is_an_agent_service.md) and how they work together. The goal of this service is to help new users of Open Autonomy understand how the components of of a service work. While the service itself is very simple, it demonstrates common features found in many agent services and can be used as a starting point for building your own service with more complex functionalities.
-
-## Architecture of the demo
-
-The demo is composed of:
-
-* 4 Docker containers implementing the 4 agents of the service (`abci0`, `abci1`, `abci2`, `abci3`), and
-* 4 Docker containers implementing a [Tendermint](https://tendermint.com/) node for each agent (`node0`, `node1`, `node2`, `node3`).
-
-The agents connect to the remote [DRAND](https://drand.love) service through the Internet during the execution
-of the demo.
-
-
-
-## Running the demo
-
-You can find the instructions on how to run the Hello World service in the [quick start](../guides/quick_start.md) guide.
-
-If you have [set up the framework](../guides/set_up.md#set-up-the-framework), you can fetch the source code of the Hello World agent:
-
-```bash
-autonomy fetch valory/hello_world:0.1.0:bafybeibwluqq2yywd3stax2kuiqnv4zxxu3rprfkbn7f7e6sf2gelpkdqa
-mv hello_world hello_world_agent
-```
-
-and the Hello World service:
-
-```bash
-autonomy fetch valory/hello_world:0.1.0:bafybeieoqhbwqmg5oiqgkxf6dlizncjvaermwtun4aijqcbyc6ulfl7o4q --service
-mv hello_world hello_world_service
-```
-
-## Details of the demo
-
-The functionality of the service is extremely simple. Namely, each agent will output at different times a `HELLO_WORLD!` message on their local console. The execution timeline is divided into *periods*, and within each period, only a nominated agent (keeper) will print the `HELLO_WORLD!` message. The other agents will just print a neutral face `:|`.
-
-!!! info
-
- In the context of agent services, you can think of a *period* as an interval where the service executes an iteration of its intended functionality (e.g., checking some price on a market, execute an investment strategy, or in this demo, printing a message).
-
-Recall that agents synchronize their state using the *consensus gadget*. For clarity, we will simplify the consensus gadget infrastructure (the consensus gadget nodes plus the consensus gadget network) in a single green box.
-
-
-
-!!! warning "Important"
-
- Every agent service is connected to the *consensus gadget* through its *consensus gadget node*:
-
- * The consensus gadget is the component that makes possible for the agents to synchronise state data. This allows them to, e.g. reach agreement on certain actions or reconcile information.
-
- * Anything happening at the consensus network level is completely abstracted away so that developers can see it as a given functionality. An application run by the agent service can be thought and developed as a single "virtual" application, and the framework will take care of replicating it.
-
- * Currently, the consensus gadget is implemented using [Tendermint](https://tendermint.com/).
-
-This is what the service execution looks like:
-
-
-
-The main questions that we try to answer in the sections below are:
-
-* What are the main components of the {{open_autonomy}} framework to implement an agent service?
-* How do these components work?
-
-### The FSM of the service
-
-As discussed in the [overview of the development process](../guides/overview_of_the_development_process.md), the first steps when designing an agent service are [draft the service idea and define the FSM specification](#) that represents its business logic. This is a representation of the Hello World service FSM:
-
-
-
-These are the states of the service:
-
-* **Registration.** This is a preliminary state where each agent commits to participate actively in the service.
-* **CollectRandomness.** All agents connect to the [DRAND](https://drand.love) remote service and retrieve the latest published random value.
-* **SelectKeeper.** Using that random value as seed, the agents nominate randomly an agent (keeper) to execute the service action.
-* **PrintMessage.** The keeper executes the main action of the service: prints the `HELLO_WORLD!` message.
-* **ResetAndPause.** A state where agents wait a bit before re-starting again the main cycle of the service.
-
-And these the possible events (not all events can occur at every state):
-
-* **DONE.** The state has successfully completed its intended purpose.
-* **NO_MAJORITY.** There is no majority (more than 2/3) of agents that agree in the outcome of the state.
-* **TIMEOUT.** Not all agents responded within a specified amount of time.
-
-You can see above how the service transits from one state to another given the event occurred at each one. The synchronized state enforced by the consensus gadget means that **all the agents have the same view of the service FSM**, and **all the agents execute the same transitions**. This is one of the key concepts of the {{open_autonomy}} framework.
-
-!!! warning "A note on determinism"
-
- One of the key points in an agent service is determinism. It is very important that all the agents execute deterministic actions at each step, otherwise it will be impossible to synchronize their shared state.
-
- For example, if the service needs to execute some random action, all agents must retrieve the random seed from a common source, in this case, the [DRAND](https://drand.love) service.
-
-Given the description of the service, it is immediate to obtain the FSM specification file.
-
-???+ example "The Hello World service `fsm_specification.yaml` file"
-
- ```yaml title="fsm_specification.yaml"
- alphabet_in:
- - DONE
- - NO_MAJORITY
- - RESET_TIMEOUT
- - ROUND_TIMEOUT
- default_start_state: RegistrationRound
- final_states: []
- label: HelloWorldAbciApp
- start_states:
- - RegistrationRound
- states:
- - CollectRandomnessRound
- - PrintMessageRound
- - RegistrationRound
- - ResetAndPauseRound
- - SelectKeeperRound
- transition_func:
- (CollectRandomnessRound, DONE): SelectKeeperRound
- (CollectRandomnessRound, NO_MAJORITY): CollectRandomnessRound
- (CollectRandomnessRound, ROUND_TIMEOUT): CollectRandomnessRound
- (PrintMessageRound, DONE): ResetAndPauseRound
- (PrintMessageRound, ROUND_TIMEOUT): RegistrationRound
- (RegistrationRound, DONE): CollectRandomnessRound
- (ResetAndPauseRound, DONE): CollectRandomnessRound
- (ResetAndPauseRound, NO_MAJORITY): RegistrationRound
- (ResetAndPauseRound, RESET_TIMEOUT): RegistrationRound
- (SelectKeeperRound, DONE): PrintMessageRound
- (SelectKeeperRound, NO_MAJORITY): RegistrationRound
- (SelectKeeperRound, ROUND_TIMEOUT): RegistrationRound
- ```
-
-### The {{fsm_app}} of the service
-
-Each agent is composed of a number of components, namely, [connections](https://open-aea.docs.autonolas.tech/connection/), [protocols](https://open-aea.docs.autonolas.tech/protocol/), [contracts](https://open-aea.docs.autonolas.tech/contract/) and [skills](https://open-aea.docs.autonolas.tech/skill/). In order to become part of an agent service, the agent requires a special skill: the {{fsm_app}}. The **{{fsm_app}} skill** is the component that processes events,transits the states of the service FSM, and executes the actions of the service.
-
-
-
-The {{fsm_app}} is a complex component that consists of a number of classes. Below we list the main ones.
-
-For each state of the service FSM:
-
-* A [`Behaviour`](../key_concepts/abci_app_async_behaviour.md): The class that executes the proactive action at each state. For example, cast a vote for a keeper, print a message on screen, send a transaction on a blockchain, etc.
-* A [`Payload`](../key_concepts/abci_app_async_behaviour.md): The message exchanged between agents in the state to indicate completion of the action. For example, a message containing what keeper the agent is voting for.
-* A [`Round`](../key_concepts/abci_app_abstract_round.md): The class that processes the input from the consensus gadget and outputs the appropriate events to make the next transition. For example, output the event DONE when all agents have cast they vote for a keeper.
-
-Additionally, the following two classes:
-
-* [`AbciApp`](../key_concepts/abci_app_class.md): The class that defines the FSM itself and the transitions between states according to the FSM.
-* [`RoundBehaviour`](../key_concepts/abci_app_abstract_round_behaviour.md): The main class of the {{fsm_app}} skill, which aggregates the `AbciApp` and establishes a one-to-one relationship between the rounds and behaviours of each state.
-
-In summary, the Hello World service {{fsm_app}} requires 5 `Behaviours`, 5 `Payloads`, 5 `Rounds`, 1 `AbciApp` and 1 `RoundBehaviour`.
-
-!!! info "Canonical agents vs agent instances"
-
- All agents in a service are implemented by the same codebase. We call such codebase a _canonical agent_, and we call each of the actual instances an _agent instance_. We often use _agent_ for short when there is no risk of confusion and it is clear from the context which of the two terms we are referring to.
-
- Each agent instance in a service can be parameterized with their own set of keys, addresses and other required attributes.
-
-### How the {{fsm_app}} works
-
-Let us focus on what happens inside the {{fsm_app}} of an agent when the service is located in the SelectKeeper state and it transitions to the PrintMessage state.
-
-1. **Execute the action and prepare the payload.** The `SelectKeeperBehaviour` is in charge of two tasks:
-
- * Execute the intended action, that is, determine what agent will be voted for as the new keeper. The choice is made deterministically, based on the randomness retrieved from [DRAND](https://drand.love).
- * Prepares the `SelectKeeperPayload`, which contains its selection.
-
- ![](../images/hello_world_sequence_1.svg)
-
-2. **Send the payload.** The `SelectKeeperBehaviour` is in charge sends the payload to the consensus gadget.
-
- ![](../images/hello_world_sequence_2.svg)
-
-3. **Reach consensus.** The consensus gadget reads all the agents' outputs, and ensures that all agents have the same consistent view. The gadget takes the responsibility of executing the consensus algorithm, which is abstracted away to the developer. The consensus gadget uses a short-lived blockchain to execute the consensus algorithm.
-
- ![](../images/hello_world_sequence_3.svg)
-
- !!! note
- "Reaching consensus" does not mean that the consensus gadget ensures that all the agents send the same payload. Rather, it means that all the agents have a _consistent view_ on what payload was sent by each of them. In this particular case, however all agents cast the same vote.
-
-4. **Callback to the {{fsm_app}}.** Once the consensus phase is finished, the `SelectKeeperRound` receives a callback and processes the outputs. Based on that, it casts an event. In this case, if strictly more than $2/3$ of the agents voted for a certain keeper, it casts the event `DONE`.
-
- ![](../images/hello_world_sequence_4.svg)
-
-5. **Transition to the next state.** The event `DONE` is received by the `AbciApp` class, which executes the transition to the next state (PrintMessage).
-
- ![](../images/hello_world_sequence_5.svg)
-
-The executions of further state transitions can be easily mapped with what has been presented here for the transition SelectKeeper $\rightarrow$ PrintMessage.
-
-???+ example "Transition PrintMessage $\rightarrow$ ResetAndPause"
-
- Following the same steps as above, this is what would happen:
-
- 1. The `PrintMessageBehaviour`, executes the main functionality. For the chosen keeper, it will be printing the `HELLO_WORLD` message. The rest of the agents simply print a neutral face.
-
-
- 2. The `PrintMessageBehaviour` sends a `PrintMessagePayload` to the consensus gadget, indicating what was the message it printed by each agent.
- 3. The consensus gadget executes the consensus protocol ensuring a consistent view for all the agents.
- 4. The `PrintMessageRound` receives a callback, and after checking that all agents have responded it will produce the `DONE` event.
- 5. The `AbciApp` processes the event `DONE`, and moves to the next state, ResetAndPause.
-
-!!! note
-
- Observe that whereas in the SelectKeeper state we expect that all agents output the same payload to the consensus gadget (the same keeper vote), in the PrintMessage state it is admissible that the agents send different values, because they print different things on their console.
-
- Other states might have different waiting conditions, for instance
-
- * wait until all agents respond with a (possibly) different value, or
- * wait until more than a threshold of agents respond with the same value.
-
- When the waiting condition is not met during a certain time interval, a special timeout event is generated by the `Round`, and the developer is in charge of defining how the FSM will transit in that case. You can see some of these unexpected events in the FSM diagram above.
-
-### Bird's eye view
-As a summary, find below an image which shows the main components of the agent and the skill related to the Hello World service presented in this overview. Of course, this is by no means the complete picture of what is inside an agent, but it should give a good intuition of what are the main elements that play a role in any agent service and how they interact.
-
-
-
-### Coding the Hello World service: a primer
-
-As detailed in the [overview of the development process](./../guides/overview_of_the_development_process.md), in order to create a service, you must:
-
-* code the {{fsm_app}} skill,
-* define the agent, and
-* define the service.
-
-We will explore this source code in the sections below, paying attention on the main parts that you should take into account.
-
-#### Exploring the {{fsm_app}} skill code
-
-Take a look at the structure of the {{fsm_app}} skill of the Hello World service (called `hello_world_abci`):
-
-```
-./hello_world_agent/vendor/valory/skills/hello_world_abci/
-|
-├── __init__.py
-├── behaviours.py
-├── dialogues.py
-├── fsm_specification.yaml
-├── handlers.py
-├── models.py
-├── payloads.py
-├── README.md
-├── rounds.py
-├── skill.yaml
-└── tests/
-```
-
-Note that the easiest way to start building a new {{fsm_app}} is by [using the {{fsm_app}} scaffold tool](../guides/code_fsm_app_skill.md), because it already populates many of these files. The most important files you should look at are:
-
-* **`behaviours.py`**: This file defines the `Behaviours`, which encode the proactive actions occurring at each state of the FSM. Each behaviour is one-to-one associated to a `Round`. It also contains the `HelloWorldRoundBehaviour` class, which can be thought as the "main" class for the skill behaviour.
-
- Each behaviour must:
-
- 1. Set the `matching_round` attribute to the corresponding `Round` class.
- 2. Define the action executed in the state inside the method `async_act()`.
- 3. Prepare the `Payload` associated with this state. The payload can be anything that other agents might find useful for the action in this or future states.
- 4. Send the `Payload`, which the consensus gadget will be in charge of synchronizing with all the agents.
- 5. Wait until the consensus gadget finishes its work, and mark the state `set_done()`.
-
- The last three steps above are common for all the `Behaviours`.
-
- ???- example "The `PrintMessageBehaviour` class"
-
- Class diagram:
-
-
-
- The `HelloWorldABCIBaseBehaviour` is a convenience class, and the upper class in the hierarchy are abstract classes from the stack that facilitate re-usability of code when implementing the `Behaviour`. An excerpt of the `PrintMessageBehaviour` code is:
-
- ```python
- class PrintMessageBehaviour(HelloWorldABCIBaseBehaviour, ABC):
- """Prints the celebrated 'HELLO WORLD!' message."""
-
- matching_round = PrintMessageRound
-
- def async_act(self) -> Generator:
- """
- Do the action.
-
- Steps:
- - Determine if this agent is the current keeper agent.
- - Print the appropriate to the local console.
- - Send the transaction with the printed message and wait for it to be mined.
- - Wait until ABCI application transitions to the next round.
- - Go to the next behaviour (set done event).
- """
-
- if (
- self.context.agent_address
- == self.synchronized_data.most_voted_keeper_address
- ):
- message = self.params.hello_world_string
- else:
- message = ":|"
-
- printed_message = f"Agent {self.context.agent_name} (address {self.context.agent_address}) in period {self.synchronized_data.period_count} says: {message}"
-
- print(printed_message)
- self.context.logger.info(f"printed_message={printed_message}")
-
- payload = PrintMessagePayload(self.context.agent_address, printed_message)
-
- yield from self.send_a2a_transaction(payload)
- yield from self.wait_until_round_end()
-
- self.set_done()
- ```
-
- Once all the `Behaviours` are defined, you can define the `HelloWorldRoundBehaviour` class. This class follows a quite standard structure in all agent services, and the reader can easily infer what is it from the source code.
-
- ???- example "The `HelloWorldRoundBehaviour` class"
-
- ```python
- class HelloWorldRoundBehaviour(AbstractRoundBehaviour):
- """This behaviour manages the consensus stages for the Hello World abci app."""
-
- initial_behaviour_cls = RegistrationBehaviour
- abci_app_cls = HelloWorldAbciApp
- behaviours: Set[Type[BaseBehaviour]] = {
- RegistrationBehaviour, # type: ignore
- CollectRandomnessBehaviour, # type: ignore
- SelectKeeperBehaviour, # type: ignore
- PrintMessageBehaviour, # type: ignore
- ResetAndPauseBehaviour, # type: ignore
- }
- ```
-
-* **`payloads.py`**: This file defines the payloads associated to the consensus engine for each of the states. `Payloads` are data objects, and carry almost no business logic.
-
- ???- example "The `PrintMessagePayload` class"
-
- ```python
- @dataclass(frozen=True)
- class PrintMessagePayload(BaseTxPayload):
- """Represent a transaction payload of type 'randomness'."""
-
- message: str
- ```
-
-* **`rounds.py`**: This file contains the implementation of the rounds associated to each state and the shared `SynchronizedData` class (the class that stores the service shared state). It also contains the declaration of the FSM events, and the `HelloWorldAbciApp`, which defines the transition function of the FSM.
-
- Each round must:
-
- 1. Inherit from one of the classes that determine what kind of consensus is expected at the associated sate: `CollectDifferentUntilAllRound`, `CollectSameUntilAllRound`, `CollectSameUntilThresholdRound`, etc.
- 2. Set the `payload_class` attribute to the corresponding `Payload` class.
- 3. Set other attributes required by the inherited class.
- 4. Implement the `end_block()` method, which is called by the consensus gadget. This method must output the updated `SynchronizedData` and the event produced after evaluating the consensus result.
-
- ???- example "The `PrintMessageRound` class"
-
- Class diagram:
-
-
-
- The `HelloWorldABCIAbstractRound` is a convenience class defined in the same file. The class `CollectDifferentUntilAllRound` is a helper class for rounds that expect that each agent sends a different message. In this case, the message to be sent is the agent printed by each agent, which will be obviously different for each agent (one of them will be the `HELLO_WORLD!` message, and the others will be empty messages).
-
- ```python
- class PrintMessageRound(CollectDifferentUntilAllRound, HelloWorldABCIAbstractRound):
- """A round in which the keeper prints the message"""
-
- payload_class = PrintMessagePayload
-
- def end_block(self) -> Optional[Tuple[BaseSynchronizedData, Event]]:
- """Process the end of the block."""
- if self.collection_threshold_reached:
- synchronized_data = self.synchronized_data.update(
- participants=tuple(sorted(self.collection)),
- printed_messages=sorted(
- [
- cast(PrintMessagePayload, payload).message
- for payload in self.collection.values()
- ]
- ),
- synchronized_data_class=SynchronizedData,
- )
- return synchronized_data, Event.DONE
- return None
- ```
-
- If the successful condition occurs, the `end_block()` method returns the appropriate event (`DONE`) so that the `AbciApp` can process and transit to the next round.
-
- Observe that the `RegistrationRound` is very similar to the `PrintMessageRound`, as it simply has to collect the different addresses that each agent sends. On the other hand, the classes `CollectRandomnessRound` and `SelectKeeperRound` just require to define some parent classes attributes, as they execute fairly standard operations already available in the framework.
-
- After having defined all the `Rounds`, the `HelloWorldAbciApp` does not have much mystery. It simply defines the transitions from one state to another in the FSM, arranged as Python dictionaries. For example,
-
- ```python
- SelectKeeperRound: {
- Event.DONE: PrintMessageRound,
- Event.NO_MAJORITY: RegistrationRound,
- Event.ROUND_TIMEOUT: RegistrationRound,
- },
- ```
-
- denotes the three possible transitions from the `SelectKeeperRound` to the corresponding `Rounds`, according to the FSM depicted above.
-
-Whereas these are the main files to take into account, there are other files that are also required, and you can take a look:
-
-* **`skill.yaml`**: This is the skill specification file. It defines the sub-components (e.g. protocols, connections) required by the skill, as well as a number of configuration parameters.
-* **`handlers.py`**: Defines the `Handlers` (implementing reactive actions) used by the skill. It is mandatory that the skill associated to an agent service implements a handler inherited from the `ABCIRoundHandler`. Other handlers are required according to the actions that the skill is performing (e.g., interacting with an HTTP server). As you can see by exploring the file, little coding is expected unless you need to implement a custom protocol.
-* **`dialogues.py`**: It defines the dialogues associated to the protocols described in the `skill.yaml` configuration file. Again, not much coding is expected in most cases.
-* **`models.py`**: It defines the models of the skill, which usually consist of the `SharedState` and the configuration parameters `Params` classes. The classes defined here are linked with the contents in the section `models` in the file `skill.yaml`.
-* **`fsm_specification.yaml`**: The {{fsm_app}} specification file. It is used for checking the consistency of the implementation, and it can be used to verify the implementation or to [scaffold the {{fsm_app}}](../guides/code_fsm_app_skill.md) providing an initial structure.
-
-#### Exploring the agent definition code
-
-The agent configuration file `aea-config.yaml` is located in the root folder of the agent:
-
-```
-./hello_world_agent/
-|
-├── __init__.py
-├── aea-config.yaml
-├── README.md
-├── tests/
-└── vendor/
-```
-
-Agents are defined through the {{open_aea}} library as YAML files, which specify what components the agent made of ([connections](https://open-aea.docs.autonolas.tech/connection/), [protocols](https://open-aea.docs.autonolas.tech/protocol/), [contracts](https://open-aea.docs.autonolas.tech/contract/) and [skills](https://open-aea.docs.autonolas.tech/skill/)). Recall that an agent requires the {{fsm_app}} skill to work in a service.
-
-This is an excerpt of the `aea-config.yaml` file:
-
-```yaml title="aea-config.yaml"
-# (...)
-connections:
-- valory/abci:0.1.0
-- valory/http_client:0.23.0
-- valory/ipfs:0.1.0
-- valory/ledger:0.19.0
-- valory/p2p_libp2p_client:0.1.0
-contracts: []
-protocols:
-- open_aea/signing:1.0.0
-- valory/abci:0.1.0
-- valory/http:1.0.0
-- valory/ipfs:0.1.0
-skills:
-- valory/abstract_abci:0.1.0
-- valory/abstract_round_abci:0.1.0
-- valory/hello_world_abci:0.1.0
-# (...)
-```
-
-It is mandatory that service agents include some of mandatory components: the `abci` connection, the `abci` protocol, the `abstract_abci` skill and the `abstract_round_abci` skill.
-
-Additionally, the agent can use other connections, protocols or skills, depending of its particular needs. In the example, the `http_client` connection and the `http` protocol allows the agent to interact with HTTP servers (although we are not using it in this service). Similarly, you can add the `ledger` connection and the `ledger_api` protocol in case the agent needs to interact with a blockchain.
-It obviously contains the `hello_world_abci` skill, which is the {{fsm_app}} skill discussed above.
-
-Note that although it is possible to develop your own protocols and connections, the {{open_aea}} framework provides a number of typical ones which can be reused. Therefore, it is usual that the developer focuses most of its programming efforts in coding the particular skill(s) for their new agent.
-
-#### Exploring the service definition code
-
-The service configuration file `service.yaml` is located in the root folder of the service:
-
-```
-./hello_world_service/
-|
-├── README.md
-└── service.yaml
-```
-
-You can read the [dedicated section](../configure_service/service_configuration_file.md) to understand the structure and configuration of the `service.yaml` file.
-
-## Conclusion and further reading
-
-Even though printing `HELLO_WORLD!` on a local console is far from being an exciting functionality, the Hello World service shows a number of non-trivial elements that are key components in many agent services:
-
-* The service defines a sequence of individual, well-defined actions, whose execution in the appropriate order achieves the intended functionality.
-* Agents have to interact with each other to execute each of those actions, and reach a consensus on a number of decisions at certain moments (e.g., which is the keeper agent that prints the message in each period).
-* Agents execute actions on their own. In this simple example it just consists of printing a local message.
-* Agents have to use a shared, global store for persistent data (e.g., which was the last agent that printed the message).
-* Finally, the service can progress even if some agent is faulty or malicious (up to a certain threshold of malicious agents).
-
-In this toy example we are not verifying that the keeper behaves honestly: there is no way for the other agents to verify its console. However, in a real service that implements some critical operation (e.g., like sending a transaction to a blockchain) further verification and security mechanisms have to be put in place.
-
-This walk-through, together with the [overview of the development process](../guides/overview_of_the_development_process.md) should give you some confidence to start creating your first service. Obviously, there are more elements in the {{open_autonomy}} framework that facilitate building complex applications by enabling to interact with blockchains and other networks. We refer the reader to the more advanced sections of the documentation (e.g., key concepts) where we explore in detail the components of the stack.
-
diff --git a/docs/demos/index.md b/docs/demos/index.md
deleted file mode 100644
index f1f559e707..0000000000
--- a/docs/demos/index.md
+++ /dev/null
@@ -1,10 +0,0 @@
-#Demo agent services - index
-Here you can find a number of already deployed services that showcase the potential
-of the {{open_autonomy}} framework. You can fetch the services (and/or
-the corresponding agents) from the remote IPFS registry and explore them by yourself.
-
-- [Hello world agent service](hello_world_demo.md): a demo service to showcase
- how to use the main components in an agent service, without external interactions.
-- [Price oracle demo](price_oracle_intro.md): a full service implementing a
- price oracle where each agent collects price estimates from a different source.
-
\ No newline at end of file
diff --git a/docs/demos/price_oracle_fsms.md b/docs/demos/price_oracle_fsms.md
deleted file mode 100644
index 53dd2fd297..0000000000
--- a/docs/demos/price_oracle_fsms.md
+++ /dev/null
@@ -1,596 +0,0 @@
-# Price Oracle - Description of the FSMs
-
-For reference, we provide a high-level description of the FSMs that constitute
-the Price Oracle demo using a simplified syntax.
-The syntax should be easy to understand for a reader familiar with conventional
-automata textbook notation.
-
-The aim of this syntax is to be used as a starting point in the design and
-reasoning of an {{fsm_app}} without delving into the internals of the {{open_autonomy}} framework
-itself. Hence, the usage of objects is minimized, and only strings are
-used as identifiers. It can be used as a description language to translate a
-specification into code, e.g., for agent development, or for conducting some
-formal analysis using a model checker like SPIN.
-
-Each FSM object is defined by a collection of seven input parameters:
-
-* label (optional),
-* states,
-* default start state,
-* allowed start states (e.g., when re-routing a transition from another FSM),
-* final states,
-* input alphabet (i.e., received events),
-* transition function, expressed as a function that maps tuples of the form (S, E) to the resulting state S'. That is, upon receiving event E being at state S, the FSM will transit to state S'.
-
-The summary of the constituent FSMs is as follows:
-
-
-| FSM | States | Start states | Final states | Events | Non-trivial transitions (*) |
-|----------------------- |-------: |-------------: |-------------: |-------: |------------------------: |
-| AgentRegistration | 4 | 2 | 2 | 3 | 3 |
-| OracleDeployment | 5 | 1 | 1 | 8 | 14 |
-| PriceAggregation | 9 | 1 | 1 | 4 | 9 |
-| TransactionSubmission | 10 | 1 | 2 | 9 | 26 |
-| ResetPauseAbciApp | 3 | 1 | 2 | 3 | 3 |
-| **OracleAbciApp** | **21** | **2** | **0** | **12** | **66** |
-
-
-(`*`) Transitions to a different state, i.e., not self-transitions.
-
-#### `AgentRegistrationAbciApp` FSM
-
-```yaml title="fsm_specification.yaml"
-alphabet_in:
-- DONE
-- NO_MAJORITY
-default_start_state: RegistrationStartupRound
-final_states:
-- FinishedRegistrationRound
-label: AgentRegistrationAbciApp
-start_states:
-- RegistrationRound
-- RegistrationStartupRound
-states:
-- FinishedRegistrationRound
-- RegistrationRound
-- RegistrationStartupRound
-transition_func:
- (RegistrationRound, DONE): FinishedRegistrationRound
- (RegistrationRound, NO_MAJORITY): RegistrationRound
- (RegistrationStartupRound, DONE): FinishedRegistrationRound
-```
-
-
-
-
-#### `OracleDeploymentAbciApp` FSM
-```yaml title="fsm_specification.yaml"
-alphabet_in:
-- DEPLOY_TIMEOUT
-- DONE
-- FAILED
-- NEGATIVE
-- NONE
-- NO_MAJORITY
-- ROUND_TIMEOUT
-- VALIDATE_TIMEOUT
-default_start_state: RandomnessOracleRound
-final_states:
-- FinishedOracleRound
-label: packages.valory.skills.oracle_deployment_abci.rounds.OracleDeploymentAbciApp
-start_states:
-- RandomnessOracleRound
-states:
-- DeployOracleRound
-- FinishedOracleRound
-- RandomnessOracleRound
-- SelectKeeperOracleRound
-- ValidateOracleRound
-transition_func:
- (DeployOracleRound, DEPLOY_TIMEOUT): SelectKeeperOracleRound
- (DeployOracleRound, DONE): ValidateOracleRound
- (DeployOracleRound, FAILED): SelectKeeperOracleRound
- (RandomnessOracleRound, DONE): SelectKeeperOracleRound
- (RandomnessOracleRound, NO_MAJORITY): RandomnessOracleRound
- (RandomnessOracleRound, ROUND_TIMEOUT): RandomnessOracleRound
- (SelectKeeperOracleRound, DONE): DeployOracleRound
- (SelectKeeperOracleRound, NO_MAJORITY): RandomnessOracleRound
- (SelectKeeperOracleRound, ROUND_TIMEOUT): RandomnessOracleRound
- (ValidateOracleRound, DONE): FinishedOracleRound
- (ValidateOracleRound, NEGATIVE): RandomnessOracleRound
- (ValidateOracleRound, NONE): RandomnessOracleRound
- (ValidateOracleRound, NO_MAJORITY): RandomnessOracleRound
- (ValidateOracleRound, VALIDATE_TIMEOUT): RandomnessOracleRound
-```
-
-
-
-#### `PriceAggregationAbciApp` FSM
-```yaml title="fsm_specification.yaml"
-alphabet_in:
-- DONE
-- NONE
-- NO_MAJORITY
-- ROUND_TIMEOUT
-default_start_state: CollectObservationRound
-final_states:
-- FinishedPriceAggregationRound
-label: packages.valory.skills.price_estimation_abci.rounds.PriceAggregationAbciApp
-start_states:
-- CollectObservationRound
-states:
-- CollectObservationRound
-- EstimateConsensusRound
-- FinishedPriceAggregationRound
-- TxHashRound
-transition_func:
- (CollectObservationRound, DONE): EstimateConsensusRound
- (CollectObservationRound, NO_MAJORITY): CollectObservationRound
- (CollectObservationRound, ROUND_TIMEOUT): CollectObservationRound
- (EstimateConsensusRound, DONE): TxHashRound
- (EstimateConsensusRound, NONE): CollectObservationRound
- (EstimateConsensusRound, NO_MAJORITY): CollectObservationRound
- (EstimateConsensusRound, ROUND_TIMEOUT): CollectObservationRound
- (TxHashRound, DONE): FinishedPriceAggregationRound
- (TxHashRound, NONE): CollectObservationRound
- (TxHashRound, NO_MAJORITY): CollectObservationRound
- (TxHashRound, ROUND_TIMEOUT): CollectObservationRound
-```
-
-
-
-#### `TransactionSubmissionAbciApp` FSM
-```yaml title="fsm_specification.yaml"
-alphabet_in:
-- CHECK_HISTORY
-- CHECK_LATE_ARRIVING_MESSAGE
-- CHECK_TIMEOUT
-- DONE
-- FINALIZATION_FAILED
-- FINALIZE_TIMEOUT
-- INCORRECT_SERIALIZATION
-- INSUFFICIENT_FUNDS
-- MISSED_AND_LATE_MESSAGES_MISMATCH
-- NEGATIVE
-- NONE
-- NO_MAJORITY
-- RESET_TIMEOUT
-- ROUND_TIMEOUT
-- VALIDATE_TIMEOUT
-default_start_state: RandomnessTransactionSubmissionRound
-final_states:
-- FailedRound
-- FinishedTransactionSubmissionRound
-label: TransactionSubmissionAbciApp
-start_states:
-- RandomnessTransactionSubmissionRound
-states:
-- CheckLateTxHashesRound
-- CheckTransactionHistoryRound
-- CollectSignatureRound
-- FailedRound
-- FinalizationRound
-- FinishedTransactionSubmissionRound
-- RandomnessTransactionSubmissionRound
-- ResetRound
-- SelectKeeperTransactionSubmissionARound
-- SelectKeeperTransactionSubmissionBRound
-- SelectKeeperTransactionSubmissionBRoundAfterTimeout
-- SynchronizeLateMessagesRound
-- ValidateTransactionRound
-transition_func:
- (CheckLateTxHashesRound, CHECK_LATE_ARRIVING_MESSAGE): SynchronizeLateMessagesRound
- (CheckLateTxHashesRound, CHECK_TIMEOUT): CheckLateTxHashesRound
- (CheckLateTxHashesRound, DONE): FinishedTransactionSubmissionRound
- (CheckLateTxHashesRound, NEGATIVE): FailedRound
- (CheckLateTxHashesRound, NONE): FailedRound
- (CheckLateTxHashesRound, NO_MAJORITY): FailedRound
- (CheckTransactionHistoryRound, CHECK_LATE_ARRIVING_MESSAGE): SynchronizeLateMessagesRound
- (CheckTransactionHistoryRound, CHECK_TIMEOUT): CheckTransactionHistoryRound
- (CheckTransactionHistoryRound, DONE): FinishedTransactionSubmissionRound
- (CheckTransactionHistoryRound, NEGATIVE): SelectKeeperTransactionSubmissionBRound
- (CheckTransactionHistoryRound, NONE): FailedRound
- (CheckTransactionHistoryRound, NO_MAJORITY): CheckTransactionHistoryRound
- (CollectSignatureRound, DONE): FinalizationRound
- (CollectSignatureRound, NO_MAJORITY): ResetRound
- (CollectSignatureRound, ROUND_TIMEOUT): CollectSignatureRound
- (FinalizationRound, CHECK_HISTORY): CheckTransactionHistoryRound
- (FinalizationRound, CHECK_LATE_ARRIVING_MESSAGE): SynchronizeLateMessagesRound
- (FinalizationRound, DONE): ValidateTransactionRound
- (FinalizationRound, FINALIZATION_FAILED): SelectKeeperTransactionSubmissionBRound
- (FinalizationRound, FINALIZE_TIMEOUT): SelectKeeperTransactionSubmissionBRoundAfterTimeout
- (FinalizationRound, INSUFFICIENT_FUNDS): SelectKeeperTransactionSubmissionBRound
- (RandomnessTransactionSubmissionRound, DONE): SelectKeeperTransactionSubmissionARound
- (RandomnessTransactionSubmissionRound, NO_MAJORITY): RandomnessTransactionSubmissionRound
- (RandomnessTransactionSubmissionRound, ROUND_TIMEOUT): RandomnessTransactionSubmissionRound
- (ResetRound, DONE): RandomnessTransactionSubmissionRound
- (ResetRound, NO_MAJORITY): FailedRound
- (ResetRound, RESET_TIMEOUT): FailedRound
- (SelectKeeperTransactionSubmissionARound, DONE): CollectSignatureRound
- (SelectKeeperTransactionSubmissionARound, INCORRECT_SERIALIZATION): FailedRound
- (SelectKeeperTransactionSubmissionARound, NO_MAJORITY): ResetRound
- (SelectKeeperTransactionSubmissionARound, ROUND_TIMEOUT): SelectKeeperTransactionSubmissionARound
- (SelectKeeperTransactionSubmissionBRound, DONE): FinalizationRound
- (SelectKeeperTransactionSubmissionBRound, INCORRECT_SERIALIZATION): FailedRound
- (SelectKeeperTransactionSubmissionBRound, NO_MAJORITY): ResetRound
- (SelectKeeperTransactionSubmissionBRound, ROUND_TIMEOUT): SelectKeeperTransactionSubmissionBRound
- (SelectKeeperTransactionSubmissionBRoundAfterTimeout, CHECK_HISTORY): CheckTransactionHistoryRound
- (SelectKeeperTransactionSubmissionBRoundAfterTimeout, CHECK_LATE_ARRIVING_MESSAGE): SynchronizeLateMessagesRound
- (SelectKeeperTransactionSubmissionBRoundAfterTimeout, DONE): FinalizationRound
- (SelectKeeperTransactionSubmissionBRoundAfterTimeout, INCORRECT_SERIALIZATION): FailedRound
- (SelectKeeperTransactionSubmissionBRoundAfterTimeout, NO_MAJORITY): ResetRound
- (SelectKeeperTransactionSubmissionBRoundAfterTimeout, ROUND_TIMEOUT): SelectKeeperTransactionSubmissionBRoundAfterTimeout
- (SynchronizeLateMessagesRound, DONE): CheckLateTxHashesRound
- (SynchronizeLateMessagesRound, MISSED_AND_LATE_MESSAGES_MISMATCH): FailedRound
- (SynchronizeLateMessagesRound, NONE): SelectKeeperTransactionSubmissionBRound
- (SynchronizeLateMessagesRound, NO_MAJORITY): SynchronizeLateMessagesRound
- (SynchronizeLateMessagesRound, ROUND_TIMEOUT): SynchronizeLateMessagesRound
- (ValidateTransactionRound, DONE): FinishedTransactionSubmissionRound
- (ValidateTransactionRound, NEGATIVE): CheckTransactionHistoryRound
- (ValidateTransactionRound, NONE): SelectKeeperTransactionSubmissionBRound
- (ValidateTransactionRound, NO_MAJORITY): ValidateTransactionRound
- (ValidateTransactionRound, VALIDATE_TIMEOUT): SelectKeeperTransactionSubmissionBRound
-```
-
-
-
-#### `ResetPauseAbciApp` FSM
-
-```yaml title="fsm_specification.yaml"
-alphabet_in:
-- DONE
-- NO_MAJORITY
-- RESET_AND_PAUSE_TIMEOUT
-default_start_state: ResetAndPauseRound
-final_states:
-- FinishedResetAndPauseErrorRound
-- FinishedResetAndPauseRound
-label: ResetPauseAbciApp
-start_states:
-- ResetAndPauseRound
-states:
-- FinishedResetAndPauseErrorRound
-- FinishedResetAndPauseRound
-- ResetAndPauseRound
-transition_func:
- (ResetAndPauseRound, DONE): FinishedResetAndPauseRound
- (ResetAndPauseRound, NO_MAJORITY): FinishedResetAndPauseErrorRound
- (ResetAndPauseRound, RESET_AND_PAUSE_TIMEOUT): FinishedResetAndPauseErrorRound
-```
-
-
-
-
-#### `OracleAbciApp` FSM
-As described above, the `OracleAbciApp` FSM is the composition of the
-FSMs defined above using an FSM transition mapping that establishes the relationship
-between the final states of a certain FSM with the start states of another FSM, that is,
-
-```python
-OracleAbciApp = chain(
- (
- AgentRegistrationAbciApp,
- SafeDeploymentAbciApp,
- OracleDeploymentAbciApp,
- PriceAggregationAbciApp,
- TransactionSubmissionAbciApp,
- ResetPauseAbciApp,
- ),
- abci_app_transition_mapping,
-)
-```
-The transition mapping for this FSM is defined as
-
-```python
-abci_app_transition_mapping: AbciAppTransitionMapping = {
- FinishedRegistrationRound: RandomnessSafeRound,
- FinishedSafeRound: RandomnessOracleRound,
- FinishedOracleRound: CollectObservationRound,
- FinishedRegistrationFFWRound: CollectObservationRound,
- FinishedPriceAggregationRound: RandomnessTransactionSubmissionRound,
- FailedRound: ResetAndPauseRound,
- FinishedTransactionSubmissionRound: ResetAndPauseRound,
- FinishedResetAndPauseRound: CollectObservationRound,
- FinishedResetAndPauseErrorRound: RegistrationRound,
-}
-```
-
-
-
-The complete specification of the composed FSM is therefore:
-
-```yaml title="fsm_specification.yaml"
-alphabet_in:
-- CHECK_HISTORY
-- CHECK_LATE_ARRIVING_MESSAGE
-- CHECK_TIMEOUT
-- DEPLOY_TIMEOUT
-- DONE
-- FAILED
-- FAST_FORWARD
-- FINALIZATION_FAILED
-- FINALIZE_TIMEOUT
-- INCORRECT_SERIALIZATION
-- INSUFFICIENT_FUNDS
-- MISSED_AND_LATE_MESSAGES_MISMATCH
-- NEGATIVE
-- NONE
-- NO_MAJORITY
-- RESET_AND_PAUSE_TIMEOUT
-- RESET_TIMEOUT
-- ROUND_TIMEOUT
-- VALIDATE_TIMEOUT
-default_start_state: RegistrationStartupRound
-final_states: []
-label: packages.valory.skills.oracle_abci.composition.OracleAbciApp
-start_states:
-- RegistrationStartupRound
-states:
-- CheckLateTxHashesRound
-- CheckTransactionHistoryRound
-- CollectObservationRound
-- CollectSignatureRound
-- DeployOracleRound
-- DeploySafeRound
-- EstimateConsensusRound
-- FinalizationRound
-- RandomnessOracleRound
-- RandomnessSafeRound
-- RandomnessTransactionSubmissionRound
-- RegistrationRound
-- RegistrationStartupRound
-- ResetAndPauseRound
-- ResetRound
-- SelectKeeperOracleRound
-- SelectKeeperSafeRound
-- SelectKeeperTransactionSubmissionARound
-- SelectKeeperTransactionSubmissionBRound
-- SelectKeeperTransactionSubmissionBRoundAfterTimeout
-- SynchronizeLateMessagesRound
-- TxHashRound
-- ValidateOracleRound
-- ValidateSafeRound
-- ValidateTransactionRound
-transition_func:
- (CheckLateTxHashesRound, CHECK_LATE_ARRIVING_MESSAGE): SynchronizeLateMessagesRound
- (CheckLateTxHashesRound, CHECK_TIMEOUT): CheckLateTxHashesRound
- (CheckLateTxHashesRound, DONE): ResetAndPauseRound
- (CheckLateTxHashesRound, NEGATIVE): ResetAndPauseRound
- (CheckLateTxHashesRound, NONE): ResetAndPauseRound
- (CheckLateTxHashesRound, NO_MAJORITY): ResetAndPauseRound
- (CheckTransactionHistoryRound, CHECK_LATE_ARRIVING_MESSAGE): SynchronizeLateMessagesRound
- (CheckTransactionHistoryRound, CHECK_TIMEOUT): CheckTransactionHistoryRound
- (CheckTransactionHistoryRound, DONE): ResetAndPauseRound
- (CheckTransactionHistoryRound, NEGATIVE): SelectKeeperTransactionSubmissionBRound
- (CheckTransactionHistoryRound, NONE): ResetAndPauseRound
- (CheckTransactionHistoryRound, NO_MAJORITY): CheckTransactionHistoryRound
- (CollectObservationRound, DONE): EstimateConsensusRound
- (CollectObservationRound, NO_MAJORITY): CollectObservationRound
- (CollectObservationRound, ROUND_TIMEOUT): CollectObservationRound
- (CollectSignatureRound, DONE): FinalizationRound
- (CollectSignatureRound, NO_MAJORITY): ResetRound
- (CollectSignatureRound, ROUND_TIMEOUT): CollectSignatureRound
- (DeployOracleRound, DEPLOY_TIMEOUT): SelectKeeperOracleRound
- (DeployOracleRound, DONE): ValidateOracleRound
- (DeployOracleRound, FAILED): SelectKeeperOracleRound
- (DeploySafeRound, DEPLOY_TIMEOUT): SelectKeeperSafeRound
- (DeploySafeRound, DONE): ValidateSafeRound
- (DeploySafeRound, FAILED): SelectKeeperSafeRound
- (EstimateConsensusRound, DONE): TxHashRound
- (EstimateConsensusRound, NONE): CollectObservationRound
- (EstimateConsensusRound, NO_MAJORITY): CollectObservationRound
- (EstimateConsensusRound, ROUND_TIMEOUT): CollectObservationRound
- (FinalizationRound, CHECK_HISTORY): CheckTransactionHistoryRound
- (FinalizationRound, CHECK_LATE_ARRIVING_MESSAGE): SynchronizeLateMessagesRound
- (FinalizationRound, DONE): ValidateTransactionRound
- (FinalizationRound, FINALIZATION_FAILED): SelectKeeperTransactionSubmissionBRound
- (FinalizationRound, FINALIZE_TIMEOUT): SelectKeeperTransactionSubmissionBRoundAfterTimeout
- (FinalizationRound, INSUFFICIENT_FUNDS): SelectKeeperTransactionSubmissionBRound
- (RandomnessOracleRound, DONE): SelectKeeperOracleRound
- (RandomnessOracleRound, NO_MAJORITY): RandomnessOracleRound
- (RandomnessOracleRound, ROUND_TIMEOUT): RandomnessOracleRound
- (RandomnessSafeRound, DONE): SelectKeeperSafeRound
- (RandomnessSafeRound, NO_MAJORITY): RandomnessSafeRound
- (RandomnessSafeRound, ROUND_TIMEOUT): RandomnessSafeRound
- (RandomnessTransactionSubmissionRound, DONE): SelectKeeperTransactionSubmissionARound
- (RandomnessTransactionSubmissionRound, NO_MAJORITY): RandomnessTransactionSubmissionRound
- (RandomnessTransactionSubmissionRound, ROUND_TIMEOUT): RandomnessTransactionSubmissionRound
- (RegistrationRound, DONE): CollectObservationRound
- (RegistrationRound, NO_MAJORITY): RegistrationRound
- (RegistrationStartupRound, DONE): RandomnessSafeRound
- (RegistrationStartupRound, FAST_FORWARD): CollectObservationRound
- (ResetAndPauseRound, DONE): CollectObservationRound
- (ResetAndPauseRound, NO_MAJORITY): RegistrationRound
- (ResetAndPauseRound, RESET_AND_PAUSE_TIMEOUT): RegistrationRound
- (ResetRound, DONE): RandomnessTransactionSubmissionRound
- (ResetRound, NO_MAJORITY): ResetAndPauseRound
- (ResetRound, RESET_TIMEOUT): ResetAndPauseRound
- (SelectKeeperOracleRound, DONE): DeployOracleRound
- (SelectKeeperOracleRound, NO_MAJORITY): RandomnessOracleRound
- (SelectKeeperOracleRound, ROUND_TIMEOUT): RandomnessOracleRound
- (SelectKeeperSafeRound, DONE): DeploySafeRound
- (SelectKeeperSafeRound, NO_MAJORITY): RandomnessSafeRound
- (SelectKeeperSafeRound, ROUND_TIMEOUT): RandomnessSafeRound
- (SelectKeeperTransactionSubmissionARound, DONE): CollectSignatureRound
- (SelectKeeperTransactionSubmissionARound, INCORRECT_SERIALIZATION): ResetAndPauseRound
- (SelectKeeperTransactionSubmissionARound, NO_MAJORITY): ResetRound
- (SelectKeeperTransactionSubmissionARound, ROUND_TIMEOUT): SelectKeeperTransactionSubmissionARound
- (SelectKeeperTransactionSubmissionBRound, DONE): FinalizationRound
- (SelectKeeperTransactionSubmissionBRound, INCORRECT_SERIALIZATION): ResetAndPauseRound
- (SelectKeeperTransactionSubmissionBRound, NO_MAJORITY): ResetRound
- (SelectKeeperTransactionSubmissionBRound, ROUND_TIMEOUT): SelectKeeperTransactionSubmissionBRound
- (SelectKeeperTransactionSubmissionBRoundAfterTimeout, CHECK_HISTORY): CheckTransactionHistoryRound
- (SelectKeeperTransactionSubmissionBRoundAfterTimeout, CHECK_LATE_ARRIVING_MESSAGE): SynchronizeLateMessagesRound
- (SelectKeeperTransactionSubmissionBRoundAfterTimeout, DONE): FinalizationRound
- (SelectKeeperTransactionSubmissionBRoundAfterTimeout, INCORRECT_SERIALIZATION): ResetAndPauseRound
- (SelectKeeperTransactionSubmissionBRoundAfterTimeout, NO_MAJORITY): ResetRound
- (SelectKeeperTransactionSubmissionBRoundAfterTimeout, ROUND_TIMEOUT): SelectKeeperTransactionSubmissionBRoundAfterTimeout
- (SynchronizeLateMessagesRound, DONE): CheckLateTxHashesRound
- (SynchronizeLateMessagesRound, MISSED_AND_LATE_MESSAGES_MISMATCH): ResetAndPauseRound
- (SynchronizeLateMessagesRound, NONE): SelectKeeperTransactionSubmissionBRound
- (SynchronizeLateMessagesRound, NO_MAJORITY): SynchronizeLateMessagesRound
- (SynchronizeLateMessagesRound, ROUND_TIMEOUT): SynchronizeLateMessagesRound
- (TxHashRound, DONE): RandomnessTransactionSubmissionRound
- (TxHashRound, NONE): CollectObservationRound
- (TxHashRound, NO_MAJORITY): CollectObservationRound
- (TxHashRound, ROUND_TIMEOUT): CollectObservationRound
- (ValidateOracleRound, DONE): CollectObservationRound
- (ValidateOracleRound, NEGATIVE): RandomnessOracleRound
- (ValidateOracleRound, NONE): RandomnessOracleRound
- (ValidateOracleRound, NO_MAJORITY): RandomnessOracleRound
- (ValidateOracleRound, VALIDATE_TIMEOUT): RandomnessOracleRound
- (ValidateSafeRound, DONE): RandomnessOracleRound
- (ValidateSafeRound, NEGATIVE): RandomnessSafeRound
- (ValidateSafeRound, NONE): RandomnessSafeRound
- (ValidateSafeRound, NO_MAJORITY): RandomnessSafeRound
- (ValidateSafeRound, VALIDATE_TIMEOUT): RandomnessSafeRound
- (ValidateTransactionRound, DONE): ResetAndPauseRound
- (ValidateTransactionRound, NEGATIVE): CheckTransactionHistoryRound
- (ValidateTransactionRound, NONE): SelectKeeperTransactionSubmissionBRound
- (ValidateTransactionRound, NO_MAJORITY): ValidateTransactionRound
- (ValidateTransactionRound, VALIDATE_TIMEOUT): SelectKeeperTransactionSubmissionBRound
-```
-
-
diff --git a/docs/demos/price_oracle_intro.md b/docs/demos/price_oracle_intro.md
deleted file mode 100644
index 5918162923..0000000000
--- a/docs/demos/price_oracle_intro.md
+++ /dev/null
@@ -1,164 +0,0 @@
-# Price Oracle Agent Service Demo
-
-The goal of this demo is to demonstrate an agent service that provides an estimation
-of the Bitcoin price (USD) based on observations coming from different data sources,
-e.g., CoinMarketCap, CoinGecko, Binance and Coinbase.
-Each agent collects an observation from one of the data sources above and
-shares it with the rest of the agents through the consensus gadget (Tendermint).
-Once all the observations are settled, each agent
-computes locally a deterministic function that aggregates the observations made by all the
-agents, and obtains an estimate of the Bitcoin price. In this demo, we consider the
-average of the observed values.
-The local estimates made by all the agents are shared, and
-a consensus is reached when one estimate
-reaches $\lceil(2n + 1) / 3\rceil$ of the total voting power committed
-on the consensus gadget.
-Once the consensus on an estimate has been reached, a multi-signature transaction
-with $\lceil(2n + 1) / 3\rceil$ of the participants' signatures is settled on the
-Ethereum chain, which is emulated by a local Hardhat node in the demo.
-
-
-## Architecture of the demo
-This demo is composed of:
-
-- A [HardHat](https://hardhat.org/) node (emulating an Ethereum blockchain).
-- A set of four [Tendermint](https://tendermint.com/) nodes (`node0`, `node1`, `node2`, `node3`).
-- A set of four AEAs (`abci0`, `abci1`, `abci2`, `abci3`), in one-to-one connection with their corresponding Tendermint
-node.
-
-
-
-
-## Running the demo
-
-Before running the demo, ensure that your machine satisfies the [framework requirements](../guides/set_up.md#requirements) and that
-you have followed the [setup instructions](../guides/set_up.md#setup). As a result you should have a Pipenv workspace folder.
-
-To run the Price Oracle service follow the instructions in the [OracleKit section](https://docs.autonolas.network/product/oraclekit/#demo), which contains the necessary steps to download the service from the Service Registry, build and run a deployment locally with a local [HardHat](https://hardhat.org/) node.
-
-
-## Interacting with the demo
-
-The logs of a single agent or [Tendermint](https://tendermint.com/) node can be inspected in another terminal with, e.g.,
-
-```bash
-docker logs --follow
-```
-
-where `` refers to the Docker container ID for either an agent
-(`abci0`, `abci1`, `abci2` and `abci3`) or a [Tendermint](https://tendermint.com/) node (`node0`, `node1`, `node2` and `node3`).
-
-By examining the logs of an agent container, you will see a message similar to the one depicted below, after the framework successfully builds and starts it:
-
-```
- / \ | ____| / \
- / _ \ | _| / _ \
- / ___ \ | |___ / ___ \
-/_/ \_\|_____|/_/ \_\
-
-v1.16.0
-
-All available packages.
-================================================================================
-| Package | IPFSHash |
-================================================================================
- | |
-(...) | |
- | |
-================================================================================
-
-All instantiated components
-======================================================
-| ComponentId |
-======================================================
-| (protocol, valory/ledger_api:1.0.0) |
-| (protocol, open_aea/signing:1.0.0) |
-| (protocol, valory/acn:1.1.0) |
-| (protocol, valory/http:1.0.0) |
-| (protocol, valory/tendermint:0.1.0) |
-| (protocol, valory/abci:0.1.0) |
-| (protocol, valory/contract_api:1.0.0) |
-| (connection, valory/abci:0.1.0) |
-| (connection, valory/http_client:0.1.0) |
-| (connection, valory/ledger:0.1.0) |
-| (contract, valory/gnosis_safe_proxy_factory:0.1.0) |
-| (contract, valory/gnosis_safe:0.1.0) |
-| (contract, valory/offchain_aggregator:0.1.0) |
-| (contract, valory/service_registry:0.1.0) |
-| (skill, valory/oracle_abci:0.1.0) |
-======================================================
-
-All available addresses.
-=========================================================
-| Name | Address |
-=========================================================
-| ethereum | 0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65 |
-=========================================================
-```
-
-Following that, you will find the log messages indicating the different stages that the agent is currently executing:
-
-```
-Starting AEA 'agent' in 'async' mode...
-[INFO] [agent] Entered in the 'registration_startup' round for period 0
-[INFO] [agent] Start processing messages...
-[INFO] [agent] Entered in the 'registration_startup' behaviour
-[INFO] [agent] Checking sync...
-[INFO] [agent] Checking status @ http://node0:26657/status
-[ERROR] [agent] Tendermint not accepting transactions yet, trying again!
-[INFO] [agent] Checking status @ http://node0:26657/status
-[ERROR] [agent] Tendermint not accepting transactions yet, trying again!
-[INFO] [agent] Checking status @ http://node0:26657/status
-[INFO] [agent] local height == remote == 0; Sync complete...
-[INFO] [agent] Sharing Tendermint config on start-up?: False
-[INFO] [agent] arrived block with timestamp: 2022-08-02 20:19:20.382918
-[INFO] [agent] current AbciApp time: None
-[INFO] [agent] no pending timeout, move time forward
-[INFO] Created a new local deadline for the next `begin_block` request from the Tendermint node: 2022-08-02 20:21:22.036121
-[INFO] [agent] arrived block with timestamp: 2022-08-02 20:20:21.841451
-[INFO] [agent] current AbciApp time: 2022-08-02 20:19:20.382918
-[INFO] [agent] no pending timeout, move time forward
-[INFO] Created a new local deadline for the next `begin_block` request from the Tendermint node: 2022-08-02 20:21:23.463276
-[INFO] [agent] 'registration_startup' round is done with event: Event.DONE
-[INFO] [agent] scheduling timeout of 7.0 seconds for event Event.ROUND_TIMEOUT with deadline 2022-08-02 20:20:28.841451
-[INFO] [agent] Entered in the 'randomness_safe' round for period 0
-[INFO] [agent] Entered in the 'randomness_safe' behaviour
-[INFO] [agent] Retrieving DRAND values from api.
-[INFO] [agent] Verifying DRAND values.
-[INFO] [agent] DRAND check successful.
-```
-
-From the logs, you can see how the agent traverses the different states of the
-{{fsm_app}}: registration, randomness collection, keeper selection, price collection, price estimation, etc.
-For example, note how this particular agent collects the Bitcoin price from CoinGecko:
-
-```
-[INFO] [agent] Entered in the 'collect_observation' round for period 19
-[INFO] [agent] Entered in the 'collect_observation' behaviour
-[INFO] [agent] Got observation of BTC price in USD from coingecko: 23112.0
-[INFO] [agent] arrived block with timestamp: 2022-08-02 22:51:16.858947
-[INFO] [agent] current AbciApp time: 2022-08-02 22:51:15.566192
-[INFO] Created a new local deadline for the next `begin_block` request from the Tendermint node: 2022-08-02 22:52:18.304367
-[INFO] [agent] 'collect_observation' round is done with event: Event.DONE
-[INFO] [agent] scheduling timeout of 7.0 seconds for event Event.ROUND_TIMEOUT with deadline 2022-08-02 22:51:23.858947
-```
-
-Afterwards, the agent estimate the price based on all the different observations collected and forwarded by all the agents:
-
-```
-[INFO] [agent] Entered in the 'estimate_consensus' round for period 19
-[INFO] [agent] Entered in the 'estimate' behaviour
-[INFO] [agent] Got estimate of BTC price in USD: 23117.695, Using aggregator method: median
-[INFO] [agent] arrived block with timestamp: 2022-08-02 22:51:18.194988
-[INFO] [agent] current AbciApp time: 2022-08-02 22:51:16.858947
-[INFO] Created a new local deadline for the next `begin_block` request from the Tendermint node: 2022-08-02 22:52:19.744814
-[INFO] [agent] 'estimate_consensus' round is done with event: Event.DONE
-[INFO] [agent] scheduling timeout of 7.0 seconds for event Event.ROUND_TIMEOUT with deadline 2022-08-02 22:51:25.194988
-```
-
-In order to fully understand what are the constituent states that the {{fsm_app}} is traversing,
-we refer you to the [technical details](price_oracle_technical_details.md) of the demo, and also to
-the [composition of FSMs](price_oracle_fsms.md) that make up the agents' {{fsm_app}}.
diff --git a/docs/demos/price_oracle_technical_details.md b/docs/demos/price_oracle_technical_details.md
deleted file mode 100644
index afd3c4cfe3..0000000000
--- a/docs/demos/price_oracle_technical_details.md
+++ /dev/null
@@ -1,299 +0,0 @@
-#Price Oracle - Technical Details
-
-Agents communicate directly to their local Tendermint node, whereas the `AbciApp`
-is used to handle requests they receive (e.g., in response to their behaviour).
-
-In addition to other general-use components (e.g., signing, HTTP client), the components of the AEAs related to the implementation of the agent service are:
-
-- Protocol `valory/abci:0.1.0`: it allows representing
- ABCI request and response messages.
-- Connection `valory/abci:0.1.0`: it accepts ABCI requests
- from a consensus engine module, e.g. the Tendermint node;
-- Skill `valory/abstract_abci:0.1.0`: it provides a
- scaffold handler for ABCI requests. It is an abstract skill.
-- Skill `valory/abstract_round_abci:0.1.0`: it
- implements an ABCI handler and provides
- useful code abstractions for creating round-based
- replicated state machines, based on the ABCI protocol
- (e.g. `Period`, `AbstractRound`). It is an abstract skill.
-
-Moreover, it has the following specific components to implement the particular case of the price oracle agent service:
-
-- `valory/price_estimation_abci`: it implements the round-based
- ABCI application for price estimation of a cryptocurrency,
- with a finalization step over an Ethereum chain.
-
-
-## The constituent {{fsm_app}}s
-
-The ABCI-based replicated FSM (`AbciApp`) used for price estimation consists
-of several smaller modules, each of which is an `AbciApp` of its own. Each of
-them is a `Skill`, which implies that they operate independently of each other,
-however they can be combined to create a larger `AbciApp`, provided that the
-developer specifies the required transition mapping to connect these FSMs.
-This modularity allows a developer to use a subset of these skills in different
-contexts, potentially in combination with skills they themselves define, to
-create another composite `AbciApp` that performs according to their particular
-needs. Specifically, the `PriceEstimationAbciApp` is created by combining the
-following parts:
-
-- `AgentRegistrationAbciApp`
-- `SafeDeploymentAbciApp`
-- `OracleDeploymentAbciApp`
-- `PriceAggregationAbciApp`
-- `TransactionSubmissionAbciApp`
-- `ResetPauseAbciApp`
-
-### The `AgentRegistrationAbciApp`
-
-This `AbciApp` implements the registration of agents to partake in the behaviour
-scheduled in subsequent rounds.
-
-0. `RegistrationStartupRound`
-
-1. `RegistrationRound`
- In this round registrations from AEAs to join the period are accepted, up to
- a configured maximum number of participants (in the demo, this limit is 4);
- once this threshold is hit ("registration threshold"), the round is finished.
-
-2. `FinishedRegistrationRound`
- A round that signals agent registration was successful, but service contracts has not been already deployed.
-
-3. `FinishedRegistrationFFWRound`
- A round that signals agent registration was successful, and the service contracts are already deployed.
-
-
-### The `SafeDeploymentAbciApp`
-
-This `AbciApp` implements the deployments of a Gnosis safe contract, which is
-a multisig smart contract wallet that requires a minimum number of people to
-approve a transaction before it can occur. This assures that no single agent
-can compromise the funds contained in it.
-
-0. `RandomnessSafeRound`
- Some randomness is retrieved to be used in a keeper agent selection. In
- particular, agents individually request the latest random number from
- [DRAND](https://drand.love), establish consensus on it and then use
- it as a seed for computations requiring randomness (e.g. keeper selection).
-
-1. `SelectKeeperSafeRound`
- The agents agree on a new keeper that will be in charge of sending deploying
- the multisig wallet and settling transactions.
-
-2. `DeploySafeRound`
- A designated sender among the participants of the current period deploys a
- Gnosis Safe contract with all the
- participants as owners and with `ceil((2n + 1) / 3)` as threshold. If the
- safe deployment has not been completed after some time, a new keeper will be
- selected and the safe deployment will be re-run.
-
-3. `ValidateSafeRound`
- All agents validate the previous deployment to ensure that the correct
- contract with the correct settings has been deployed. If the safe deployment
- could not be verified, the process will start again from the registration
- round.
-
-4. `FinishedSafeRound`
- A round that signals the safe contract was deployed successfully.
-
-
-### The `OracleDeploymentAbciApp`
-
-This `AbciApp` implements the deployments of an Oracle contract, a Gnosis safe
-multisig smart contract wallet that was forked from [Chainlink](https://chain.link/)
-and subsequently stripped from unnecessary data structures and behaviours.
-
-0. `RandomnessOracleRound`
- Similar as to the `RandomnessSafeRound`, randomness is retrieved here, this
- time for the selection of an agent to become the oracle keeper.
-
-1. `SelectKeeperOracleRound`
- The agents select a new keeper that will be in charge of sending deploying
- the multisig wallet and settling transactions.
-
-2. `DeployOracleRound`
- The designated keeper deploys a Gnosis safe contract. If a timeout occurs
- before oracle deployment was completed, a new keeper will be selected and
- the oracle deployment will be re-run.
-
-3. `ValidateOracleRound`
- all agents verify that the Oracle contract has been deployed using the
- expected settings. If that's not the case, agents will restart the period.
-
-4. `FinishedOracleRound`
- A round that signals the oracle contract was deployed successfully.
-
-
-### The `PriceAggregationAbciApp`
-
-This `AbciApp` implements off-chain aggregation of observations by the agents.
-Once the majority of agents has submitted their observation these are shared
-with all agents as they move to the price estimation round. In this next round
-each of the agents performs off-chain a computation on the data set, which could
-be a simple summary statistic or an estimate derived from a complex model -
-either way this is something that cannot be done on-chain. Once consensus is
-reached on this estimate, the aggregate value is submitted and recorded
-on-chain in the next block that is mined.
-
-0. `CollectObservationRound`
- Observational data is collected by the AEAs on the target quantity to
- estimate. Once the agents reach consensus over this data, that is to say at
- least 2/3rd of them agree on the set of single observations collected by
- agents (not on individual observations), the shared state gets updated and
- the agents enter the next round.
-
-1. `EstimateConsensusRound`
- Based on the collected data the actual price of the asset is estimated, which
- could be a simple summary statistic such as the median or the geometric mean.
- Once the same estimate receives a number of votes greater or equal than
- 2/3 of the total voting power, consensus is reached and the period moves
- forward.
-
-2. `TxHashRound`
- A designated sender composes the transaction and puts it on the temporary
- Tendermint-based chain. Signing of the transaction for the multisig smart
- contract requires consensus among the agents on the transaction hash to use.
-
-3. `FinishedPriceAggregationRound`
- A round that signals price aggregation was completed successfully.
-
-
-### The `TransactionSubmissionAbciApp`
-
-0. `RandomnessTransactionSubmissionRound`
- Randomness is retrieved for keeper selection.
-
-1. `SelectKeeperTransactionSubmissionARound`
- The agents select a keeper that will be in charge of sending the transaction.
-
-2. `CollectSignatureRound`
- Agents sign the transaction to be submitted.
-
-3. `FinalizationRound`
- The keeper sends off the transaction to be incorporated in the next block.
- A transaction hash is returned. This round takes care of submitting
- with the right amount of gas, i.e., if resubmitting, then the "tip" for the miners
- is also increased by 10%.
-
-4. `ValidateTransactionRound`
- Agents validate whether the transaction has been incorporated in the
- blockchain.
-
-5. `CheckTransactionHistoryRound`
- This round is triggered if the `ValidateTransactionRound` returns with
- a `NEGATIVE` `Event`, which means that the transaction has not been validated.
- During the round, the agents check the transaction history up to this point again
- in order to specify the cause of the problem, e.g., a transaction of a keeper
- was settled before another keeper managed to do so, a payload is invalid, etc.
-
-6. `SelectKeeperTransactionSubmissionBRound`
- The agents select a keeper that will be in charge of sending the transaction,
- in case that the first keeper has failed.
-
-7. `ResetRound`
- In case that a failure such as round timeout or no majority reached, the period
- is reset.
-
-8. `ResetAndPauseRound`
- A round that updates the `SynchronizedData` to allocate a new period before going to the
- `FinishedTransactionSubmissionRound`.
-
-9. `FinishedTransactionSubmissionRound`
- A round that signals transaction submission was completed successfully.
-
-10. `FailedRound`
- A round that signals transaction submission has failed. Occurs if the
- `CheckTransactionHistoryRound` does not manage to find a validated transaction
- in the history, or if a Reset round fails.
-
-
-### Implementation of the `PriceEstimationAbciApp`
-
-In the final implementation the `PriceEstimationAbciApp` is then assembled from
-its constituent parts. However, in order to combine the various FSMs previously
-discussed, a transition mapping between states of these FSMs also needs to be
-provided. In order to combine the different FSMs we need to connect them by
-providing the necessary transition mapping. As per the code implemented in the
-demo, the implementation looks as follows:
-
-```python
-abci_app_transition_mapping: AbciAppTransitionMapping = {
- FinishedRegistrationRound: RandomnessSafeRound,
- FinishedSafeRound: RandomnessOracleRound,
- FinishedOracleRound: CollectObservationRound,
- FinishedRegistrationFFWRound: CollectObservationRound,
- FinishedPriceAggregationRound: RandomnessTransactionSubmissionRound,
- FailedRound: ResetAndPauseRound,
- FinishedTransactionSubmissionRound: ResetAndPauseRound,
- FinishedResetAndPauseRound: CollectObservationRound,
- FinishedResetAndPauseErrorRound: RegistrationRound,
-}
-
-OracleAbciApp = chain(
- (
- AgentRegistrationAbciApp,
- SafeDeploymentAbciApp,
- OracleDeploymentAbciApp,
- PriceAggregationAbciApp,
- TransactionSubmissionAbciApp,
- ResetPauseAbciApp,
- ),
- abci_app_transition_mapping,
-)
-```
-
-Find below a graphical representation of this composition showing how the constituent FSMs interconnect to achieve the
-functionality of the agent service in the demo.
-
-
-
-
-The AbstractRoundBehaviour schedules the state behaviour associated with the current round, ensuring that a transition to the new state cannot occur without first invoking the associated state Behaviour. Since it is composed of the Behaviours belonging to the constituent FSMs, we can reference them as depicted below.
-
-
-```python
-class OracleAbciAppConsensusBehaviour(AbstractRoundBehaviour):
- """This behaviour manages the consensus stages for the price estimation."""
-
- initial_behaviour_cls = RegistrationStartupBehaviour
- abci_app_cls = OracleAbciApp # type: ignore
- behaviours: Set[Type[BaseBehaviour]] = {
- *OracleDeploymentRoundBehaviour.behaviours,
- *AgentRegistrationRoundBehaviour.behaviours,
- *SafeDeploymentRoundBehaviour.behaviours,
- *TransactionSettlementRoundBehaviour.behaviours,
- *ResetPauseABCIConsensusBehaviour.behaviours,
- *ObserverRoundBehaviour.behaviours,
- }
-```
-
-Have a look at the [FSM diagram](./price_oracle_fsms.md) of the application in order
-to see what the encoded state transitions in the final composite FSM look like.
-
-!!! warning
-
- A sequence diagram that shows how AEAs communicate with their environment
- throughout the execution can be found [here](../key_concepts/poc-diagram.md). However,
- it is not fully up-to-date with the implementation discussed here.
-
-### Known limitations
-The `TransactionSettlementSkill` has a known limitation that concerns the revert reason lookup.
-While checking the history in `CheckTransactionHistoryRound`, an exception may get raised:
-
-```
-ValueError: The given transaction has not been reverted!
-```
-
-This error arises because of the way that we check for the revert reason; We currently
-[replay](https://github.com/valory-xyz/open-autonomy/blob/25c9eacae692551eb68aad3977017ca9c5fd337b/packages/valory/contracts/gnosis_safe/contract.py#L614-L619)
-the tx locally. However, there is an important limitation with this method. The replayed transaction will be
-executed in isolation. This means that transactions which occurred prior to the replayed transaction within
-the same block will not be accounted for! Therefore, the replay will not raise a `SolidityError` in such case,
-because both the transactions happened in the same block.
-
-The exception is handled automatically and logged as an error, so it does not affect the execution.
-However, as a side effect, we may end the round with a failure status even though the transaction has settled,
-because we have not managed to detect it.
diff --git a/docs/ethereum_specifics.md b/docs/ethereum_specifics.md
deleted file mode 100644
index 72e7c1599d..0000000000
--- a/docs/ethereum_specifics.md
+++ /dev/null
@@ -1,13 +0,0 @@
-## EIP-1559 Transactions
-
-With EIP-1559 transaction pricing has changed. Previously, one simply had to set `gasPrice`, now two new pricing parameters have to be set (`maxFeePerGas` and `maxPriorityFeePerGas`):
-
-- The Base Fee, which is determined by the network itself. And is subsequently burned. (The Base Fee targets 50% full blocks and is based upon the contents of the most recent confirmed block. Depending on how full that new block is, the Base Fee is automatically increased or decreased.)
-- A Max Priority Fee, which is optional, determined by the user, and is paid directly to miners. (While the Max Priority Fee is technically optional, at the moment most network participants estimate that transactions generally require a minimum 2.0 GWEI tip to be candidates for inclusion.)
-- The Max Fee Per Gas, which is the absolute maximum you are willing to pay per unit of gas to get your transaction included in a block. For brevity and clarity, we will refer to this as the Max Fee. (if the Base Fee plus the Max Priority Fee exceeds the Max Fee (see below), the Max Priority Fee will be reduced in order to maintain the upper bound of the Max Fee. E.g. heuristic: Max Fee = (2 * Base Fee) + Max Priority Fee. Doubling the Base Fee when calculating the Max Fee ensures that your transaction will remain marketable for six consecutive 100% full blocks. )
-
-Transactions that include these new fields are known as Type 2, while legacy transactions that carry the original Gas Price field remain supported and known as Type 0.
-
-EIP-1559 does not bring changes to the Gas Limit, the maximum amount of gas the transaction is authorized to consume.
-
-Sources: https://notes.ethereum.org/@vbuterin/eip-1559-faq
\ No newline at end of file
diff --git a/docs/guides/code_fsm_app_skill.md b/docs/guides/code_fsm_app_skill.md
index a54d9c2c5e..4f6e67fb94 100644
--- a/docs/guides/code_fsm_app_skill.md
+++ b/docs/guides/code_fsm_app_skill.md
@@ -36,7 +36,7 @@ You must ensure that your machine satisfies the [framework requirements](./set_u
* `rounds.py`,
* `payloads.py`.
- You should also define a number of test classes. You can review how the [demo services](../demos/index.md) are implemented, or read about the [internals of {{fsm_app}}s](../key_concepts/fsm_app_introduction.md) to learn how to populate the template classes.
+ You should also define a number of test classes. You can review how the [demo services](https://docs.autonolas.network/demos/) are implemented, or read about the [internals of {{fsm_app}}s](../key_concepts/fsm_app_introduction.md) to learn how to populate the template classes.
!!! tip
diff --git a/docs/guides/define_agent.md b/docs/guides/define_agent.md
index c26adc0066..e9b413c472 100644
--- a/docs/guides/define_agent.md
+++ b/docs/guides/define_agent.md
@@ -15,7 +15,7 @@ You must ensure that your machine satisfies the [framework requirements](./set_u
## Step-by-step instructions
-In order to deploy and run a service you need an agent with a working {{fsm_app}}. We base this guide on a default {{fsm_app}} available in the remote registry, namely, the `hello_world_abci` {{fsm_app}}. As a result, we will define an agent implementing a functionality equivalent to the [Hello World service](../demos/hello_world_demo.md). You can, of course, use your own {{fsm_app}} to define your agent.
+In order to deploy and run a service you need an agent with a working {{fsm_app}}. We base this guide on a default {{fsm_app}} available in the remote registry, namely, the `hello_world_abci` {{fsm_app}}. As a result, we will define an agent implementing a functionality equivalent to the [Hello World service](https://docs.autonolas.network/demos/hello-world/). You can, of course, use your own {{fsm_app}} to define your agent.
!!! warning "Important"
diff --git a/docs/guides/deploy_service.md b/docs/guides/deploy_service.md
index 367c00601a..2bbca33600 100644
--- a/docs/guides/deploy_service.md
+++ b/docs/guides/deploy_service.md
@@ -35,7 +35,7 @@ We illustrate the full local deployment workflow using the `hello_world` service
=== "Remote registry"
```bash
- autonomy fetch valory/hello_world:0.1.0:bafybeieoqhbwqmg5oiqgkxf6dlizncjvaermwtun4aijqcbyc6ulfl7o4q --service
+ autonomy fetch valory/hello_world:0.1.0:bafybeicdcrhpekqbwzeam2fi7npnl6qfwejgo73ftwoy4tofwbrsl5ene4 --service
```
2. **Build the agents' image.** Navigate to the service runtime folder that you have just created and build the Docker image of the agents of the service:
diff --git a/docs/guides/draft_service_idea_and_define_fsm_specification.md b/docs/guides/draft_service_idea_and_define_fsm_specification.md
index 7cb3953125..56bfba1796 100644
--- a/docs/guides/draft_service_idea_and_define_fsm_specification.md
+++ b/docs/guides/draft_service_idea_and_define_fsm_specification.md
@@ -9,7 +9,7 @@ The first task when designing an agent service is to describe its business logic
This guide covers steps 1 and 2 of the [development process](./overview_of_the_development_process.md). You will learn how to write the {{fsm_app}} specification that defines the main steps in the business logic of your service. The actual coding of the {{fsm_app}} will be covered in the next step.
-We will use as an example the FSM used in the [Hello World service](../demos/hello_world_demo.md), where a set of 4 agents coordinate and take turns to print a "Hello World" message in their local console.
+We will use as an example the FSM used in the [Hello World service](https://docs.autonolas.network/demos/hello-world/), where a set of 4 agents coordinate and take turns to print a "Hello World" message in their local console.
You must ensure that your machine satisfies the [framework requirements](./set_up.md#requirements), you have [set up the framework](./set_up.md#set-up-the-framework), and you have a local registry [populated with some default components](./set_up.md#populate-the-local-registry-for-the-guides). As a result you should have a Pipenv workspace folder with an initialized local registry (`./packages`) in it.
@@ -22,7 +22,7 @@ Describe the business logic of your service as an FSM. That is, determine, at a
* **Transitions** define how to move from one state to another based on the events observed (e.g., if the service observes an error event in a certain state, then move back to the initial state).
???+ example "Example of a service FSM"
- This is an example of the FSM of the [Hello World service](../demos/hello_world_demo.md), at high level. You can learn more about the purpose of each of the states, events and transitions in the [dedicated section](../demos/hello_world_demo.md).
+ This is an example of the FSM of the [Hello World service](https://docs.autonolas.network/demos/hello-world/), at high level. You can learn more about the purpose of each of the states, events and transitions in [its documentation page](https://docs.autonolas.network/demos/hello-world/).
![](../images/hello_world_fsm.svg)
@@ -40,7 +40,7 @@ Describe the business logic of your service as an FSM. That is, determine, at a
In the workspace folder, create a file `fsm_specification.yaml`, which formally encodes the FSM that you have designed in the previous step. This file must adhere to a syntax that is understood by the framework. Hopefully, the example below is self-explanatory.
???+ example "Example of an `fsm_specification.yaml` file"
- Given a draft of the FSM, the structure of the `fsm_specification.yaml` file is quite straightforward. Below we show the FSM specification file of the [Hello World service](../demos/hello_world_demo.md).
+ Given a draft of the FSM, the structure of the `fsm_specification.yaml` file is quite straightforward. Below we show the FSM specification file of the [Hello World service](https://docs.autonolas.network/demos/hello-world/).
```yaml title="fsm_specification.yaml"
alphabet_in:
diff --git a/docs/guides/quick_start.md b/docs/guides/quick_start.md
index bb3b48745e..cfc1a0be33 100644
--- a/docs/guides/quick_start.md
+++ b/docs/guides/quick_start.md
@@ -1,6 +1,6 @@
The purpose of this guide is to provide step-by-step instructions to gain familiarity with the [overall development process](./overview_of_the_development_process.md) of the {{open_autonomy}} framework.
-We will show how to use the CLI to run a local deployment of the [Hello World service](../demos/hello_world_demo.md), which comprises:
+We will show how to use the CLI to run a local deployment of the [Hello World service](https://docs.autonolas.network/demos/hello-world/), which comprises:
- 4 Docker containers implementing the 4 agents of the service, and
- 4 Docker containers implementing a Tendermint node for each agent.
@@ -17,10 +17,10 @@ Before starting this guide, ensure that your machine satisfies the framework req
On **MacOS** and **Windows**, running Docker containers requires having Docker Desktop running as well. If you're using one of those operating systems, remember to start Docker Desktop
before you run agent services.
-1. Fetch the [Hello World service](../demos/hello_world_demo.md) from the remote registry. Within the workspace folder (not the remote registry) run:
+1. Fetch the [Hello World service](https://docs.autonolas.network/demos/hello-world/) from the remote registry. Within the workspace folder (not the remote registry) run:
```bash
- autonomy fetch valory/hello_world:0.1.0:bafybeieoqhbwqmg5oiqgkxf6dlizncjvaermwtun4aijqcbyc6ulfl7o4q --service
+ autonomy fetch valory/hello_world:0.1.0:bafybeicdcrhpekqbwzeam2fi7npnl6qfwejgo73ftwoy4tofwbrsl5ene4 --service
```
2. Build the Docker image of the service agents:
@@ -99,7 +99,7 @@ Before starting this guide, ensure that your machine satisfies the framework req
autonomy deploy run
```
- This will deploy the [Hello World service](../demos/hello_world_demo.md) locally with four agents connected to four Tendermint nodes.
+ This will deploy the [Hello World service](https://docs.autonolas.network/demos/hello-world/) locally with four agents connected to four Tendermint nodes.
You can cancel the local execution at any time by pressing ++ctrl+c++.
diff --git a/docs/guides/set_up.md b/docs/guides/set_up.md
index 7a70e7baa4..cb6590a50c 100644
--- a/docs/guides/set_up.md
+++ b/docs/guides/set_up.md
@@ -75,7 +75,7 @@ This is roughly how your workspace should look like:
You can override the default registry in use (set up with `autonomy init`) for a particular command through the flags `--registry-path` and `--local`. For example, if the framework was initialized with the remote registry, the following command will fetch a runtime folder for the `hello_world` agent from the remote registry:
```bash
- autonomy fetch valory/hello_world:0.1.0:bafybeibwluqq2yywd3stax2kuiqnv4zxxu3rprfkbn7f7e6sf2gelpkdqa
+ autonomy fetch valory/hello_world:0.1.0:bafybeiakoj6jpj5gqyjk5qz2ibgvplgd4azqwxmi56aei7xpu5z47np3e4
```
On the other hand, if you want to fetch the copy stored in your local registry, then you can use:
@@ -106,8 +106,8 @@ If you plan to follow the guides in the next sections, you need to populate the
"dev": {
},
"third_party": {
- "service/valory/hello_world/0.1.0": "bafybeieoqhbwqmg5oiqgkxf6dlizncjvaermwtun4aijqcbyc6ulfl7o4q",
- "agent/valory/hello_world/0.1.0": "bafybeibwluqq2yywd3stax2kuiqnv4zxxu3rprfkbn7f7e6sf2gelpkdqa",
+ "service/valory/hello_world/0.1.0": "bafybeicdcrhpekqbwzeam2fi7npnl6qfwejgo73ftwoy4tofwbrsl5ene4",
+ "agent/valory/hello_world/0.1.0": "bafybeiakoj6jpj5gqyjk5qz2ibgvplgd4azqwxmi56aei7xpu5z47np3e4",
"connection/valory/abci/0.1.0": "bafybeih6ei7q3vdsj57nb3f6dirccorj7izrxccjzys3seirzoalsj2fwq",
"connection/valory/http_client/0.23.0": "bafybeifgeqgryx6b3s6eseyzyezygmeitcpt3tkor2eiycozoi6clgdrny",
"connection/valory/ipfs/0.1.0": "bafybeiaddby5hxegt2fk772fzn34zpwndyfk45rc3jqtblhtr2tbzcicua",
@@ -123,7 +123,7 @@ If you plan to follow the guides in the next sections, you need to populate the
"protocol/valory/tendermint/0.1.0": "bafybeig6g6twajlwssfbfp5rlnu5mwzuu5kgak5cs4fich7rlkx6whesnu",
"skill/valory/abstract_abci/0.1.0": "bafybeidek3doh6cs3qw3hzgnqw65st2g5vhx5bgkdztyrer45wewttagui",
"skill/valory/abstract_round_abci/0.1.0": "bafybeiavfdmszwpotgdw5wd2imxcwsigygczvttxk5onswt72ipbdyjp3q",
- "skill/valory/hello_world_abci/0.1.0": "bafybeideckfxmkvdnjfvfgbcit6x4gxxwtbalttyxfslh22czxsb7zkstm",
+ "skill/valory/hello_world_abci/0.1.0": "bafybeibu3fdkjmawysvbwcn77pzpfw2d4the4ok7jod3jmdiqn4rzms37e",
"connection/valory/p2p_libp2p_client/0.1.0": "bafybeihge56dn3xep2dzomu7rtvbgo4uc2qqh7ljl3fubqdi2lq44gs5lq"
}
}
diff --git a/docs/images/hello_world_action.svg b/docs/images/hello_world_action.svg
deleted file mode 100644
index 489f0e13ac..0000000000
--- a/docs/images/hello_world_action.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/docs/images/hello_world_agent_internal.svg b/docs/images/hello_world_agent_internal.svg
deleted file mode 100644
index a432691820..0000000000
--- a/docs/images/hello_world_agent_internal.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/docs/images/hello_world_demo_architecture_simplified.svg b/docs/images/hello_world_demo_architecture_simplified.svg
deleted file mode 100644
index 37eb6643af..0000000000
--- a/docs/images/hello_world_demo_architecture_simplified.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/docs/images/hello_world_result.svg b/docs/images/hello_world_result.svg
deleted file mode 100644
index 3301188471..0000000000
--- a/docs/images/hello_world_result.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/docs/images/hello_world_sequence_1.svg b/docs/images/hello_world_sequence_1.svg
deleted file mode 100644
index 17243e2719..0000000000
--- a/docs/images/hello_world_sequence_1.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/docs/images/hello_world_sequence_2.svg b/docs/images/hello_world_sequence_2.svg
deleted file mode 100644
index 4c7048113a..0000000000
--- a/docs/images/hello_world_sequence_2.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/docs/images/hello_world_sequence_3.svg b/docs/images/hello_world_sequence_3.svg
deleted file mode 100644
index 199325a59f..0000000000
--- a/docs/images/hello_world_sequence_3.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/docs/images/hello_world_sequence_4.svg b/docs/images/hello_world_sequence_4.svg
deleted file mode 100644
index 2032e2a30a..0000000000
--- a/docs/images/hello_world_sequence_4.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/docs/images/hello_world_sequence_5.svg b/docs/images/hello_world_sequence_5.svg
deleted file mode 100644
index 901047d9c2..0000000000
--- a/docs/images/hello_world_sequence_5.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/docs/images/hello_world_zoom_agent.svg b/docs/images/hello_world_zoom_agent.svg
deleted file mode 100644
index c77f9aa805..0000000000
--- a/docs/images/hello_world_zoom_agent.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/docs/images/oracle_composition.svg b/docs/images/oracle_composition.svg
deleted file mode 100644
index ce2b7921e3..0000000000
--- a/docs/images/oracle_composition.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/docs/images/oracle_diagram.svg b/docs/images/oracle_diagram.svg
deleted file mode 100644
index 3695f6a5c1..0000000000
--- a/docs/images/oracle_diagram.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/docs/index.md b/docs/index.md
index 79c203faba..858b1a2413 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -44,13 +44,6 @@ Follow the guides to learn how to use the framework to **create and deploy agent
------
-A tour to **existing agent services** that you can explore and use as a reference
-for your implementations.
-
-[Demos](./demos/index.md){ .md-button }
-
-------
-
Detailed topics on how the **internal components** of an agent service work with the
framework.
diff --git a/docs/package_list.md b/docs/package_list.md
index f332e03c1a..c7d0d87178 100644
--- a/docs/package_list.md
+++ b/docs/package_list.md
@@ -23,20 +23,17 @@
| skill/valory/termination_abci/0.1.0 | `bafybeigddtcgeia5xkz4i6pnagvyrwotuef53vwq5ywppncbof3fph472u` | Termination skill. |
| skill/valory/counter/0.1.0 | `bafybeiebxovit5k2fsr4r3fisqov53ek34xwanxly34eeo3ublxt2tyche` | The ABCI Counter application example. |
| skill/valory/counter_client/0.1.0 | `bafybeihx46fr7vgqjxmymfah3hfmynzpzwe5fthi7mbc2cnev2gqgtngzy` | A client for the ABCI counter application. |
-| skill/valory/hello_world_abci/0.1.0 | `bafybeideckfxmkvdnjfvfgbcit6x4gxxwtbalttyxfslh22czxsb7zkstm` | Hello World ABCI application. |
| skill/valory/register_reset_abci/0.1.0 | `bafybeidi4ors7jahoutqoozm5n62vvveeh4nowj4u43yuokd6rfwn7r5mm` | ABCI application for dummy skill that registers and resets |
| skill/valory/register_termination_abci/0.1.0 | `bafybeiau4s566job5htmqelf46oinrlerwdnxrz2zee2wqea2reqvmet7a` | ABCI application for dummy skill that registers and resets |
| skill/valory/test_abci/0.1.0 | `bafybeiajw7frbyq2oftehmglhtldmcqqmdckfqsxbq4zi2dnsgpdgvvddy` | ABCI application for testing the ABCI connection. |
| agent/valory/abstract_abci/0.1.0 | `bafybeictsxb7asryy227ouy6rrzfkwakf4fhvp2ondzlszslurkr5dzk6e` | The abstract ABCI AEA - for testing purposes only. |
| agent/valory/counter/0.1.0 | `bafybeifyl2rzgetpvlqe663chm4g7fjijg5ptaxcmdg4sy3rtiwmnniye4` | The ABCI Counter example as an AEA |
| agent/valory/counter_client/0.1.0 | `bafybeigbcqfbtqjqguvop7gcp3ilr22d356n7js4jpyhoo5ymotis264wy` | The ABCI Counter example as an AEA |
-| agent/valory/hello_world/0.1.0 | `bafybeibwluqq2yywd3stax2kuiqnv4zxxu3rprfkbn7f7e6sf2gelpkdqa` | Hello World ABCI example. |
| agent/valory/register_reset/0.1.0 | `bafybeic6anftulx3wjcllsf72eulgonpwux3iopzaiaj5paeju772kuc4e` | Register reset to replicate Tendermint issue. |
| agent/valory/register_termination/0.1.0 | `bafybeigx3betmnmpxap6fwyrduxomp7ugd33ik3rwtkvluqc3rh3bqfx4q` | Register terminate to test the termination feature. |
| agent/valory/registration_start_up/0.1.0 | `bafybeialhpjejqyvxttkbazxzkphtu2c3fwvfp7owkwlagaphzkzxb6p5e` | Registration start-up ABCI example. |
| agent/valory/test_abci/0.1.0 | `bafybeibe6kgnwkuhcydk5gr3wvsybdlc7gfuzt2ia24czudsvxlbmdlrwe` | Agent for testing the ABCI connection. |
| service/valory/counter/0.1.0 | `bafybeigi5bhllrcp32xp5rbrbbaencxxhtm2leqxdzutcgug5lpkvoyapi` | A set of agents incrementing a counter |
-| service/valory/hello_world/0.1.0 | `bafybeieoqhbwqmg5oiqgkxf6dlizncjvaermwtun4aijqcbyc6ulfl7o4q` | A simple demonstration of a simple ABCI application |
| service/valory/register_reset/0.1.0 | `bafybeienlgv3xtigisoyjo5gedz5jgu3dxp2lml22jglm7bdogk4vtxhuq` | Test and debug tendermint reset mechanism. |
| skill/valory/register_reset_recovery_abci/0.1.0 | `bafybeig5dv2gxdykcmfx4lduwfg4z2zagec3xrss2dn6wo6wk3uhv5qedy` | ABCI application for dummy skill that registers and resets |
| agent/valory/register_reset_recovery/0.1.0 | `bafybeicme7j7zq7splhzbcrcw4q6ga2idq2qqnl6wbdwwkvsbz2botpuhu` | Agent to showcase hard reset as a recovery mechanism. |
diff --git a/docs/questions-and-answers.md b/docs/questions-and-answers.md
index 3dc7e3e71a..dc18491c22 100644
--- a/docs/questions-and-answers.md
+++ b/docs/questions-and-answers.md
@@ -23,33 +23,26 @@
??? note "Can I reuse the same {{fsm_app}} multiple times when creating a composed {{fsm_app}}?"
No. The Open Autonomy framework currently only supports a single instance of a given {{fsm_app}} in a composition.
-
??? note "Composability, extensibility and reusability are advantages also present in other tech stacks. What makes Autonolas different?"
Autonolas is not just a framework where devs can build on: it is a complete, novel ecosystem that provides an SDK, a reward system for developers and operators and a governance protocol on top, all of them decentralized.
In the same way companies like Apple or Google offer SDKs to accelerate devs work plus an app store to monetize their work, Autonolas offers the same capabilities but in a decentralized way: developers register components, operators run services that use those components, consumers use and pay for those services so both developers and operators are compensated for their work. And all the parameters that govern the network can be voted on.
-
??? note "How do agents communicate with other agents?"
Different forms of communication are used depending on the service status. Before the agents can establish a temporary blockchain (Tendermint network) that serves as consensus engine they need to exchange the necessary information with others in order to be able to do so. This information includes the network address of their Tendermint node and the associated public key. They do so by connecting to the Agent Communication Network (ACN), where they can send messages to other agents, in this case requesting their Tendermint configuration details, using their on-chain registered address. The list of registered addresses is retrieved from the service registry smart contract and can be used to filter out request coming from any party that is not registered to operate in this service as well. Once all configurations have been exchanged the Tendermint network can be established and is used as a consensus engine.
-
??? note "Can services use other services?"
Yes, an agent service can be composed from other agent services, analogously to microservices. Sub-services can deliver all sorts of results which are consumed by a higher level service to create a higher level outcome.
-
??? note "How do services communicate with other services?"
Services use a native message protocol based on protobuf that allows them to have arbitrary message-based communication between compatible agents in the network. The network they use for this is the Agent Communication Network (ACN), and protocols define the structure of communication flow, ranging from simple atomic request-response pairs to arbitrarily complicated dialogues (e.g. FIPA). To communicate with traditional services, agents can both make API calls and expose REST APIs.
-
??? note "What happens when agents are deployed?"
Agents are able to interact with the Autonolas on-chain Protocol so they can monetize their work and connect to other services. Apart from that, "island deployments" can also be operated, which are services that run as one-off services, not anchored in the protocol.
-
??? note "How many composition levels does Open Autonomy offer?"
Composition starts at the component level of the agents (multiple rounds make a skill), then continues on agent level (multiple skills make an agent) and ends at service level (multiple agents make a service).
-
??? note "How do agents settle a transaction?"
1. Negotiation happens through Tendermint messages.
2. A threshold of agents agree on a transaction hash.
@@ -59,26 +52,20 @@
6. All agents wait for the transaction to be mined and validate the output.
7. Done
-
-
??? note "Do all agent services have to be implemented as {{fsm_app}}s with Open Autonomy?"
Certainly not. For extremely simple applications, you can consider implementing an agent service by appropriately extending the `ABCIHandler` class to handle the consensus gadget callbacks, and if required, manually implement the agent `Behaviours` that execute client calls to the consensus gadget. However, **we strongly advise against this approach**, as the complexity, maintainability and composability of the resulting service will be severely affected.
-
## Security
??? note "How are agent services run?"
Agent services are composed of multiple agents that run the same code and agree on its output. These agents are executed by independent operators. Each operator can select and setup the infrastructure that best suits their needs.
-
??? note "What happens if my node is hacked?"
As in any other online service, nodes are exposed to the risk of being breached. At the individual level, the framework does not provide a solution to this and it’s up to the agent operator to keep the agent safe. At the service level, on the other hand, services are secured in two ways:
* Each agent service implements a custom protocol that expects a very narrow message flow, so a hypothetical agent running malicious code would need to express its intentions within this protocol, otherwise the other agents will ignore its messages.
* Even in the case of an agent sending valid, malicious messages in the service, the decentralized nature of services means that the majority threshold of agents (2/3 + 1) must agree before committing a malicious transaction, so it is not enough to breach an individual agent.
-
-
## Costs
??? note "How much does it cost to run an agent service using the framework?"
@@ -220,3 +207,21 @@
+
+## Ethereum topics
+
+??? note "How does EIP-1559 transaction pricing mechanism work?"
+ EIP-1559 has introduced significant changes in how the transaction pricing is determined. Previously, setting the `gasPrice` was sufficient; now, two new parameters have to be specified, `maxFeePerGas` and `maxPriorityFeePerGas`.
+
+ The new pricing structure comprises three key elements:
+
+ - **Base Fee**: This fee is determined autonomously by the network and is subsequently burned. It aims to target 50% full blocks and is adjusted based on the contents of the most recent confirmed block. Depending on block usage, the Base Fee automatically increases or decreases.
+ - **Max Priority Fee Per Gas**: This fee is optional and set by the user. It is paid directly to miners. Although technically optional, most network participants estimate that transactions generally require a minimum 2.0 GWEI tip to be competitive for inclusion.
+ - **Max Fee Per Gas**: This parameter is the absolute maximum amount you are willing to pay per unit of gas to have your transaction included in a block. If the sum of the Base Fee and Max Priority Fee exceeds the Max Fee, the Max Priority Fee is reduced to maintain the upper bound of the Max Fee. A heuristic formula for Max Fee calculation is: Max Fee = (2 * Base Fee) + Max Priority Fee. Doubling the Base Fee in this calculation ensures that your transaction remains marketable for six consecutive 100% full blocks.
+
+ Transactions containing these new parameters are designated as Type 2, while legacy transactions retaining the original Gas Price field are referred to as Type 0. Notably, EIP-1559 does not alter the Gas Limit, which remains the maximum amount of gas a transaction is authorized to consume.
+
+ For further information, please refer to the [EIP-1559 FAQ](https://notes.ethereum.org/@vbuterin/eip-1559-faq)
+
+??? note "How does a delegate call differ from a call in the context of Safe transactions?"
+ When you initiate a delegate call in a Safe transaction (i.e., with the operation set to `delegatecall`), it essentially instructs the Safe to "load the code from the specified address and run it." In other words, it retrieves the code from the contract address provided and executes it. This operation allows for dynamic code execution, enabling flexibility in Smart Contract interactions.
diff --git a/mkdocs.yml b/mkdocs.yml
index fc420752ae..fc86b950a5 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -51,13 +51,6 @@ nav:
- Define the service: 'guides/define_service.md'
- Publish and mint packages: 'guides/publish_mint_packages.md'
- Deploy the service: 'guides/deploy_service.md'
- - Demo agent services:
- - 'demos/index.md'
- - Hello World demo: 'demos/hello_world_demo.md'
- - Price Oracle Demo:
- - Introduction: 'demos/price_oracle_intro.md'
- - Technical Details: 'demos/price_oracle_technical_details.md'
- - FSM Specification: 'demos/price_oracle_fsms.md'
- Key concepts:
- 'key_concepts/index.md'
- Autonomous economic agents: 'key_concepts/aea.md'
@@ -95,6 +88,7 @@ nav:
- Execution replay: 'advanced_reference/developer_tooling/execution_replay.md'
- Benchmarking: 'advanced_reference/developer_tooling/benchmarking.md'
- Debugging in the cluster: 'advanced_reference/developer_tooling/debugging_in_the_cluster.md'
+ - Debugging using Tenderly: 'advanced_reference/developer_tooling/debugging_using_tenderly.md'
- Deployment:
- Container Control Flow: 'control_flow.md'
- Using custom images in a deployment: 'advanced_reference/use_custom_images.md'
@@ -254,11 +248,7 @@ nav:
- Payload Tools: 'api/skills/transaction_settlement_abci/payload_tools.md'
- Test Tools: 'api/skills/transaction_settlement_abci/test_tools/integration.md'
- Exceptions: 'exceptions.md'
- - Miscellaneous:
- - Ethereum: 'ethereum_specifics.md'
- - Delegate call vs call: 'delegate_call.md'
- - Debugging Using Tenderly: 'debugging.md'
- - Package list: 'package_list.md'
+ - Package list: 'package_list.md'
- Version: 'version.md'
- Upgrading: 'upgrading.md'
- FAQ: 'questions-and-answers.md'
diff --git a/packages/packages.json b/packages/packages.json
index c578781485..45100a737e 100644
--- a/packages/packages.json
+++ b/packages/packages.json
@@ -23,20 +23,17 @@
"skill/valory/termination_abci/0.1.0": "bafybeigddtcgeia5xkz4i6pnagvyrwotuef53vwq5ywppncbof3fph472u",
"skill/valory/counter/0.1.0": "bafybeiebxovit5k2fsr4r3fisqov53ek34xwanxly34eeo3ublxt2tyche",
"skill/valory/counter_client/0.1.0": "bafybeihx46fr7vgqjxmymfah3hfmynzpzwe5fthi7mbc2cnev2gqgtngzy",
- "skill/valory/hello_world_abci/0.1.0": "bafybeideckfxmkvdnjfvfgbcit6x4gxxwtbalttyxfslh22czxsb7zkstm",
"skill/valory/register_reset_abci/0.1.0": "bafybeidi4ors7jahoutqoozm5n62vvveeh4nowj4u43yuokd6rfwn7r5mm",
"skill/valory/register_termination_abci/0.1.0": "bafybeiau4s566job5htmqelf46oinrlerwdnxrz2zee2wqea2reqvmet7a",
"skill/valory/test_abci/0.1.0": "bafybeiajw7frbyq2oftehmglhtldmcqqmdckfqsxbq4zi2dnsgpdgvvddy",
"agent/valory/abstract_abci/0.1.0": "bafybeictsxb7asryy227ouy6rrzfkwakf4fhvp2ondzlszslurkr5dzk6e",
"agent/valory/counter/0.1.0": "bafybeifyl2rzgetpvlqe663chm4g7fjijg5ptaxcmdg4sy3rtiwmnniye4",
"agent/valory/counter_client/0.1.0": "bafybeigbcqfbtqjqguvop7gcp3ilr22d356n7js4jpyhoo5ymotis264wy",
- "agent/valory/hello_world/0.1.0": "bafybeibwluqq2yywd3stax2kuiqnv4zxxu3rprfkbn7f7e6sf2gelpkdqa",
"agent/valory/register_reset/0.1.0": "bafybeic6anftulx3wjcllsf72eulgonpwux3iopzaiaj5paeju772kuc4e",
"agent/valory/register_termination/0.1.0": "bafybeigx3betmnmpxap6fwyrduxomp7ugd33ik3rwtkvluqc3rh3bqfx4q",
"agent/valory/registration_start_up/0.1.0": "bafybeialhpjejqyvxttkbazxzkphtu2c3fwvfp7owkwlagaphzkzxb6p5e",
"agent/valory/test_abci/0.1.0": "bafybeibe6kgnwkuhcydk5gr3wvsybdlc7gfuzt2ia24czudsvxlbmdlrwe",
"service/valory/counter/0.1.0": "bafybeigi5bhllrcp32xp5rbrbbaencxxhtm2leqxdzutcgug5lpkvoyapi",
- "service/valory/hello_world/0.1.0": "bafybeieoqhbwqmg5oiqgkxf6dlizncjvaermwtun4aijqcbyc6ulfl7o4q",
"service/valory/register_reset/0.1.0": "bafybeienlgv3xtigisoyjo5gedz5jgu3dxp2lml22jglm7bdogk4vtxhuq",
"skill/valory/register_reset_recovery_abci/0.1.0": "bafybeig5dv2gxdykcmfx4lduwfg4z2zagec3xrss2dn6wo6wk3uhv5qedy",
"agent/valory/register_reset_recovery/0.1.0": "bafybeicme7j7zq7splhzbcrcw4q6ga2idq2qqnl6wbdwwkvsbz2botpuhu",
diff --git a/packages/valory/agents/hello_world/README.md b/packages/valory/agents/hello_world/README.md
deleted file mode 100644
index 4e9cdde14c..0000000000
--- a/packages/valory/agents/hello_world/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-# Hello World ABCI Agent
-
-This agent uses the `abci` connection and the `hello_world_abci` skill
-to demonstrate a Hello World ABCI implementation.
diff --git a/packages/valory/agents/hello_world/__init__.py b/packages/valory/agents/hello_world/__init__.py
deleted file mode 100644
index c138c857f5..0000000000
--- a/packages/valory/agents/hello_world/__init__.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# ------------------------------------------------------------------------------
-#
-# Copyright 2022 Valory AG
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ------------------------------------------------------------------------------
-
-"""Module hello_world agent."""
diff --git a/packages/valory/agents/hello_world/aea-config.yaml b/packages/valory/agents/hello_world/aea-config.yaml
deleted file mode 100644
index a9245aecc3..0000000000
--- a/packages/valory/agents/hello_world/aea-config.yaml
+++ /dev/null
@@ -1,125 +0,0 @@
-agent_name: hello_world
-author: valory
-version: 0.1.0
-license: Apache-2.0
-description: Hello World ABCI example.
-aea_version: '>=1.0.0, <2.0.0'
-fingerprint:
- README.md: bafybeifzdekpjcas6egpwxj24tir5ozzffmkq5ecyi6rw3i6fqfd763etu
- __init__.py: bafybeiehvk4wlv2bcbplwc66owg4qdnisiihijq7iegcmjjxtz3dulnrgm
- tests/__init__.py: bafybeiasj5kqyvalbnedototb6ooxfnro3vjmgscja2iccccotfjnd6cha
- tests/test_hello_world.py: bafybeifbgqpywtwhk6n4wngdrrk3oujwqw3fsbk54gsw5sep3pkkgym2ue
-fingerprint_ignore_patterns: []
-connections:
-- valory/abci:0.1.0:bafybeih6ei7q3vdsj57nb3f6dirccorj7izrxccjzys3seirzoalsj2fwq
-- valory/http_client:0.23.0:bafybeifgeqgryx6b3s6eseyzyezygmeitcpt3tkor2eiycozoi6clgdrny
-- valory/ipfs:0.1.0:bafybeiaddby5hxegt2fk772fzn34zpwndyfk45rc3jqtblhtr2tbzcicua
-- valory/ledger:0.19.0:bafybeiauyqzizmocjldnfuzvnihrqubfqzn5u2hp6ue7v3ka5kj54kd3zm
-- valory/p2p_libp2p_client:0.1.0:bafybeihge56dn3xep2dzomu7rtvbgo4uc2qqh7ljl3fubqdi2lq44gs5lq
-contracts: []
-protocols:
-- open_aea/signing:1.0.0:bafybeie7xyems76v5b4wc2lmaidcujizpxfzjnnwdeokmhje53g7ym25ii
-- valory/abci:0.1.0:bafybeihmzlmmb4pdo3zkhg6ehuyaa4lhw7bfpclln2o2z7v3o6fcep26iu
-- valory/http:1.0.0:bafybeiejoqgv7finfxo3rcvvovrlj5ccrbgxodjq43uo26ylpowsa3llfe
-- valory/ipfs:0.1.0:bafybeiedxeismnx3k5ty4mvvhlqideixlhqmi5mtcki4lxqfa7uqh7p33u
-skills:
-- valory/abstract_abci:0.1.0:bafybeidek3doh6cs3qw3hzgnqw65st2g5vhx5bgkdztyrer45wewttagui
-- valory/abstract_round_abci:0.1.0:bafybeiavfdmszwpotgdw5wd2imxcwsigygczvttxk5onswt72ipbdyjp3q
-- valory/hello_world_abci:0.1.0:bafybeideckfxmkvdnjfvfgbcit6x4gxxwtbalttyxfslh22czxsb7zkstm
-default_ledger: ethereum
-required_ledgers:
-- ethereum
-default_routing: {}
-connection_private_key_paths: {}
-private_key_paths: {}
-logging_config:
- version: 1
- disable_existing_loggers: false
- formatters:
- standard:
- format: '[%(asctime)s] [%(levelname)s] %(message)s'
- handlers:
- logfile:
- class: logging.FileHandler
- formatter: standard
- filename: ${LOG_FILE:str:log.txt}
- level: INFO
- console:
- class: logging.StreamHandler
- formatter: standard
- stream: ext://sys.stdout
- loggers:
- aea:
- handlers:
- - logfile
- - console
- propagate: true
-dependencies:
- open-aea-ledger-ethereum:
- version: ==1.40.0
- open-aea-test-autonomy:
- version: ==0.13.0
-default_connection: null
----
-public_id: valory/hello_world_abci:0.1.0
-type: skill
-models:
- benchmark_tool:
- args:
- log_dir: ${str:/benchmarks}
- params:
- args:
- hello_world_message: ${str:HELLO_WORLD!}
- service_registry_address: ${str:null}
- share_tm_config_on_startup: ${bool:false}
- on_chain_service_id: ${int:null}
- setup:
- all_participants: ${list:[]}
- safe_contract_address: ${str:'0x0000000000000000000000000000000000000000'}
- consensus_threshold: ${int:null}
- tendermint_url: ${str:http://localhost:26657}
- tendermint_com_url: ${str:http://localhost:8080}
- tendermint_p2p_url: ${str:localhost:26656}
----
-public_id: valory/abci:0.1.0
-type: connection
-config:
- target_skill_id: valory/hello_world_abci:0.1.0
- host: ${str:localhost}
- port: ${int:26658}
- use_tendermint: ${bool:false}
----
-public_id: valory/ledger:0.19.0
-type: connection
-config:
- ledger_apis:
- ethereum:
- address: ${str:http://localhost:8545}
- chain_id: ${int:31337}
- poa_chain: ${bool:false}
- default_gas_price_strategy: ${str:eip1559}
----
-public_id: valory/p2p_libp2p_client:0.1.0
-type: connection
-config:
- nodes:
- - uri: ${str:acn.staging.autonolas.tech:9005}
- public_key: ${str:02d3a830c9d6ea1ae91936951430dee11f4662f33118b02190693be835359a9d77}
- - uri: ${str:acn.staging.autonolas.tech:9006}
- public_key: ${str:02e741c62d706e1dcf6986bf37fa74b98681bc32669623ac9ee6ff72488d4f59e8}
-cert_requests:
-- identifier: acn
- ledger_id: ethereum
- message_format: '{public_key}'
- not_after: '2023-01-01'
- not_before: '2022-01-01'
- public_key: ${str:02d3a830c9d6ea1ae91936951430dee11f4662f33118b02190693be835359a9d77}
- save_path: .certs/acn_cosmos_9005.txt
-- identifier: acn
- ledger_id: ethereum
- message_format: '{public_key}'
- not_after: '2023-01-01'
- not_before: '2022-01-01'
- public_key: ${str:02e741c62d706e1dcf6986bf37fa74b98681bc32669623ac9ee6ff72488d4f59e8}
- save_path: .certs/acn_cosmos_9006.txt
-is_abstract: true
diff --git a/packages/valory/agents/hello_world/tests/__init__.py b/packages/valory/agents/hello_world/tests/__init__.py
deleted file mode 100644
index b20bba12aa..0000000000
--- a/packages/valory/agents/hello_world/tests/__init__.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# ------------------------------------------------------------------------------
-#
-# Copyright 2022 Valory AG
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ------------------------------------------------------------------------------
-
-"""Tests for hello_world agent."""
diff --git a/packages/valory/agents/hello_world/tests/test_hello_world.py b/packages/valory/agents/hello_world/tests/test_hello_world.py
deleted file mode 100644
index 6210fe1293..0000000000
--- a/packages/valory/agents/hello_world/tests/test_hello_world.py
+++ /dev/null
@@ -1,187 +0,0 @@
-# -*- coding: utf-8 -*-
-# ------------------------------------------------------------------------------
-#
-# Copyright 2021-2023 Valory AG
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ------------------------------------------------------------------------------
-
-"""End2end tests for the valory/hello_world skill."""
-
-# pylint: skip-file
-
-from pathlib import Path
-from typing import Tuple
-
-import pytest
-from aea_test_autonomy.base_test_classes.agents import (
- BaseTestEnd2EndExecution,
- RoundChecks,
-)
-from aea_test_autonomy.configurations import KEY_PAIRS
-from aea_test_autonomy.fixture_helpers import ( # noqa: F401
- abci_host,
- abci_port,
- flask_tendermint,
- ipfs_daemon,
- ipfs_domain,
- tendermint_port,
-)
-
-from packages.valory.skills.hello_world_abci.behaviours import (
- CollectRandomnessBehaviour,
- RegistrationBehaviour,
- SelectKeeperBehaviour,
-)
-from packages.valory.skills.hello_world_abci.rounds import (
- CollectRandomnessRound,
- PrintMessageRound,
- RegistrationRound,
- ResetAndPauseRound,
- SelectKeeperRound,
-)
-
-
-HAPPY_PATH = (
- RoundChecks(RegistrationRound.auto_round_id()),
- RoundChecks(PrintMessageRound.auto_round_id(), n_periods=3),
- RoundChecks(CollectRandomnessRound.auto_round_id(), n_periods=3),
- RoundChecks(SelectKeeperRound.auto_round_id(), n_periods=2),
- RoundChecks(ResetAndPauseRound.auto_round_id(), n_periods=2),
-)
-
-# strict check log messages of the happy path
-STRICT_CHECK_STRINGS = (
- "Period end",
- " in period 0 says: HELLO_WORLD!",
- " in period 1 says: HELLO_WORLD!",
- " in period 2 says: HELLO_WORLD!",
- " in period 3 says: HELLO_WORLD!",
-)
-
-
-# normal execution
-@pytest.mark.e2e
-class BaseHelloWorldABCITest(
- BaseTestEnd2EndExecution,
-):
- """Test the hello_world_abci skill with four agents."""
-
- agent_package = "valory/hello_world:0.1.0"
- skill_package = "valory/hello_world_abci:0.1.0"
- wait_to_finish = 160
- happy_path = HAPPY_PATH
- key_pairs = KEY_PAIRS
- strict_check_strings: Tuple[str, ...] = STRICT_CHECK_STRINGS
- package_registry_src_rel = Path(__file__).parent.parent.parent.parent.parent
- ROUND_TIMEOUT_SECONDS = 30
- RESET_PAUSE_DURATION = 10
-
-
-@pytest.mark.usefixtures(
- "flask_tendermint", "tendermint_port", "abci_host", "abci_port"
-)
-@pytest.mark.parametrize("nb_nodes", (1,))
-class TestHelloWorldABCISingleAgent(BaseHelloWorldABCITest):
- """Test the hello_world_abci skill with only one agent."""
-
-
-@pytest.mark.usefixtures(
- "flask_tendermint", "tendermint_port", "abci_host", "abci_port"
-)
-@pytest.mark.parametrize("nb_nodes", (2,))
-class TestHelloWorldABCITwoAgents(BaseHelloWorldABCITest):
- """Test the hello_world_abci skill with two agents."""
-
-
-@pytest.mark.usefixtures(
- "flask_tendermint", "tendermint_port", "abci_host", "abci_port"
-)
-@pytest.mark.parametrize("nb_nodes", (4,))
-class TestHelloWorldABCIFourAgents(BaseHelloWorldABCITest):
- """Test the hello_world_abci skill with four agents."""
-
-
-# catchup test
-class BaseHelloWorldABCITestCatchup(BaseHelloWorldABCITest):
- """Test the hello_world_abci skill with catch up behaviour."""
-
- stop_string = RegistrationBehaviour.auto_behaviour_id()
- restart_after = 10
- n_terminal = 1
-
-
-# four behaviours and different stages of termination and restart
-@pytest.mark.parametrize("nb_nodes", (4,))
-class TestHelloWorldABCIFourAgentsCatchupOnRegister(BaseHelloWorldABCITestCatchup):
- """Test hello_world_abci skill with four agents; one restarting on `register`."""
-
- stop_string = RegistrationBehaviour.auto_behaviour_id()
-
-
-@pytest.mark.parametrize("nb_nodes", (4,))
-class TestHelloWorldABCIFourAgentsCatchupRetrieveRandomness(
- BaseHelloWorldABCITestCatchup
-):
- """Test hello_world_abci skill with four agents; one restarting on `collect_randomness`."""
-
- stop_string = CollectRandomnessBehaviour.auto_behaviour_id()
-
-
-@pytest.mark.parametrize("nb_nodes", (4,))
-class TestHelloWorldABCIFourAgentsCatchupSelectKeeper(BaseHelloWorldABCITestCatchup):
- """Test hello_world_abci skill with four agents; one restarting on `select_keeper`."""
-
- stop_string = SelectKeeperBehaviour.auto_behaviour_id()
-
-
-# multiple agents terminating and restarting
-@pytest.mark.parametrize("nb_nodes", (4,))
-class TestHelloWorldABCIFourAgentsTwoAgentRestarting(BaseHelloWorldABCITestCatchup):
- """Test the hello_world_abci skill with four agents and two restarting."""
-
- n_terminal = 2
-
-
-@pytest.mark.skip(reason="https://github.com/valory-xyz/open-autonomy/issues/1709")
-@pytest.mark.parametrize("nb_nodes", (1,))
-class TestHelloWorldABCISingleAgentGrpc(
- BaseHelloWorldABCITest,
-):
- """Test that the hello_world_abci skill with only one agent."""
-
- USE_GRPC = True
- strict_check_strings = STRICT_CHECK_STRINGS + ("Starting gRPC server",)
-
-
-@pytest.mark.skip(reason="https://github.com/valory-xyz/open-autonomy/issues/1709")
-@pytest.mark.parametrize("nb_nodes", (2,))
-class TestHelloWorldABCITwoAgentsGrpc(
- BaseHelloWorldABCITest,
-):
- """Test that the hello_world_abci skill with two agents."""
-
- USE_GRPC = True
- strict_check_strings = STRICT_CHECK_STRINGS + ("Starting gRPC server",)
-
-
-@pytest.mark.skip(reason="https://github.com/valory-xyz/open-autonomy/issues/1709")
-@pytest.mark.parametrize("nb_nodes", (4,))
-class TestHelloWorldABCIFourAgentsGrpc(
- BaseHelloWorldABCITest,
-):
- """Test that the hello_world_abci skill with four agents."""
-
- USE_GRPC = True
- strict_check_strings = STRICT_CHECK_STRINGS + ("Starting gRPC server",)
diff --git a/packages/valory/services/hello_world/README.md b/packages/valory/services/hello_world/README.md
deleted file mode 100644
index 6f4e98add7..0000000000
--- a/packages/valory/services/hello_world/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-## Hello world
-
-This module contains the ABCI Hello World service for an AEA. It implements an ABCI application for a simple demonstration.
diff --git a/packages/valory/services/hello_world/service.yaml b/packages/valory/services/hello_world/service.yaml
deleted file mode 100644
index 1edbd155c1..0000000000
--- a/packages/valory/services/hello_world/service.yaml
+++ /dev/null
@@ -1,79 +0,0 @@
-name: hello_world
-author: valory
-version: 0.1.0
-description: A simple demonstration of a simple ABCI application
-aea_version: '>=1.0.0, <2.0.0'
-license: Apache-2.0
-fingerprint:
- README.md: bafybeiapubcoersqnsnh3acia5hd7otzt7kjxekr6gkbrlumv6tkajl6jm
-fingerprint_ignore_patterns: []
-agent: valory/hello_world:0.1.0:bafybeibwluqq2yywd3stax2kuiqnv4zxxu3rprfkbn7f7e6sf2gelpkdqa
-number_of_agents: 4
-deployment: {}
----
-extra:
- benchmark_persistence_params:
- args: &id002
- log_dir: ${LOG_DIR:str:/benchmarks}
- params_args:
- args:
- setup: &id001
- all_participants: ${ALL_PARTICIPANTS:list:["0x0000000000000000000000000000000000000000"]}
- safe_contract_address: ${SAFE_CONTRACT_ADDRESS:str:0x0000000000000000000000000000000000000000}
- consensus_threshold: ${CONSENSUS_THRESHOLD:int:null}
-public_id: valory/hello_world_abci:0.1.0
-type: skill
-0:
- models:
- params:
- args:
- service_registry_address: ${SERVICE_REGISTRY_ADDRESS:str:null}
- share_tm_config_on_startup: ${SHARE_TM_CONFIG_ON_STARTUP:bool:false}
- on_chain_service_id: ${ON_CHAIN_SERVICE_ID:int:null}
- setup: *id001
- hello_world_message: ${HELLO_WORLD_STRING_0:str:HELLO_WORLD! (from Agent 0)}
- benchmark_tool:
- args: *id002
-1:
- models:
- params:
- args:
- service_registry_address: ${SERVICE_REGISTRY_ADDRESS:str:null}
- share_tm_config_on_startup: ${SHARE_TM_CONFIG_ON_STARTUP:bool:false}
- on_chain_service_id: ${ON_CHAIN_SERVICE_ID:int:null}
- setup: *id001
- hello_world_message: ${HELLO_WORLD_STRING_1:str:HELLO_WORLD! (from Agent 1)}
- benchmark_tool:
- args: *id002
-2:
- models:
- params:
- args:
- service_registry_address: ${SERVICE_REGISTRY_ADDRESS:str:null}
- share_tm_config_on_startup: ${SHARE_TM_CONFIG_ON_STARTUP:bool:false}
- on_chain_service_id: ${ON_CHAIN_SERVICE_ID:int:null}
- setup: *id001
- hello_world_message: ${HELLO_WORLD_STRING_2:str:HELLO_WORLD! (from Agent 2)}
- benchmark_tool:
- args: *id002
-3:
- models:
- params:
- args:
- service_registry_address: ${SERVICE_REGISTRY_ADDRESS:str:null}
- share_tm_config_on_startup: ${SHARE_TM_CONFIG_ON_STARTUP:bool:false}
- on_chain_service_id: ${ON_CHAIN_SERVICE_ID:int:null}
- setup: *id001
- hello_world_message: ${HELLO_WORLD_STRING_3:str:HELLO_WORLD! (from Agent 3)}
- benchmark_tool:
- args: *id002
----
-public_id: valory/ledger:0.19.0
-type: connection
-config:
- ledger_apis:
- ethereum:
- address: ${LEDGER_RPC:str:http://localhost:8545}
- chain_id: ${CHAIN_ID:int:31337}
- poa_chain: ${IS_POA_CHAIN:bool:false}
- default_gas_price_strategy: ${DEFAULT_GAS_PRICE_STRATEGY:str:eip1559}
diff --git a/packages/valory/skills/hello_world_abci/README.md b/packages/valory/skills/hello_world_abci/README.md
deleted file mode 100644
index afd484483e..0000000000
--- a/packages/valory/skills/hello_world_abci/README.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# Hello World abci
-
-## Description
-
-This module contains the ABCI Hello World skill for an AEA. It implements an ABCI
-application for a simple demonstration.
-
-## Behaviours
-
-* `HelloWorldABCIBaseState`
-
- Base state behaviour for the Hello World abci skill.
-
-* `RegistrationBehaviour`
-
- Register to the next round.
-
-* `SelectKeeperBehaviour`
-
- Select the keeper agent.
-
-* `PrintMessageBehaviour`
-
- Prints the celebrated 'HELLO WORLD!' message.
-
-* `ResetAndPauseBehaviour`
-
- Reset state.
-
-## Handlers
-
-* `HelloWorldABCIHandler`
-* `HttpHandler`
-* `SigningHandler`
diff --git a/packages/valory/skills/hello_world_abci/__init__.py b/packages/valory/skills/hello_world_abci/__init__.py
deleted file mode 100644
index 7522845e5b..0000000000
--- a/packages/valory/skills/hello_world_abci/__init__.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- coding: utf-8 -*-
-# ------------------------------------------------------------------------------
-#
-# Copyright 2021-2022 Valory AG
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ------------------------------------------------------------------------------
-
-"""
-This module contains the ABCI Hello World skill for an AEA.
-
-It implements an ABCI application for a Hello World! demonstration.
-"""
-
-from aea.configurations.base import PublicId
-
-
-PUBLIC_ID = PublicId.from_str("valory/hello_world_abci:0.1.0")
diff --git a/packages/valory/skills/hello_world_abci/behaviours.py b/packages/valory/skills/hello_world_abci/behaviours.py
deleted file mode 100644
index 72afb853df..0000000000
--- a/packages/valory/skills/hello_world_abci/behaviours.py
+++ /dev/null
@@ -1,255 +0,0 @@
-# -*- coding: utf-8 -*-
-# ------------------------------------------------------------------------------
-#
-# Copyright 2021-2023 Valory AG
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ------------------------------------------------------------------------------
-
-"""This module contains the behaviours for the 'hello_world' skill."""
-
-import random
-from abc import ABC
-from typing import Generator, Set, Type, cast
-
-from packages.valory.skills.abstract_round_abci.behaviours import (
- AbstractRoundBehaviour,
- BaseBehaviour,
-)
-from packages.valory.skills.hello_world_abci.models import HelloWorldParams, SharedState
-from packages.valory.skills.hello_world_abci.payloads import (
- CollectRandomnessPayload,
- PrintMessagePayload,
- RegistrationPayload,
- ResetPayload,
- SelectKeeperPayload,
-)
-from packages.valory.skills.hello_world_abci.rounds import (
- CollectRandomnessRound,
- HelloWorldAbciApp,
- PrintMessageRound,
- RegistrationRound,
- ResetAndPauseRound,
- SelectKeeperRound,
- SynchronizedData,
-)
-
-
-class HelloWorldABCIBaseBehaviour(BaseBehaviour, ABC):
- """Base behaviour behaviour for the Hello World abci skill."""
-
- @property
- def synchronized_data(self) -> SynchronizedData:
- """Return the synchronized data."""
- return cast(
- SynchronizedData, cast(SharedState, self.context.state).synchronized_data
- )
-
- @property
- def params(self) -> HelloWorldParams:
- """Return the params."""
- return cast(HelloWorldParams, self.context.params)
-
-
-class RegistrationBehaviour(HelloWorldABCIBaseBehaviour):
- """Register to the next round."""
-
- matching_round = RegistrationRound
-
- def async_act(self) -> Generator:
- """
- Do the action.
-
- Steps:
- - Build a registration transaction.
- - Send the transaction and wait for it to be mined.
- - Wait until ABCI application transitions to the next round.
- - Go to the next behaviour (set done event).
- """
- payload = RegistrationPayload(self.context.agent_address)
- yield from self.send_a2a_transaction(payload)
- yield from self.wait_until_round_end()
- self.set_done()
-
-
-class CollectRandomnessBehaviour(HelloWorldABCIBaseBehaviour):
- """Retrieve randomness."""
-
- matching_round = CollectRandomnessRound
-
- def async_act(self) -> Generator:
- """
- Check whether tendermint is running or not.
-
- Steps:
- - Do a http request to the tendermint health check endpoint
- - Retry until healthcheck passes or timeout is hit.
- - If healthcheck passes set done event.
- """
- if self.context.randomness_api.is_retries_exceeded():
- # now we need to wait and see if the other agents progress the round
- yield from self.wait_until_round_end()
- self.set_done()
- return
-
- api_specs = self.context.randomness_api.get_spec()
- http_message, http_dialogue = self._build_http_request_message(
- method=api_specs["method"],
- url=api_specs["url"],
- )
- response = yield from self._do_request(http_message, http_dialogue)
- observation = self.context.randomness_api.process_response(response)
-
- if observation:
- self.context.logger.info(f"Retrieved DRAND values: {observation}.")
- payload = CollectRandomnessPayload(
- self.context.agent_address,
- observation["round"],
- observation["randomness"],
- )
- yield from self.send_a2a_transaction(payload)
- yield from self.wait_until_round_end()
- self.set_done()
- else:
- self.context.logger.error(
- f"Could not get randomness from {self.context.randomness_api.api_id}"
- )
- yield from self.sleep(self.params.sleep_time)
- self.context.randomness_api.increment_retries()
-
- def clean_up(self) -> None:
- """
- Clean up the resources due to a 'stop' event.
-
- It can be optionally implemented by the concrete classes.
- """
- self.context.randomness_api.reset_retries()
-
-
-class SelectKeeperBehaviour(HelloWorldABCIBaseBehaviour, ABC):
- """Select the keeper agent."""
-
- matching_round = SelectKeeperRound
-
- def async_act(self) -> Generator:
- """
- Do the action.
-
- Steps:
- - Select a keeper randomly.
- - Send the transaction with the keeper and wait for it to be mined.
- - Wait until ABCI application transitions to the next round.
- - Go to the next behaviour (set done event).
- """
-
- participants = sorted(self.synchronized_data.participants)
- random.seed(self.synchronized_data.most_voted_randomness, 2) # nosec
- index = random.randint(0, len(participants) - 1) # nosec
-
- keeper_address = participants[index]
-
- self.context.logger.info(f"Selected a new keeper: {keeper_address}.")
- payload = SelectKeeperPayload(self.context.agent_address, keeper_address)
-
- yield from self.send_a2a_transaction(payload)
- yield from self.wait_until_round_end()
-
- self.set_done()
-
-
-class PrintMessageBehaviour(HelloWorldABCIBaseBehaviour, ABC):
- """Prints the celebrated 'HELLO WORLD!' message."""
-
- matching_round = PrintMessageRound
-
- def async_act(self) -> Generator:
- """
- Do the action.
-
- Steps:
- - Determine if this agent is the current keeper agent.
- - Print the appropriate to the local console.
- - Send the transaction with the printed message and wait for it to be mined.
- - Wait until ABCI application transitions to the next round.
- - Go to the next behaviour (set done event).
- """
-
- if (
- self.context.agent_address
- == self.synchronized_data.most_voted_keeper_address
- ):
- message = self.params.hello_world_string
- else:
- message = ":|"
-
- printed_message = f"Agent {self.context.agent_name} (address {self.context.agent_address}) in period {self.synchronized_data.period_count} says: {message}"
-
- print(printed_message)
- self.context.logger.info(f"printed_message={printed_message}")
-
- payload = PrintMessagePayload(self.context.agent_address, printed_message)
-
- yield from self.send_a2a_transaction(payload)
- yield from self.wait_until_round_end()
-
- self.set_done()
-
-
-class ResetAndPauseBehaviour(HelloWorldABCIBaseBehaviour):
- """Reset behaviour."""
-
- matching_round = ResetAndPauseRound
- pause = True
-
- def async_act(self) -> Generator:
- """
- Do the action.
-
- Steps:
- - Trivially log the behaviour.
- - Sleep for configured interval.
- - Build a registration transaction.
- - Send the transaction and wait for it to be mined.
- - Wait until ABCI application transitions to the next round.
- - Go to the next behaviour (set done event).
- """
- if self.pause:
- self.context.logger.info("Period end.")
- yield from self.sleep(self.params.reset_pause_duration)
- else:
- self.context.logger.info(
- f"Period {self.synchronized_data.period_count} was not finished. Resetting!"
- )
-
- payload = ResetPayload(
- self.context.agent_address, self.synchronized_data.period_count
- )
-
- yield from self.send_a2a_transaction(payload)
- yield from self.wait_until_round_end()
- self.set_done()
-
-
-class HelloWorldRoundBehaviour(AbstractRoundBehaviour):
- """This behaviour manages the consensus stages for the Hello World abci app."""
-
- initial_behaviour_cls = RegistrationBehaviour
- abci_app_cls = HelloWorldAbciApp
- behaviours: Set[Type[BaseBehaviour]] = {
- RegistrationBehaviour, # type: ignore
- CollectRandomnessBehaviour, # type: ignore
- SelectKeeperBehaviour, # type: ignore
- PrintMessageBehaviour, # type: ignore
- ResetAndPauseBehaviour, # type: ignore
- }
diff --git a/packages/valory/skills/hello_world_abci/dialogues.py b/packages/valory/skills/hello_world_abci/dialogues.py
deleted file mode 100644
index e244bde0bd..0000000000
--- a/packages/valory/skills/hello_world_abci/dialogues.py
+++ /dev/null
@@ -1,91 +0,0 @@
-# -*- coding: utf-8 -*-
-# ------------------------------------------------------------------------------
-#
-# Copyright 2021-2023 Valory AG
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ------------------------------------------------------------------------------
-
-"""This module contains the classes required for dialogue management."""
-
-from packages.valory.skills.abstract_round_abci.dialogues import (
- AbciDialogue as BaseAbciDialogue,
-)
-from packages.valory.skills.abstract_round_abci.dialogues import (
- AbciDialogues as BaseAbciDialogues,
-)
-from packages.valory.skills.abstract_round_abci.dialogues import (
- ContractApiDialogue as BaseContractApiDialogue,
-)
-from packages.valory.skills.abstract_round_abci.dialogues import (
- ContractApiDialogues as BaseContractApiDialogues,
-)
-from packages.valory.skills.abstract_round_abci.dialogues import (
- HttpDialogue as BaseHttpDialogue,
-)
-from packages.valory.skills.abstract_round_abci.dialogues import (
- HttpDialogues as BaseHttpDialogues,
-)
-from packages.valory.skills.abstract_round_abci.dialogues import (
- IpfsDialogue as BaseIpfsDialogue,
-)
-from packages.valory.skills.abstract_round_abci.dialogues import (
- IpfsDialogues as BaseIpfsDialogues,
-)
-from packages.valory.skills.abstract_round_abci.dialogues import (
- LedgerApiDialogue as BaseLedgerApiDialogue,
-)
-from packages.valory.skills.abstract_round_abci.dialogues import (
- LedgerApiDialogues as BaseLedgerApiDialogues,
-)
-from packages.valory.skills.abstract_round_abci.dialogues import (
- SigningDialogue as BaseSigningDialogue,
-)
-from packages.valory.skills.abstract_round_abci.dialogues import (
- SigningDialogues as BaseSigningDialogues,
-)
-from packages.valory.skills.abstract_round_abci.dialogues import (
- TendermintDialogue as BaseTendermintDialogue,
-)
-from packages.valory.skills.abstract_round_abci.dialogues import (
- TendermintDialogues as BaseTendermintDialogues,
-)
-
-
-AbciDialogue = BaseAbciDialogue
-AbciDialogues = BaseAbciDialogues
-
-
-HttpDialogue = BaseHttpDialogue
-HttpDialogues = BaseHttpDialogues
-
-
-SigningDialogue = BaseSigningDialogue
-SigningDialogues = BaseSigningDialogues
-
-
-LedgerApiDialogue = BaseLedgerApiDialogue
-LedgerApiDialogues = BaseLedgerApiDialogues
-
-
-ContractApiDialogue = BaseContractApiDialogue
-ContractApiDialogues = BaseContractApiDialogues
-
-
-TendermintDialogue = BaseTendermintDialogue
-TendermintDialogues = BaseTendermintDialogues
-
-
-IpfsDialogue = BaseIpfsDialogue
-IpfsDialogues = BaseIpfsDialogues
diff --git a/packages/valory/skills/hello_world_abci/fsm_specification.yaml b/packages/valory/skills/hello_world_abci/fsm_specification.yaml
deleted file mode 100644
index c4da0160b4..0000000000
--- a/packages/valory/skills/hello_world_abci/fsm_specification.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
-alphabet_in:
-- DONE
-- NO_MAJORITY
-- RESET_TIMEOUT
-- ROUND_TIMEOUT
-default_start_state: RegistrationRound
-final_states: []
-label: HelloWorldAbciApp
-start_states:
-- RegistrationRound
-states:
-- CollectRandomnessRound
-- PrintMessageRound
-- RegistrationRound
-- ResetAndPauseRound
-- SelectKeeperRound
-transition_func:
- (CollectRandomnessRound, DONE): SelectKeeperRound
- (CollectRandomnessRound, NO_MAJORITY): CollectRandomnessRound
- (CollectRandomnessRound, ROUND_TIMEOUT): CollectRandomnessRound
- (PrintMessageRound, DONE): ResetAndPauseRound
- (PrintMessageRound, ROUND_TIMEOUT): RegistrationRound
- (RegistrationRound, DONE): CollectRandomnessRound
- (ResetAndPauseRound, DONE): CollectRandomnessRound
- (ResetAndPauseRound, NO_MAJORITY): RegistrationRound
- (ResetAndPauseRound, RESET_TIMEOUT): RegistrationRound
- (SelectKeeperRound, DONE): PrintMessageRound
- (SelectKeeperRound, NO_MAJORITY): RegistrationRound
- (SelectKeeperRound, ROUND_TIMEOUT): RegistrationRound
diff --git a/packages/valory/skills/hello_world_abci/handlers.py b/packages/valory/skills/hello_world_abci/handlers.py
deleted file mode 100644
index 742c479ee7..0000000000
--- a/packages/valory/skills/hello_world_abci/handlers.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# -*- coding: utf-8 -*-
-# ------------------------------------------------------------------------------
-#
-# Copyright 2021-2023 Valory AG
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ------------------------------------------------------------------------------
-
-"""This module contains the handler for the Hello World skill."""
-
-from packages.valory.skills.abstract_round_abci.handlers import (
- ABCIRoundHandler as BaseABCIRoundHandler,
-)
-from packages.valory.skills.abstract_round_abci.handlers import (
- ContractApiHandler as BaseContractApiHandler,
-)
-from packages.valory.skills.abstract_round_abci.handlers import (
- HttpHandler as BaseHttpHandler,
-)
-from packages.valory.skills.abstract_round_abci.handlers import (
- IpfsHandler as BaseIpfsHandler,
-)
-from packages.valory.skills.abstract_round_abci.handlers import (
- LedgerApiHandler as BaseLedgerApiHandler,
-)
-from packages.valory.skills.abstract_round_abci.handlers import (
- SigningHandler as BaseSigningHandler,
-)
-from packages.valory.skills.abstract_round_abci.handlers import (
- TendermintHandler as BaseTendermintHandler,
-)
-
-
-ABCIHandler = BaseABCIRoundHandler
-HttpHandler = BaseHttpHandler
-SigningHandler = BaseSigningHandler
-LedgerApiHandler = BaseLedgerApiHandler
-ContractApiHandler = BaseContractApiHandler
-TendermintHandler = BaseTendermintHandler
-IpfsHandler = BaseIpfsHandler
diff --git a/packages/valory/skills/hello_world_abci/models.py b/packages/valory/skills/hello_world_abci/models.py
deleted file mode 100644
index a7bb5ba2f2..0000000000
--- a/packages/valory/skills/hello_world_abci/models.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# -*- coding: utf-8 -*-
-# ------------------------------------------------------------------------------
-#
-# Copyright 2021-2023 Valory AG
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ------------------------------------------------------------------------------
-
-"""This module contains the shared state for the Hello World application."""
-
-from typing import Any
-
-from packages.valory.skills.abstract_round_abci.models import ApiSpecs, BaseParams
-from packages.valory.skills.abstract_round_abci.models import (
- BenchmarkTool as BaseBenchmarkTool,
-)
-from packages.valory.skills.abstract_round_abci.models import Requests as BaseRequests
-from packages.valory.skills.abstract_round_abci.models import (
- SharedState as BaseSharedState,
-)
-from packages.valory.skills.hello_world_abci.rounds import Event, HelloWorldAbciApp
-
-
-MARGIN = 5
-
-
-Requests = BaseRequests
-BenchmarkTool = BaseBenchmarkTool
-
-
-class SharedState(BaseSharedState):
- """Keep the current shared state of the skill."""
-
- abci_app_cls = HelloWorldAbciApp
-
- def setup(self) -> None:
- """Set up."""
- super().setup()
- HelloWorldAbciApp.event_to_timeout[
- Event.ROUND_TIMEOUT
- ] = self.context.params.round_timeout_seconds
- HelloWorldAbciApp.event_to_timeout[Event.RESET_TIMEOUT] = (
- self.context.params.reset_pause_duration + MARGIN
- )
-
-
-class HelloWorldParams(BaseParams):
- """Hello World skill parameters."""
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- """Initialize the parameters."""
- self.hello_world_string: str = self._ensure("hello_world_message", kwargs, str)
- super().__init__(*args, **kwargs)
-
-
-RandomnessApi = ApiSpecs
diff --git a/packages/valory/skills/hello_world_abci/payloads.py b/packages/valory/skills/hello_world_abci/payloads.py
deleted file mode 100644
index 72963a6a67..0000000000
--- a/packages/valory/skills/hello_world_abci/payloads.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# -*- coding: utf-8 -*-
-# ------------------------------------------------------------------------------
-#
-# Copyright 2021-2023 Valory AG
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ------------------------------------------------------------------------------
-
-"""This module contains the transaction payloads for the Hello World skill."""
-
-from dataclasses import dataclass
-
-from packages.valory.skills.abstract_round_abci.base import BaseTxPayload
-
-
-@dataclass(frozen=True)
-class RegistrationPayload(BaseTxPayload):
- """Represent a transaction payload of type 'registration'."""
-
-
-@dataclass(frozen=True)
-class CollectRandomnessPayload(BaseTxPayload):
- """Represent a transaction payload of type 'randomness'."""
-
- round_id: int
- randomness: str
-
-
-@dataclass(frozen=True)
-class PrintMessagePayload(BaseTxPayload):
- """Represent a transaction payload of type 'randomness'."""
-
- message: str
-
-
-@dataclass(frozen=True)
-class SelectKeeperPayload(BaseTxPayload):
- """Represent a transaction payload of type 'select_keeper'."""
-
- keeper: str
-
-
-@dataclass(frozen=True)
-class ResetPayload(BaseTxPayload):
- """Represent a transaction payload of type 'reset'."""
-
- period_count: int
diff --git a/packages/valory/skills/hello_world_abci/rounds.py b/packages/valory/skills/hello_world_abci/rounds.py
deleted file mode 100644
index 7439c7ba2b..0000000000
--- a/packages/valory/skills/hello_world_abci/rounds.py
+++ /dev/null
@@ -1,224 +0,0 @@
-# -*- coding: utf-8 -*-
-# ------------------------------------------------------------------------------
-#
-# Copyright 2021-2023 Valory AG
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ------------------------------------------------------------------------------
-"""This module contains the data classes for the Hello World ABCI application."""
-
-from abc import ABC
-from enum import Enum
-from typing import Dict, List, Optional, Tuple, Type, cast
-
-from packages.valory.skills.abstract_round_abci.base import (
- AbciApp,
- AbciAppTransitionFunction,
- AbstractRound,
- AppState,
- BaseSynchronizedData,
- CollectDifferentUntilAllRound,
- CollectSameUntilAllRound,
- CollectSameUntilThresholdRound,
- get_name,
-)
-from packages.valory.skills.hello_world_abci.payloads import (
- CollectRandomnessPayload,
- PrintMessagePayload,
- RegistrationPayload,
- ResetPayload,
- SelectKeeperPayload,
-)
-
-
-class Event(Enum):
- """Event enumeration for the Hello World ABCI demo."""
-
- DONE = "done"
- ROUND_TIMEOUT = "round_timeout"
- NO_MAJORITY = "no_majority"
- RESET_TIMEOUT = "reset_timeout"
-
-
-class SynchronizedData(
- BaseSynchronizedData
-): # pylint: disable=too-many-instance-attributes
- """
- Class to represent the synchronized data.
-
- This state is replicated by the Tendermint application.
- """
-
- @property
- def printed_messages(self) -> List[str]:
- """Get the printed messages list."""
-
- return cast(
- List[str],
- self.db.get_strict("printed_messages"),
- )
-
-
-class HelloWorldABCIAbstractRound(AbstractRound, ABC):
- """Abstract round for the Hello World ABCI skill."""
-
- synchronized_data_class: Type[BaseSynchronizedData] = SynchronizedData
-
- @property
- def synchronized_data(self) -> SynchronizedData:
- """Return the synchronized data."""
- return cast(SynchronizedData, self._synchronized_data)
-
-
-class RegistrationRound(CollectSameUntilAllRound, HelloWorldABCIAbstractRound):
- """A round in which the agents get registered"""
-
- payload_class = RegistrationPayload
-
- def end_block(self) -> Optional[Tuple[BaseSynchronizedData, Event]]:
- """Process the end of the block."""
-
- if self.collection_threshold_reached:
- synchronized_data = self.synchronized_data.update(
- participants=tuple(sorted(self.collection)),
- synchronized_data_class=SynchronizedData,
- )
- return synchronized_data, Event.DONE
- return None
-
-
-class CollectRandomnessRound(
- CollectSameUntilThresholdRound, HelloWorldABCIAbstractRound
-):
- """A round for collecting randomness"""
-
- payload_class = CollectRandomnessPayload
- synchronized_data_class = SynchronizedData
- done_event = Event.DONE
- no_majority_event = Event.NO_MAJORITY
- collection_key = get_name(SynchronizedData.participant_to_randomness)
- selection_key = get_name(SynchronizedData.most_voted_randomness)
-
-
-class SelectKeeperRound(CollectSameUntilThresholdRound, HelloWorldABCIAbstractRound):
- """A round in a which keeper is selected"""
-
- payload_class = SelectKeeperPayload
- synchronized_data_class = SynchronizedData
- done_event = Event.DONE
- no_majority_event = Event.NO_MAJORITY
- collection_key = get_name(SynchronizedData.participant_to_selection)
- selection_key = get_name(SynchronizedData.most_voted_keeper_address)
-
-
-class PrintMessageRound(CollectDifferentUntilAllRound, HelloWorldABCIAbstractRound):
- """A round in which the keeper prints the message"""
-
- payload_class = PrintMessagePayload
-
- def end_block(self) -> Optional[Tuple[BaseSynchronizedData, Event]]:
- """Process the end of the block."""
- if self.collection_threshold_reached:
- synchronized_data = self.synchronized_data.update(
- participants=tuple(sorted(self.collection)),
- printed_messages=sorted(
- [
- cast(PrintMessagePayload, payload).message
- for payload in self.collection.values()
- ]
- ),
- synchronized_data_class=SynchronizedData,
- )
- return synchronized_data, Event.DONE
- return None
-
-
-class ResetAndPauseRound(CollectSameUntilThresholdRound, HelloWorldABCIAbstractRound):
- """This class represents the base reset round."""
-
- payload_class = ResetPayload
-
- def end_block(self) -> Optional[Tuple[BaseSynchronizedData, Event]]:
- """Process the end of the block."""
- if self.threshold_reached:
- return self.synchronized_data.create(), Event.DONE
- if not self.is_majority_possible(
- self.collection, self.synchronized_data.nb_participants
- ):
- return self.synchronized_data, Event.NO_MAJORITY
- return None
-
-
-class HelloWorldAbciApp(AbciApp[Event]):
- """HelloWorldAbciApp
-
- Initial round: RegistrationRound
-
- Initial states: {RegistrationRound}
-
- Transition states:
- 0. RegistrationRound
- - done: 1.
- 1. CollectRandomnessRound
- - done: 2.
- - no majority: 1.
- - round timeout: 1.
- 2. SelectKeeperRound
- - done: 3.
- - no majority: 0.
- - round timeout: 0.
- 3. PrintMessageRound
- - done: 4.
- - round timeout: 0.
- 4. ResetAndPauseRound
- - done: 1.
- - no majority: 0.
- - reset timeout: 0.
-
- Final states: {}
-
- Timeouts:
- round timeout: 30.0
- reset timeout: 30.0
- """
-
- initial_round_cls: AppState = RegistrationRound
- transition_function: AbciAppTransitionFunction = {
- RegistrationRound: {
- Event.DONE: CollectRandomnessRound,
- },
- CollectRandomnessRound: {
- Event.DONE: SelectKeeperRound,
- Event.NO_MAJORITY: CollectRandomnessRound,
- Event.ROUND_TIMEOUT: CollectRandomnessRound,
- },
- SelectKeeperRound: {
- Event.DONE: PrintMessageRound,
- Event.NO_MAJORITY: RegistrationRound,
- Event.ROUND_TIMEOUT: RegistrationRound,
- },
- PrintMessageRound: {
- Event.DONE: ResetAndPauseRound,
- Event.ROUND_TIMEOUT: RegistrationRound,
- },
- ResetAndPauseRound: {
- Event.DONE: CollectRandomnessRound,
- Event.NO_MAJORITY: RegistrationRound,
- Event.RESET_TIMEOUT: RegistrationRound,
- },
- }
- event_to_timeout: Dict[Event, float] = {
- Event.ROUND_TIMEOUT: 30.0,
- Event.RESET_TIMEOUT: 30.0,
- }
diff --git a/packages/valory/skills/hello_world_abci/skill.yaml b/packages/valory/skills/hello_world_abci/skill.yaml
deleted file mode 100644
index e6d2b95b9d..0000000000
--- a/packages/valory/skills/hello_world_abci/skill.yaml
+++ /dev/null
@@ -1,157 +0,0 @@
-name: hello_world_abci
-author: valory
-version: 0.1.0
-type: skill
-description: Hello World ABCI application.
-license: Apache-2.0
-aea_version: '>=1.0.0, <2.0.0'
-fingerprint:
- README.md: bafybeidrjtykhovnccj3sovugdn4r3tszuzv7h37vta6o35epi5qfzdpke
- __init__.py: bafybeibiblks3d3s3ditug4hfzl3ob3cibokcz4ofs7cbbsbqw5zzbtd3m
- behaviours.py: bafybeiaai23italbrtlgpl7ie4pelhtrm6uqn773qap6jl5h4mj7fd553e
- dialogues.py: bafybeigabhaykiyzbluu4mk6bbrmqhzld2kyp32pg24bvjmzrrb74einwm
- fsm_specification.yaml: bafybeibaft2azersmixjtoa7zdekxzsvvnzfyq2zkyutx4elukc73owf5q
- handlers.py: bafybeieyq37quymqq6md3hi5bvynifnkx73bcvmzct6difyvdkbzj6abaq
- models.py: bafybeifyc3dezez4wbyexuy7q4do2xwlfrvtcvwsxgvg5cldeyvyi6ofju
- payloads.py: bafybeiajaxhepvqsznhgadw24w4zumfpxcqysv7y4mdsnh5awvtvirpb3q
- rounds.py: bafybeigtkugy35fv26tnj2kgyokh3ud2oa65neawiel4rdaclp6krtc7ti
- tests/__init__.py: bafybeibpuwe63mjjwnaanx7wdw63reh6qa5xdtjxdf75o3nksvjercte4y
- tests/test_behaviours.py: bafybeie6b5ibatxs4dlunkzj3b6k7al4ifgqyynh2qvbjekkbbnhlum4iy
- tests/test_dialogues.py: bafybeiarl4wsnljaxkgxdwr47xd4xjjjtkfgqbtazt2v2oem47alhaykj4
- tests/test_handlers.py: bafybeigb2hfysb2v3yjiqemyy52h3onqalrufuqdnw2pnkowtuzvmvcrd4
- tests/test_models.py: bafybeibqrbnemkeurjag2fpqftlpo3df2vnbooid7hcw5nmlm4rhssle7q
- tests/test_payloads.py: bafybeihgz46xtsaenago3bew5gxusyvbo4oivwqmv3r4oqwjgrnqoorcoe
- tests/test_rounds.py: bafybeicyifcsv2dxd72wi7vaggk3ucwyaptyxmzeua67qa47yhiby4ye3e
-fingerprint_ignore_patterns: []
-connections: []
-contracts: []
-protocols: []
-skills:
-- valory/abstract_round_abci:0.1.0:bafybeiavfdmszwpotgdw5wd2imxcwsigygczvttxk5onswt72ipbdyjp3q
-behaviours:
- main:
- args: {}
- class_name: HelloWorldRoundBehaviour
-handlers:
- abci:
- args: {}
- class_name: ABCIHandler
- contract_api:
- args: {}
- class_name: ContractApiHandler
- http:
- args: {}
- class_name: HttpHandler
- ipfs:
- args: {}
- class_name: IpfsHandler
- ledger_api:
- args: {}
- class_name: LedgerApiHandler
- signing:
- args: {}
- class_name: SigningHandler
- tendermint:
- args: {}
- class_name: TendermintHandler
-models:
- abci_dialogues:
- args: {}
- class_name: AbciDialogues
- benchmark_tool:
- args:
- log_dir: /logs
- class_name: BenchmarkTool
- contract_api_dialogues:
- args: {}
- class_name: ContractApiDialogues
- http_dialogues:
- args: {}
- class_name: HttpDialogues
- ipfs_dialogues:
- args: {}
- class_name: IpfsDialogues
- ledger_api_dialogues:
- args: {}
- class_name: LedgerApiDialogues
- params:
- args:
- cleanup_history_depth: 1
- cleanup_history_depth_current: null
- drand_public_key: 868f005eb8e6e4ca0a47c8a77ceaa5309a47978a7c71bc5cce96366b5d7a569937c529eeda66c7293784a9402801af31
- genesis_config:
- genesis_time: '2022-05-20T16:00:21.735122717Z'
- chain_id: chain-c4daS1
- consensus_params:
- block:
- max_bytes: '22020096'
- max_gas: '-1'
- time_iota_ms: '1000'
- evidence:
- max_age_num_blocks: '100000'
- max_age_duration: '172800000000000'
- max_bytes: '1048576'
- validator:
- pub_key_types:
- - ed25519
- version: {}
- voting_power: '10'
- hello_world_message: HELLO_WORLD!
- keeper_timeout: 30.0
- light_slash_unit_amount: 5000000000000000
- max_attempts: 10
- max_healthcheck: 120
- on_chain_service_id: null
- request_retry_delay: 1.0
- request_timeout: 10.0
- reset_pause_duration: 10
- reset_tendermint_after: 2
- retry_attempts: 400
- retry_timeout: 3
- round_timeout_seconds: 30.0
- serious_slash_unit_amount: 8000000000000000
- service_id: hello_world_abci
- service_registry_address: null
- setup:
- all_participants:
- - '0x0000000000000000000000000000000000000000'
- safe_contract_address: '0x0000000000000000000000000000000000000000'
- consensus_threshold: null
- share_tm_config_on_startup: false
- slash_cooldown_hours: 3
- slash_threshold_amount: 10000000000000000
- sleep_time: 1
- tendermint_check_sleep_delay: 3
- tendermint_com_url: http://localhost:8080
- tendermint_max_retries: 5
- tendermint_p2p_url: localhost:26656
- tendermint_url: http://localhost:26657
- tx_timeout: 10.0
- use_slashing: false
- use_termination: false
- class_name: HelloWorldParams
- randomness_api:
- args:
- api_id: cloudflare
- headers: {}
- method: GET
- parameters: {}
- response_key: null
- response_type: dict
- retries: 5
- url: https://drand.cloudflare.com/public/latest
- class_name: RandomnessApi
- requests:
- args: {}
- class_name: Requests
- signing_dialogues:
- args: {}
- class_name: SigningDialogues
- state:
- args: {}
- class_name: SharedState
- tendermint_dialogues:
- args: {}
- class_name: TendermintDialogues
-dependencies: {}
-is_abstract: false
diff --git a/packages/valory/skills/hello_world_abci/tests/__init__.py b/packages/valory/skills/hello_world_abci/tests/__init__.py
deleted file mode 100644
index 1570dc3cf7..0000000000
--- a/packages/valory/skills/hello_world_abci/tests/__init__.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# ------------------------------------------------------------------------------
-#
-# Copyright 2021-2022 Valory AG
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ------------------------------------------------------------------------------
-
-"""Tests for valory/hello_world_abci skill."""
diff --git a/packages/valory/skills/hello_world_abci/tests/test_behaviours.py b/packages/valory/skills/hello_world_abci/tests/test_behaviours.py
deleted file mode 100644
index 6def86245d..0000000000
--- a/packages/valory/skills/hello_world_abci/tests/test_behaviours.py
+++ /dev/null
@@ -1,417 +0,0 @@
-# -*- coding: utf-8 -*-
-# ------------------------------------------------------------------------------
-#
-# Copyright 2021-2023 Valory AG
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ------------------------------------------------------------------------------
-
-"""Tests for valory/hello_world_abci skill's behaviours."""
-
-# pylint: skip-file
-
-import json
-import time
-from pathlib import Path
-from typing import Any, Type, cast
-from unittest import mock
-
-from aea.skills.base import SkillContext
-
-from packages.valory.skills.abstract_round_abci.base import AbciAppDB
-from packages.valory.skills.abstract_round_abci.behaviour_utils import BaseBehaviour
-from packages.valory.skills.abstract_round_abci.test_tools.base import (
- FSMBehaviourBaseCase,
-)
-from packages.valory.skills.hello_world_abci import PUBLIC_ID
-from packages.valory.skills.hello_world_abci.behaviours import (
- CollectRandomnessBehaviour,
- PrintMessageBehaviour,
- RegistrationBehaviour,
- ResetAndPauseBehaviour,
- SelectKeeperBehaviour,
-)
-from packages.valory.skills.hello_world_abci.rounds import Event, SynchronizedData
-
-
-PACKAGE_DIR = Path(__file__).parent.parent
-
-
-def test_skill_public_id() -> None:
- """Test skill module public ID"""
-
- assert PUBLIC_ID.name == Path(__file__).parents[1].name
- assert PUBLIC_ID.author == Path(__file__).parents[3].name
-
-
-class HelloWorldAbciFSMBehaviourBaseCase(FSMBehaviourBaseCase):
- """Base case for testing PriceEstimation FSMBehaviour."""
-
- path_to_skill = PACKAGE_DIR
-
- def setup(self, **kwargs: Any) -> None:
- """
- Set up the test method.
-
- Called each time before a test method is called.
-
- :param kwargs: the keyword arguments passed to _prepare_skill
- """
- super().setup(**kwargs)
- self.synchronized_data = SynchronizedData(
- AbciAppDB(
- setup_data=dict(
- most_voted_keeper_address=["most_voted_keeper_address"],
- ),
- )
- )
-
- def end_round( # type: ignore
- self,
- ) -> None:
- """Ends round early to cover `wait_for_end` generator."""
- super().end_round(Event.DONE)
-
-
-class BaseCollectRandomnessBehaviourTest(HelloWorldAbciFSMBehaviourBaseCase):
- """Test CollectRandomnessBehaviour."""
-
- collect_randomness_behaviour_class: Type[BaseBehaviour]
- next_behaviour_class: Type[BaseBehaviour]
-
- def test_randomness_behaviour(
- self,
- ) -> None:
- """Test RandomnessBehaviour."""
-
- self.fast_forward_to_behaviour(
- self.behaviour,
- self.collect_randomness_behaviour_class.auto_behaviour_id(),
- self.synchronized_data,
- )
- assert (
- cast(
- BaseBehaviour,
- cast(BaseBehaviour, self.behaviour.current_behaviour),
- ).behaviour_id
- == self.collect_randomness_behaviour_class.auto_behaviour_id()
- )
- self.behaviour.act_wrapper()
- self.mock_http_request(
- request_kwargs=dict(
- method="GET",
- headers="",
- version="",
- body=b"",
- url="https://drand.cloudflare.com/public/latest",
- ),
- response_kwargs=dict(
- version="",
- status_code=200,
- status_text="",
- headers="",
- body=json.dumps(
- {
- "round": 1283255,
- "randomness": "04d4866c26e03347d2431caa82ab2d7b7bdbec8b58bca9460c96f5265d878feb",
- }
- ).encode("utf-8"),
- ),
- )
-
- self.behaviour.act_wrapper()
- self.mock_a2a_transaction()
- self._test_done_flag_set()
- self.end_round()
-
- behaviour = cast(BaseBehaviour, self.behaviour.current_behaviour)
- assert behaviour.behaviour_id == self.next_behaviour_class.auto_behaviour_id()
-
- def test_invalid_response(
- self,
- ) -> None:
- """Test invalid json response."""
- self.fast_forward_to_behaviour(
- self.behaviour,
- self.collect_randomness_behaviour_class.auto_behaviour_id(),
- self.synchronized_data,
- )
- assert (
- cast(
- BaseBehaviour,
- cast(BaseBehaviour, self.behaviour.current_behaviour),
- ).behaviour_id
- == self.collect_randomness_behaviour_class.auto_behaviour_id()
- )
- self.behaviour.act_wrapper()
-
- self.mock_http_request(
- request_kwargs=dict(
- method="GET",
- headers="",
- version="",
- body=b"",
- url="https://drand.cloudflare.com/public/latest",
- ),
- response_kwargs=dict(
- version="", status_code=200, status_text="", headers="", body=b""
- ),
- )
- self.behaviour.act_wrapper()
- time.sleep(1)
- self.behaviour.act_wrapper()
-
- def test_max_retries_reached(
- self,
- ) -> None:
- """Test with max retries reached."""
- self.fast_forward_to_behaviour(
- self.behaviour,
- self.collect_randomness_behaviour_class.auto_behaviour_id(),
- self.synchronized_data,
- )
- assert (
- cast(
- BaseBehaviour,
- cast(BaseBehaviour, self.behaviour.current_behaviour),
- ).behaviour_id
- == self.collect_randomness_behaviour_class.auto_behaviour_id()
- )
- self.behaviour.context.randomness_api.__dict__["_frozen"] = False
- with mock.patch.object(
- self.behaviour.context.randomness_api,
- "is_retries_exceeded",
- return_value=True,
- ):
- self.behaviour.act_wrapper()
- behaviour = cast(BaseBehaviour, self.behaviour.current_behaviour)
- assert (
- behaviour.behaviour_id
- == self.collect_randomness_behaviour_class.auto_behaviour_id()
- )
- self._test_done_flag_set()
- self.behaviour.context.randomness_api.__dict__["_frozen"] = True
-
- def test_clean_up(
- self,
- ) -> None:
- """Test when `observed` value is none."""
- self.fast_forward_to_behaviour(
- self.behaviour,
- self.collect_randomness_behaviour_class.auto_behaviour_id(),
- self.synchronized_data,
- )
- assert (
- cast(
- BaseBehaviour,
- cast(BaseBehaviour, self.behaviour.current_behaviour),
- ).behaviour_id
- == self.collect_randomness_behaviour_class.auto_behaviour_id()
- )
- self.behaviour.context.randomness_api.retries_info.retries_attempted = 1
- assert self.behaviour.current_behaviour is not None
- self.behaviour.current_behaviour.clean_up()
- assert self.behaviour.context.randomness_api.retries_info.retries_attempted == 0
-
-
-class BaseSelectKeeperBehaviourTest(HelloWorldAbciFSMBehaviourBaseCase):
- """Test SelectKeeperBehaviour."""
-
- select_keeper_behaviour_class: Type[BaseBehaviour]
- next_behaviour_class: Type[BaseBehaviour]
-
- def test_select_keeper(
- self,
- ) -> None:
- """Test select keeper agent."""
- participants = (self.skill.skill_context.agent_address, "a_1", "a_2")
- self.fast_forward_to_behaviour(
- behaviour=self.behaviour,
- behaviour_id=self.select_keeper_behaviour_class.auto_behaviour_id(),
- synchronized_data=SynchronizedData(
- AbciAppDB(
- setup_data=dict(
- participants=[participants],
- most_voted_randomness=[
- "56cbde9e9bbcbdcaf92f183c678eaa5288581f06b1c9c7f884ce911776727688"
- ],
- most_voted_keeper_address=["most_voted_keeper_address"],
- ),
- )
- ),
- )
- assert (
- cast(
- BaseBehaviour,
- cast(BaseBehaviour, self.behaviour.current_behaviour),
- ).behaviour_id
- == self.select_keeper_behaviour_class.auto_behaviour_id()
- )
- self.behaviour.act_wrapper()
- self.mock_a2a_transaction()
- self._test_done_flag_set()
- self.end_round()
- behaviour = cast(BaseBehaviour, self.behaviour.current_behaviour)
- assert behaviour.behaviour_id == self.next_behaviour_class.auto_behaviour_id()
-
-
-class TestRegistrationBehaviour(HelloWorldAbciFSMBehaviourBaseCase):
- """Test case to test RegistrationBehaviour."""
-
- def test_registration(self) -> None:
- """Test registration."""
- self.fast_forward_to_behaviour(
- self.behaviour,
- RegistrationBehaviour.auto_behaviour_id(),
- self.synchronized_data,
- )
- assert (
- cast(
- BaseBehaviour,
- cast(BaseBehaviour, self.behaviour.current_behaviour),
- ).behaviour_id
- == RegistrationBehaviour.auto_behaviour_id()
- )
- self.behaviour.act_wrapper()
- self.mock_a2a_transaction()
- self._test_done_flag_set()
-
- self.end_round()
- behaviour = cast(BaseBehaviour, self.behaviour.current_behaviour)
- assert behaviour.behaviour_id == CollectRandomnessBehaviour.auto_behaviour_id()
-
-
-class TestCollectRandomnessBehaviour(BaseCollectRandomnessBehaviourTest):
- """Test CollectRandomnessBehaviour."""
-
- collect_randomness_behaviour_class = CollectRandomnessBehaviour
- next_behaviour_class = SelectKeeperBehaviour
-
-
-class TestSelectKeeperBehaviour(BaseSelectKeeperBehaviourTest):
- """Test SelectKeeperBehaviour."""
-
- select_keeper_behaviour_class = SelectKeeperBehaviour
- next_behaviour_class = PrintMessageBehaviour
-
-
-class TestPrintMessageBehaviour(HelloWorldAbciFSMBehaviourBaseCase):
- """Test case to test PrintMessageBehaviour."""
-
- def test_print_message_non_keeper(self) -> None:
- """Test print_message."""
- self.fast_forward_to_behaviour(
- self.behaviour,
- PrintMessageBehaviour.auto_behaviour_id(),
- self.synchronized_data,
- )
- assert (
- cast(
- BaseBehaviour,
- cast(BaseBehaviour, self.behaviour.current_behaviour),
- ).behaviour_id
- == PrintMessageBehaviour.auto_behaviour_id()
- )
- self.behaviour.act_wrapper()
- self.mock_a2a_transaction()
- self._test_done_flag_set()
-
- self.end_round()
- behaviour = cast(BaseBehaviour, self.behaviour.current_behaviour)
- assert behaviour.behaviour_id == ResetAndPauseBehaviour.auto_behaviour_id()
-
- @mock.patch.object(SkillContext, "agent_address", new_callable=mock.PropertyMock)
- def test_print_message_keeper(
- self,
- agent_address_mock: mock.PropertyMock,
- ) -> None:
- """Test print_message."""
- agent_address_mock.return_value = "most_voted_keeper_address"
- self.fast_forward_to_behaviour(
- self.behaviour,
- PrintMessageBehaviour.auto_behaviour_id(),
- self.synchronized_data,
- )
- assert (
- cast(
- BaseBehaviour,
- cast(BaseBehaviour, self.behaviour.current_behaviour),
- ).behaviour_id
- == PrintMessageBehaviour.auto_behaviour_id()
- )
- self.behaviour.act_wrapper()
- self.mock_a2a_transaction()
- self._test_done_flag_set()
-
- self.end_round()
- behaviour = cast(BaseBehaviour, self.behaviour.current_behaviour)
- assert behaviour.behaviour_id == ResetAndPauseBehaviour.auto_behaviour_id()
-
-
-class TestResetAndPauseBehaviour(HelloWorldAbciFSMBehaviourBaseCase):
- """Test ResetBehaviour."""
-
- behaviour_class = ResetAndPauseBehaviour
- next_behaviour_class = CollectRandomnessBehaviour
-
- def test_pause_and_reset_behaviour(
- self,
- ) -> None:
- """Test pause and reset behaviour."""
- self.fast_forward_to_behaviour(
- behaviour=self.behaviour,
- behaviour_id=self.behaviour_class.auto_behaviour_id(),
- synchronized_data=self.synchronized_data,
- )
- assert (
- cast(
- BaseBehaviour,
- cast(BaseBehaviour, self.behaviour.current_behaviour),
- ).behaviour_id
- == self.behaviour_class.auto_behaviour_id()
- )
- self.behaviour.context.params.__dict__["reset_pause_duration"] = 0.1
- self.behaviour.act_wrapper()
- time.sleep(0.3)
- self.behaviour.act_wrapper()
- self.mock_a2a_transaction()
- self._test_done_flag_set()
- self.end_round()
- behaviour = cast(BaseBehaviour, self.behaviour.current_behaviour)
- assert behaviour.behaviour_id == self.next_behaviour_class.auto_behaviour_id()
-
- def test_reset_behaviour(
- self,
- ) -> None:
- """Test reset behaviour."""
- self.fast_forward_to_behaviour(
- behaviour=self.behaviour,
- behaviour_id=self.behaviour_class.auto_behaviour_id(),
- synchronized_data=self.synchronized_data,
- )
- assert self.behaviour.current_behaviour is not None
- self.behaviour.current_behaviour.pause = False
- assert (
- cast(
- BaseBehaviour,
- cast(BaseBehaviour, self.behaviour.current_behaviour),
- ).behaviour_id
- == self.behaviour_class.auto_behaviour_id()
- )
- self.behaviour.act_wrapper()
- self.mock_a2a_transaction()
- self._test_done_flag_set()
- self.end_round()
- behaviour = cast(BaseBehaviour, self.behaviour.current_behaviour)
- assert behaviour.behaviour_id == self.next_behaviour_class.auto_behaviour_id()
diff --git a/packages/valory/skills/hello_world_abci/tests/test_dialogues.py b/packages/valory/skills/hello_world_abci/tests/test_dialogues.py
deleted file mode 100644
index fdcc08ed13..0000000000
--- a/packages/valory/skills/hello_world_abci/tests/test_dialogues.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: utf-8 -*-
-# ------------------------------------------------------------------------------
-#
-# Copyright 2021-2022 Valory AG
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ------------------------------------------------------------------------------
-
-"""Test the dialogues.py module of the skill."""
-
-# pylint: skip-file
-
-import packages.valory.skills.hello_world_abci.dialogues # noqa
-
-
-def test_import() -> None:
- """Test that the 'dialogues.py' Python module can be imported."""
diff --git a/packages/valory/skills/hello_world_abci/tests/test_handlers.py b/packages/valory/skills/hello_world_abci/tests/test_handlers.py
deleted file mode 100644
index 00e8eb5f50..0000000000
--- a/packages/valory/skills/hello_world_abci/tests/test_handlers.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- coding: utf-8 -*-
-# ------------------------------------------------------------------------------
-#
-# Copyright 2021-2022 Valory AG
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ------------------------------------------------------------------------------
-
-"""Test the dialogues.py module of the skill."""
-
-import packages.valory.skills.hello_world_abci.handlers # noqa
-
-
-# pylint: skip-file
-
-
-def test_import() -> None:
- """Test that the 'handlers.py' Python module can be imported."""
diff --git a/packages/valory/skills/hello_world_abci/tests/test_models.py b/packages/valory/skills/hello_world_abci/tests/test_models.py
deleted file mode 100644
index fbd98c5822..0000000000
--- a/packages/valory/skills/hello_world_abci/tests/test_models.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- coding: utf-8 -*-
-# ------------------------------------------------------------------------------
-#
-# Copyright 2021-2022 Valory AG
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ------------------------------------------------------------------------------
-
-"""Test the models.py module of the skill."""
-
-# pylint: skip-file
-
-from packages.valory.skills.abstract_round_abci.test_tools.base import DummyContext
-from packages.valory.skills.hello_world_abci.models import SharedState
-
-
-class TestSharedState:
- """Test SharedState(Model) class."""
-
- def test_initialization(
- self,
- ) -> None:
- """Test initialization."""
- SharedState(name="", skill_context=DummyContext())
diff --git a/packages/valory/skills/hello_world_abci/tests/test_payloads.py b/packages/valory/skills/hello_world_abci/tests/test_payloads.py
deleted file mode 100644
index 7e3855026f..0000000000
--- a/packages/valory/skills/hello_world_abci/tests/test_payloads.py
+++ /dev/null
@@ -1,78 +0,0 @@
-# -*- coding: utf-8 -*-
-# ------------------------------------------------------------------------------
-#
-# Copyright 2021-2023 Valory AG
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ------------------------------------------------------------------------------
-
-"""Test the payloads.py module of the skill."""
-
-# pylint: skip-file
-
-from packages.valory.skills.hello_world_abci.payloads import (
- CollectRandomnessPayload,
- PrintMessagePayload,
- RegistrationPayload,
- ResetPayload,
- SelectKeeperPayload,
-)
-
-
-def test_registration_payload() -> None:
- """Test `RegistrationPayload`."""
-
- payload = RegistrationPayload(sender="sender")
-
- assert payload.sender == "sender"
-
-
-def test_collect_randomness_payload() -> None:
- """Test `CollectRandomnessPayload`"""
-
- payload = CollectRandomnessPayload(sender="sender", round_id=1, randomness="1")
-
- assert payload.round_id == 1
- assert payload.randomness == "1"
- assert payload.id_
- assert payload.data == {"round_id": 1, "randomness": "1"}
-
-
-def test_select_keeper_payload() -> None:
- """Test `SelectKeeperPayload`."""
-
- payload = SelectKeeperPayload(sender="sender", keeper="keeper")
-
- assert payload.keeper == "keeper"
- assert payload.data == {"keeper": "keeper"}
-
-
-def test_print_message_payload() -> None:
- """Test `PrintMessagePayload`."""
-
- payload = PrintMessagePayload(sender="sender", message="message")
-
- assert payload.message == "message"
- assert payload.data == {"message": "message"}
-
-
-def test_reset_payload() -> None:
- """Test `ResetPayload`"""
-
- payload = ResetPayload(sender="sender", period_count=1)
-
- assert payload.period_count == 1
- assert payload.id_
- assert payload.data == {"period_count": 1}
- assert hash(payload)
diff --git a/packages/valory/skills/hello_world_abci/tests/test_rounds.py b/packages/valory/skills/hello_world_abci/tests/test_rounds.py
deleted file mode 100644
index e3d184af6e..0000000000
--- a/packages/valory/skills/hello_world_abci/tests/test_rounds.py
+++ /dev/null
@@ -1,340 +0,0 @@
-# -*- coding: utf-8 -*-
-# ------------------------------------------------------------------------------
-#
-# Copyright 2021-2023 Valory AG
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ------------------------------------------------------------------------------
-
-"""Test the rounds of the skill."""
-
-# pylint: skip-file
-
-import logging # noqa: F401
-from typing import cast
-from unittest.mock import MagicMock
-
-from packages.valory.skills.abstract_round_abci.base import (
- AbciAppDB,
- CollectionRound,
- MAX_INT_256,
-)
-from packages.valory.skills.abstract_round_abci.test_tools.rounds import (
- BaseRoundTestClass as ExternalBaseRoundTestClass,
-)
-from packages.valory.skills.hello_world_abci.payloads import (
- CollectRandomnessPayload,
- PrintMessagePayload,
- RegistrationPayload,
- ResetPayload,
- SelectKeeperPayload,
-)
-from packages.valory.skills.hello_world_abci.rounds import (
- CollectRandomnessRound,
- Event,
- PrintMessageRound,
- RegistrationRound,
- ResetAndPauseRound,
- SelectKeeperRound,
- SynchronizedData,
-)
-
-
-MAX_PARTICIPANTS: int = 4
-RANDOMNESS: str = "d1c29dce46f979f9748210d24bce4eae8be91272f5ca1a6aea2832d3dd676f51"
-
-
-class BaseRoundTestClass(ExternalBaseRoundTestClass):
- """Base test class for Rounds."""
-
- _synchronized_data_class = SynchronizedData
- _event_class = Event
-
-
-class TestRegistrationRound(BaseRoundTestClass):
- """Tests for RegistrationRound."""
-
- def test_run(
- self,
- ) -> None:
- """Run tests."""
-
- test_round = RegistrationRound(
- synchronized_data=self.synchronized_data,
- context=MagicMock(),
- )
-
- first_payload, *payloads = [
- RegistrationPayload(sender=participant) for participant in self.participants
- ]
-
- test_round.process_payload(first_payload)
- assert test_round.collection == {first_payload.sender: first_payload}
- assert test_round.end_block() is None
-
- for payload in payloads:
- test_round.process_payload(payload)
-
- actual_next_behaviour = SynchronizedData(
- AbciAppDB(setup_data=dict(participants=[tuple(test_round.collection)]))
- )
-
- res = test_round.end_block()
- assert res is not None
- synchronized_data, event = res
- assert (
- cast(SynchronizedData, synchronized_data).participants
- == cast(SynchronizedData, actual_next_behaviour).participants
- )
- assert event == Event.DONE
-
-
-class TestCollectRandomnessRound(BaseRoundTestClass):
- """Tests for CollectRandomnessRound."""
-
- def test_run(
- self,
- ) -> None:
- """Run tests."""
-
- test_round = CollectRandomnessRound(
- synchronized_data=self.synchronized_data,
- context=MagicMock(),
- )
- first_payload, *payloads = [
- CollectRandomnessPayload(
- sender=participant, randomness=RANDOMNESS, round_id=0
- )
- for participant in self.participants
- ]
-
- test_round.process_payload(first_payload)
- assert test_round.collection[first_payload.sender] == first_payload
- assert test_round.end_block() is None
-
- self._test_no_majority_event(test_round)
-
- for payload in payloads:
- test_round.process_payload(payload)
-
- actual_next_behaviour = self.synchronized_data.update(
- participant_to_randomness=test_round.serialized_collection,
- most_voted_randomness=test_round.most_voted_payload,
- )
-
- res = test_round.end_block()
- assert res is not None
- synchronized_data, event = res
- assert all(
- [
- key
- in cast(SynchronizedData, synchronized_data).participant_to_randomness
- for key in cast(
- SynchronizedData, actual_next_behaviour
- ).participant_to_randomness
- ]
- )
- assert event == Event.DONE
-
-
-class TestSelectKeeperRound(BaseRoundTestClass):
- """Tests for SelectKeeperRound."""
-
- def test_run(
- self,
- ) -> None:
- """Run tests."""
-
- test_round = SelectKeeperRound(
- synchronized_data=self.synchronized_data,
- context=MagicMock(),
- )
-
- first_payload, *payloads = [
- SelectKeeperPayload(sender=participant, keeper="keeper")
- for participant in self.participants
- ]
-
- test_round.process_payload(first_payload)
- assert test_round.collection[first_payload.sender] == first_payload
- assert test_round.end_block() is None
-
- self._test_no_majority_event(test_round)
-
- for payload in payloads:
- test_round.process_payload(payload)
-
- actual_next_behaviour = self.synchronized_data.update(
- participant_to_selection=test_round.serialized_collection,
- most_voted_keeper_address=test_round.most_voted_payload,
- )
-
- res = test_round.end_block()
- assert res is not None
- synchronized_data, event = res
- assert all(
- [
- key
- in cast(SynchronizedData, synchronized_data).participant_to_selection
- for key in cast(
- SynchronizedData, actual_next_behaviour
- ).participant_to_selection
- ]
- )
- assert event == Event.DONE
-
-
-class TestPrintMessageRound(BaseRoundTestClass):
- """Tests for PrintMessageRound."""
-
- def test_run(
- self,
- ) -> None:
- """Run tests."""
-
- test_round = PrintMessageRound(
- synchronized_data=self.synchronized_data,
- context=MagicMock(),
- )
-
- first_payload, *payloads = [
- PrintMessagePayload(sender=participant, message=f"{participant}_message")
- for participant in self.participants
- ]
-
- test_round.process_payload(first_payload)
- assert test_round.collection == {first_payload.sender: first_payload}
- assert test_round.end_block() is None
-
- for payload in payloads:
- test_round.process_payload(payload)
-
- printed_messages = [
- cast(PrintMessagePayload, payload).message
- for payload in test_round.collection.values()
- ]
-
- actual_next_behaviour = SynchronizedData(
- AbciAppDB(
- setup_data=dict(
- participants=[tuple(sorted(test_round.collection))],
- printed_messages=[sorted(printed_messages)],
- )
- )
- )
-
- res = test_round.end_block()
- assert res is not None
- synchronized_data, event = res
-
- assert (
- cast(SynchronizedData, synchronized_data).participants
- == cast(SynchronizedData, actual_next_behaviour).participants
- )
- assert (
- cast(SynchronizedData, synchronized_data).printed_messages
- == cast(SynchronizedData, actual_next_behaviour).printed_messages
- )
- assert event == Event.DONE
-
-
-class TestResetAndPauseRound(BaseRoundTestClass):
- """Tests for ResetAndPauseRound."""
-
- def test_run(
- self,
- ) -> None:
- """Run tests."""
- test_round = ResetAndPauseRound(
- synchronized_data=self.synchronized_data,
- context=MagicMock(),
- )
-
- first_payload, *payloads = [
- ResetPayload(sender=participant, period_count=1)
- for participant in self.participants
- ]
-
- test_round.process_payload(first_payload)
- assert test_round.collection[first_payload.sender] == first_payload
- assert test_round.end_block() is None
-
- self._test_no_majority_event(test_round)
-
- for payload in payloads:
- test_round.process_payload(payload)
-
- actual_next_behaviour = self.synchronized_data.create()
-
- res = test_round.end_block()
- assert res is not None
- synchronized_data, event = res
-
- assert (
- cast(SynchronizedData, synchronized_data).period_count
- == cast(SynchronizedData, actual_next_behaviour).period_count
- )
-
- assert event == Event.DONE
-
-
-def test_synchronized_data() -> None: # pylint:too-many-locals
- """Test SynchronizedData."""
-
- participants = tuple(f"agent_{i}" for i in range(MAX_PARTICIPANTS))
- participant_to_randomness = {
- participant: CollectRandomnessPayload(
- sender=participant, randomness=RANDOMNESS, round_id=0
- )
- for participant in participants
- }
- participant_to_randomness_serialized = CollectionRound.serialize_collection(
- participant_to_randomness
- )
- most_voted_randomness = "0xabcd"
- participant_to_selection = {
- participant: SelectKeeperPayload(sender=participant, keeper="keeper")
- for participant in participants
- }
- participant_to_selection_serialized = CollectionRound.serialize_collection(
- participant_to_selection
- )
- most_voted_keeper_address = "keeper"
-
- synchronized_data = SynchronizedData(
- AbciAppDB(
- setup_data=AbciAppDB.data_to_lists(
- dict(
- participants=participants,
- setup_params={},
- participant_to_randomness=participant_to_randomness_serialized,
- most_voted_randomness=most_voted_randomness,
- participant_to_selection=participant_to_selection_serialized,
- most_voted_keeper_address=most_voted_keeper_address,
- )
- ),
- )
- )
-
- assert synchronized_data.participants == frozenset(participants)
- assert synchronized_data.period_count == 0
- assert synchronized_data.participant_to_randomness == participant_to_randomness
- assert synchronized_data.most_voted_randomness == most_voted_randomness
- assert synchronized_data.participant_to_selection == participant_to_selection
- assert synchronized_data.most_voted_keeper_address == most_voted_keeper_address
- assert synchronized_data.sorted_participants == sorted(participants)
- actual_keeper_randomness = int(most_voted_randomness, base=16) / MAX_INT_256
- assert (
- abs(synchronized_data.keeper_randomness - actual_keeper_randomness) < 1e-10
- ) # avoid equality comparisons between floats
diff --git a/scripts/check_doc_ipfs_hashes.py b/scripts/check_doc_ipfs_hashes.py
index 840339e611..82af4a4eb2 100755
--- a/scripts/check_doc_ipfs_hashes.py
+++ b/scripts/check_doc_ipfs_hashes.py
@@ -28,6 +28,7 @@
from pathlib import Path
from typing import Dict, List, Optional
+import requests
import yaml
from aea.cli.packages import get_package_manager
from aea.configurations.data_types import PackageId
@@ -73,10 +74,40 @@ def get_packages() -> Dict[str, str]:
return data
+def get_packages_from_repository(repo_url: str) -> Dict[str, str]:
+ """Retrieve packages.json from the latest release from a repository."""
+ repo_url = repo_url.strip("/").replace("https://github.com/", "")
+ repo_api_url = f"https://api.github.com/repos/{repo_url}/releases/latest"
+ response = requests.get(repo_api_url)
+
+ if response.status_code == 200:
+ repo_info = response.json()
+ latest_release_tag = repo_info["tag_name"]
+ url = f"https://raw.githubusercontent.com/{repo_url}/{latest_release_tag}/packages/packages.json"
+ else:
+ raise Exception(
+ f"Failed to fetch repository information from GitHub API for: {repo_url}"
+ )
+
+ response = requests.get(url)
+ if response.status_code == 200:
+ data = response.json()
+ if "dev" in data:
+ return {**data["dev"], **data["third_party"]}
+ return data
+
+ raise Exception(f"Failed to fetch data from URL: {url}")
+
+
class Package: # pylint: disable=too-few-public-methods
"""Class that represents a package in packages.json"""
- def __init__(self, package_id_str: str, package_hash: str) -> None:
+ def __init__(
+ self,
+ package_id_str: str,
+ package_hash: str,
+ ignore_file_load_errors: bool = False,
+ ) -> None:
"""Constructor"""
self.package_id = PackageId.from_uri_path(package_id_str)
@@ -84,6 +115,7 @@ def __init__(self, package_id_str: str, package_hash: str) -> None:
self.type = self.package_id.package_type.to_plural()
self.name = self.package_id.name
self.hash = package_hash
+ self.ignore_file_load_errors = ignore_file_load_errors
if self.name == "scaffold":
return
@@ -110,12 +142,18 @@ def __init__(self, package_id_str: str, package_hash: str) -> None:
self.name,
f"{'aea-config' if self.type == 'agent' else self.type}.yaml",
)
- with open(yaml_file_path, "r", encoding="utf-8") as file:
- content = yaml.load_all(file, Loader=yaml.FullLoader)
- for resource in content:
- if "version" in resource:
- self.last_version = resource["version"]
- break
+
+ try:
+ with open(yaml_file_path, "r", encoding="utf-8") as file:
+ content = yaml.load_all(file, Loader=yaml.FullLoader)
+ for resource in content:
+ if "version" in resource:
+ self.last_version = resource["version"]
+ break
+ except Exception: # pylint: disable=broad-except
+ if not self.ignore_file_load_errors:
+ raise
+ self.last_version = self.package_id.version
def get_command(
self, cmd: str, include_version: bool = True, flags: str = ""
@@ -142,6 +180,17 @@ def __init__(self) -> None:
packages = get_packages()
self.packages = [Package(key, value) for key, value in packages.items()]
+ package_json_urls = [
+ "https://github.com/valory-xyz/hello-world",
+ ]
+
+ for url in package_json_urls:
+ packages_from_url = get_packages_from_repository(url)
+ packages.update(packages_from_url)
+ self.packages.extend(
+ [Package(key, value, True) for key, value in packages_from_url.items()]
+ )
+
self.package_tree: Dict = {}
for p in self.packages:
self.package_tree.setdefault(p.vendor, {})
diff --git a/tests/test_autonomy/test_cli/test_analyse/test_abci/test_docstring_generator.py b/tests/test_autonomy/test_cli/test_analyse/test_abci/test_docstring_generator.py
index 36a870abdb..f032b59aa6 100644
--- a/tests/test_autonomy/test_cli/test_analyse/test_abci/test_docstring_generator.py
+++ b/tests/test_autonomy/test_cli/test_analyse/test_abci/test_docstring_generator.py
@@ -27,7 +27,7 @@
from aea.configurations.constants import PACKAGES
-from packages.valory.skills.hello_world_abci import rounds
+from packages.valory.skills.reset_pause_abci import rounds # type: ignore
from tests.conftest import ROOT_DIR
from tests.test_autonomy.test_cli.base import BaseCliTest
@@ -38,7 +38,7 @@ class TestDocstrings(BaseCliTest):
rounds_file_original: Path
rounds_file_temp: Path
- skill_name: str = "hello_world_abci"
+ skill_name: str = "reset_pause_abci"
cli_options: Tuple[str, ...] = ("analyse", "docstrings")
rounds_file = Path(PACKAGES, "valory", "skills", skill_name, "rounds.py")
@@ -76,10 +76,7 @@ def _corrupt_round_file(
) -> None:
"""Corrupt a round file."""
- string_to_replace = """4. ResetAndPauseRound
- - done: 1.
- - no majority: 0.
- - reset timeout: 0.\n"""
+ string_to_replace = """2. FinishedResetAndPauseErrorRound\n"""
rounds_file_content = self.rounds_file_original.read_text()
rounds_file_content = rounds_file_content.replace(string_to_replace, "")
diff --git a/tests/test_autonomy/test_cli/test_analyse/test_abci/test_docstrings.py b/tests/test_autonomy/test_cli/test_analyse/test_abci/test_docstrings.py
index 880f5d2b85..f260b3104e 100644
--- a/tests/test_autonomy/test_cli/test_analyse/test_abci/test_docstrings.py
+++ b/tests/test_autonomy/test_cli/test_analyse/test_abci/test_docstrings.py
@@ -28,45 +28,36 @@
docstring_abci_app,
)
-from packages.valory.skills.hello_world_abci.rounds import HelloWorldAbciApp
+from packages.valory.skills.reset_pause_abci.rounds import (
+ ResetPauseAbciApp, # type: ignore
+)
def test_docstring_abci_app() -> None:
"""Test docstring_abci_app"""
- expected = """\"\"\"HelloWorldAbciApp
-
- Initial round: RegistrationRound
-
- Initial states: {RegistrationRound}
-
- Transition states:
- 0. RegistrationRound
- - done: 1.
- 1. CollectRandomnessRound
- - done: 2.
- - no majority: 1.
- - round timeout: 1.
- 2. SelectKeeperRound
- - done: 3.
- - no majority: 0.
- - round timeout: 0.
- 3. PrintMessageRound
- - done: 4.
- - round timeout: 0.
- 4. ResetAndPauseRound
- - done: 1.
- - no majority: 0.
- - reset timeout: 0.
-
- Final states: {}
-
- Timeouts:
- round timeout: 30.0
- reset timeout: 30.0
+ expected = """\"\"\"ResetPauseAbciApp
+
+ Initial round: ResetAndPauseRound
+
+ Initial states: {ResetAndPauseRound}
+
+ Transition states:
+ 0. ResetAndPauseRound
+ - done: 1.
+ - reset and pause timeout: 2.
+ - no majority: 2.
+ 1. FinishedResetAndPauseRound
+ 2. FinishedResetAndPauseErrorRound
+
+ Final states: {FinishedResetAndPauseErrorRound, FinishedResetAndPauseRound}
+
+ Timeouts:
+ round timeout: 30.0
+ reset and pause timeout: 30.0
\"\"\""""
- docstring = docstring_abci_app(HelloWorldAbciApp)
+ docstring = docstring_abci_app(ResetPauseAbciApp)
differences = "\n".join(difflib.unified_diff(docstring.split(), expected.split()))
assert not differences, differences
@@ -78,14 +69,14 @@ def test_compare_docstring_content() -> None:
assert compare_docstring_content("", "", "") == (False, "")
# identical - no update
- docstring = docstring_abci_app(HelloWorldAbciApp)
- abci_app_name = HelloWorldAbciApp.__name__
- file_content = Path(inspect.getfile(HelloWorldAbciApp)).read_text()
+ docstring = docstring_abci_app(ResetPauseAbciApp)
+ abci_app_name = ResetPauseAbciApp.__name__
+ file_content = Path(inspect.getfile(ResetPauseAbciApp)).read_text()
result = compare_docstring_content(file_content, docstring, abci_app_name)
assert result == (True, file_content)
# mutated - update
- mutated_content = file_content.replace("Initial round: RegistrationRound", "")
+ mutated_content = file_content.replace("Initial round: ResetAndPauseRound", "")
assert not mutated_content == file_content
result = compare_docstring_content(mutated_content, docstring, abci_app_name)
assert result == (True, file_content)
diff --git a/tests/test_autonomy/test_cli/test_helpers/test_fsm_spec.py b/tests/test_autonomy/test_cli/test_helpers/test_fsm_spec.py
index 32e29eeba6..633f40cdd0 100644
--- a/tests/test_autonomy/test_cli/test_helpers/test_fsm_spec.py
+++ b/tests/test_autonomy/test_cli/test_helpers/test_fsm_spec.py
@@ -39,7 +39,7 @@
)
import packages
-from packages.valory.skills import hello_world_abci, test_abci
+from packages.valory.skills import offend_abci, test_abci
from tests.conftest import ROOT_DIR
@@ -72,7 +72,7 @@ def test_import_and_validate_app_class_raises() -> None:
def test_update_one() -> None:
"""Test update_one"""
- package_path = Path(hello_world_abci.__file__).parent.relative_to(ROOT_DIR)
+ package_path = Path(offend_abci.__file__).parent.relative_to(ROOT_DIR)
with mock.patch.object(FSMSpecificationLoader, "dump") as m:
update_one(package_path)
m.assert_called_once()
@@ -86,7 +86,7 @@ def test_update_one_raises() -> None:
with pytest.raises(ClickException, match=expected):
update_one(package_path)
- package_path = Path(hello_world_abci.__file__).parent.relative_to(ROOT_DIR)
+ package_path = Path(offend_abci.__file__).parent.relative_to(ROOT_DIR)
expected = "Please provide name for the app class or make sure FSM specification file is properly defined."
with mock.patch.object(FSMSpecificationLoader, "load", return_value={}):
with pytest.raises(ValueError, match=expected):
@@ -96,29 +96,27 @@ def test_update_one_raises() -> None:
def test_check_one() -> None:
"""Test check_one"""
- package_path = Path(hello_world_abci.__file__).parent.relative_to(ROOT_DIR)
+ package_path = Path(offend_abci.__file__).parent.relative_to(ROOT_DIR)
check_one(package_path)
def test_check_one_raises() -> None:
"""Test check_one raises"""
- package_path = Path(hello_world_abci.__file__).parent.relative_to(ROOT_DIR)
+ package_path = Path(offend_abci.__file__).parent.relative_to(ROOT_DIR)
expected = "Please provide name for the app class or make sure FSM specification file is properly defined."
with mock.patch.object(FSMSpecificationLoader, "load", return_value={}):
with pytest.raises(ValueError, match=expected):
update_one(package_path)
- expected = 'Class .* is not in "packages.valory.skills.hello_world_abci.rounds"'
+ expected = 'Class .* is not in "packages.valory.skills.offend_abci.rounds"'
with pytest.raises(ClickException, match=expected):
check_one(package_path, app_class="DummyAbciApp")
target = "autonomy.cli.helpers.fsm_spec.check_unreferenced_events"
with mock.patch(target, return_value=["Event.WIN_LOTTERY"]):
- expected = (
- "Unreferenced events found in `HelloWorldAbciApp`\n- Event.WIN_LOTTERY"
- )
+ expected = "Unreferenced events found in `OffendAbciApp`\n- Event.WIN_LOTTERY"
with pytest.raises(DFASpecificationError, match=expected):
check_one(package_path)
diff --git a/tests/test_docs/helper.py b/tests/test_docs/helper.py
index 1a3dd05814..1978793a22 100644
--- a/tests/test_docs/helper.py
+++ b/tests/test_docs/helper.py
@@ -24,6 +24,8 @@
from pathlib import Path
from typing import Callable, Dict, List, Optional
+import requests
+
from tests.conftest import ROOT_DIR
@@ -85,6 +87,37 @@ def read_file(filepath: str) -> str:
return file_str
+def read_file_from_repository(url: str) -> str:
+ """Loads the latest release version of a file into a string"""
+ match = re.match(r"https://github.com/([^/]+)/([^/]+)/blob/([^/]+)/(.+)", url)
+ if not match:
+ raise ValueError("Invalid GitHub file URL")
+
+ owner, repo, _, file_path = match.groups()
+
+ repo_api_url = f"https://api.github.com/repos/{owner}/{repo}/releases/latest"
+ response = requests.get(repo_api_url)
+
+ if response.status_code == 200:
+ release_info = response.json()
+ latest_release_tag = release_info["tag_name"]
+ raw_github_url = f"https://raw.githubusercontent.com/{owner}/{repo}/{latest_release_tag}/{file_path}"
+ return read_file_from_url(raw_github_url)
+ else:
+ raise Exception(
+ f"Failed to fetch release information from GitHub API for {owner}/{repo}: {response.text}."
+ )
+
+
+def read_file_from_url(url: str) -> str:
+ """Loads a file into a string"""
+ response = requests.get(url)
+ if response.status_code == 200:
+ return response.text
+ else:
+ raise Exception(f"Failed to fetch data from URL {url}: {response.text}.")
+
+
def remove_line_comments(string: str) -> str:
"""Removes tokens from a python string"""
return re.sub(PYTHON_LINE_COMMENT_REGEX, "", string)
@@ -151,8 +184,14 @@ def check_code_blocks_exist(
code_file = code_file.replace("by_line::", "")
# Load the code file and process it
- code_path = os.path.join(ROOT_DIR, code_file)
- code = read_file(code_path)
+ if code_file.startswith("https://github.com/"):
+ code = read_file_from_repository(code_file)
+ elif code_file.startswith("http://") or code_file.startswith("https://"):
+ code = read_file_from_url(code_file)
+ else:
+ code_path = os.path.join(ROOT_DIR, code_file)
+ code = read_file(code_path)
+
code = code_process_fn(code) if code_process_fn else code
# Perform the check
diff --git a/tests/test_docs/test_code_blocks.py b/tests/test_docs/test_code_blocks.py
index 90529dd8fd..883d4fa188 100644
--- a/tests/test_docs/test_code_blocks.py
+++ b/tests/test_docs/test_code_blocks.py
@@ -160,12 +160,6 @@ def code_process_fn(self, s): # type: ignore
# instead of checking the code block as a whole.
md_to_code = {
- "docs/demos/hello_world_demo.md": {
- "code_files": [
- "packages/valory/skills/hello_world_abci/fsm_specification.yaml",
- "packages/valory/agents/hello_world/aea-config.yaml",
- ],
- },
"docs/demos/price_oracle_fsms.md": {
"code_files": [
"packages/valory/skills/registration_abci/fsm_specification.yaml",
@@ -178,7 +172,7 @@ def code_process_fn(self, s): # type: ignore
},
"docs/guides/draft_service_idea_and_define_fsm_specification.md": {
"code_files": [
- "packages/valory/skills/hello_world_abci/fsm_specification.yaml"
+ "https://raw.githubusercontent.com/valory-xyz/hello-world/main/packages/valory/skills/hello_world_abci/fsm_specification.yaml"
]
},
}
@@ -225,15 +219,6 @@ def doc_process_fn(self, s): # type: ignore
],
"skip_blocks": [1],
},
- "docs/demos/hello_world_demo.md": {
- "code_files": [
- "packages/valory/skills/hello_world_abci/behaviours.py",
- "packages/valory/skills/hello_world_abci/behaviours.py",
- "packages/valory/skills/hello_world_abci/payloads.py",
- "packages/valory/skills/hello_world_abci/rounds.py",
- "by_line::packages/valory/skills/hello_world_abci/rounds.py",
- ],
- },
"docs/advanced_reference/commands/autonomy_analyse.md": {"skip_blocks": [0]},
"docs/key_concepts/aea.md": {"code_files": [], "skip_blocks": [0, 1]},
}
@@ -264,9 +249,6 @@ class TestJsonSnippets(BaseTestDocCode):
# instead of checking the code block as a whole.
md_to_code = {
- "docs/guides/set_up.md": {
- "code_files": ["by_line::packages/packages.json"],
- },
"docs/guides/deploy_service.md": {
"code_files": [
"by_line::deployments/keys/hardhat_keys.json",
@@ -286,6 +268,7 @@ class TestJsonSnippets(BaseTestDocCode):
skipped_files = [
"docs/advanced_reference/commands/autonomy_deploy.md",
+ "docs/guides/set_up.md",
]
diff --git a/tox.ini b/tox.ini
index 30404c24a4..b8a5654cb5 100644
--- a/tox.ini
+++ b/tox.ini
@@ -135,7 +135,6 @@ commands =
aea test --cov --append by-path packages/valory/skills/abstract_round_abci
aea test --cov --append by-path packages/valory/skills/counter
aea test --cov --append by-path packages/valory/skills/counter_client
- aea test --cov --append by-path packages/valory/skills/hello_world_abci
aea test --cov --append by-path packages/valory/skills/register_reset_abci
aea test --cov --append by-path packages/valory/skills/register_reset_recovery_abci
aea test --cov --append by-path packages/valory/skills/register_termination_abci
@@ -558,13 +557,13 @@ commands =
skipsdist = True
usedevelop = True
commands =
- autonomy analyse handlers -h abci -h http -h contract_api -h ledger_api -h signing -i abstract_abci -i counter -i counter_client -i hello_world_abci
+ autonomy analyse handlers -h abci -h http -h contract_api -h ledger_api -h signing -i abstract_abci -i counter -i counter_client
[testenv:check-dialogues]
skipsdist = True
usedevelop = True
commands =
- autonomy analyse dialogues -d abci -d http -d contract_api -d ledger_api -d signing -i abstract_abci -i counter -i counter_client -i hello_world_abci
+ autonomy analyse dialogues -d abci -d http -d contract_api -d ledger_api -d signing -i abstract_abci -i counter -i counter_client
[testenv:liccheck]
@@ -575,12 +574,6 @@ commands =
tomte freeze-dependencies --output-path {envtmpdir}/requirements.txt
liccheck -s tox.ini -r {envtmpdir}/requirements.txt -l PARANOID
-[testenv:analyse-services]
-skipsdist = True
-usedevelop = True
-commands =
- autonomy analyse service --public-id valory/hello_world --skip-warnings
-
[pytest]
log_cli = 1
log_cli_level = DEBUG