archethic-foundation / archethic-foundation/archethic-node

Oracle Scheduler receives unhandle messages

Open
#1,392 0 comments 0 reactions 0 assignees View on GitHub
bug oracle chain
Dominant language
Elixir
Stars
82
Forks
24
PR merge metrics
No merged PRs in 30d

Description

### Describe the problem you discovered

```
(archethic 1.4.6) lib/archethic/oracle_chain/scheduler.ex:96: Archethic.OracleChain.Scheduler.handle_event(:info, {:new_transaction, <<0, 0, 206, 37, 171, 89, 233, 110, 145, 243, 221, 1, 235, 98, 194, 6, 131, 130, 57, 227, 251, 204, 116, 191, 33, 157, 216, 93, 119, 159, 135, 139, 164, 66>>, :oracle, ~U[2024-01-22 14:16:20.240Z]}, :triggered, %{indexes: %{~U[2024-01-23 00:00:00Z] => 758}, next_address: <<0, 0, 247, 98, 10, 254, 29, 102, 227, 126, 203, 222, 220, 101, 234, 92, 229, 95, 59, 192, 143, 209, 197, 27, 37, 104, 234, 23, 110, 108, 135, 196, 61, 64>>, polling_date: ~U[2024-01-22 14:14:00Z], polling_interval: "0 * * * * * *", polling_timer: #Reference<0.292645386.3397910530.53585>, summary_date: ~U[2024-01-23 00:00:00Z], summary_interval: "0 0 0 * * * *", watcher: #PID<0.10196.4506>})
```

this case is not handled because state is `triggered` and `next_address != address.`

The process crashes and restarts in a correct state, so it is not a critical issue

### Describe the solution you'd like

This message should be handled

### Epic

_No response_

Contributor guide

Open the contributing guide

Research direction

Start in lib/archethic/oracle_chain/scheduler.ex at line 96 and inspect how Scheduler.handle_event/3 handles the :triggered state. Reproduce or trace the shown :new_transaction message where next_address differs from the address, then verify that this case is handled without crashing or requiring a restart.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
blockchain
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.