Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portal Loop: monitoring agent/oracle #1443

Open
moul opened this issue Dec 15, 2023 · 5 comments · Fixed by #1612
Open

Portal Loop: monitoring agent/oracle #1443

moul opened this issue Dec 15, 2023 · 5 comments · Fixed by #1612
Assignees

Comments

@moul
Copy link
Member

moul commented Dec 15, 2023

With the testing of the new portal loop (#1108), it would be beneficial to develop an automated system for interacting with our chain. This system would serve two purposes: 1. to observe regular changes and 2. to provide advanced monitoring. One approach is to create a simple agent that conducts a transaction every few minutes, such as updating a counter. If the transaction fails or if the counter becomes outdated or reset, this agent can trigger a monitoring alert.

cc @gnolang/devrels @gnolang/devops


Suggested approach:

  1. Develop a monitoring smart contract with counters and "last update" date fields. Add helper functions to increment the counter and update the last date.
  2. Create a client (daemon) that accepts parameters like --every 60s and --remote rpc.test3.gno.land. This client will regularly perform checks and call a hook/script when a failure occurs.

Alternative approach:

  1. Follow the step 1. mentioned above.
  2. Write a script that performs a single verification, exits with a status code of 0 or 1, and logs the details.
  3. Consider using GitHub Actions to run it.
@moul moul added the 🗺️good first issue🗺️ Ideal for newcomer contributors label Dec 28, 2023
@moul
Copy link
Member Author

moul commented Jan 18, 2024

Could be a nice one to test the new gnoclient, once merged (#1047 (comment)).

@moul moul changed the title Portal Loop: monitoring oracle Portal Loop: monitoring agent Jan 18, 2024
@moul moul changed the title Portal Loop: monitoring agent Portal Loop: monitoring agent/oracle Jan 18, 2024
@albttx albttx self-assigned this Jan 19, 2024
@moul moul mentioned this issue Feb 21, 2024
9 tasks
zivkovicmilos added a commit that referenced this issue Apr 10, 2024
A demo is currently running on the portal loop

you can check https://portal.gnoteam.com/r/portal/counter

close: #1443

<details><summary>Contributors' checklist...</summary>

- [ ] Added new tests, or not needed, or not feasible
- [ ] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [ ] Updated the official documentation or not needed
- [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [ ] Added references to related issues and PRs
- [ ] Provided any useful hints for running manual tests
- [ ] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>

---------

Co-authored-by: Miloš Živković <milos@zmilos.com>
Co-authored-by: Hariom Verma <hariom18599@gmail.com>
@moul moul reopened this Jul 7, 2024
@moul
Copy link
Member Author

moul commented Jul 7, 2024

Reopening this issue with new context.

The PR #2329 provides a better counter and watchdog system, introducing the gno.land/r/gnoland/monit realm.

We now need to rewrite the agent part that will replace misc/autocounterd. This agent should not only verify that a transaction can be made, but also check if the counter was incremented by keeping a local counter for comparison.

Ideally, this agent should check that the realm (and chain) is operational and that the repository is still compatible. To achieve this, I suggest a small change: instead of running the misc/monit-agent binary, I propose a misc/monit-agent/run.sh script that will git pull the master branch, then go run . --remote={gno.land,test4,...}. This will verify that the production is up and running and that the master branch is still compatible with the production deployment (transaction format, encoding, etc.).

cc @gnolang/devops

@moul moul mentioned this issue Jul 7, 2024
4 tasks
@zivkovicmilos zivkovicmilos assigned sw360cab and unassigned albttx Jul 8, 2024
zivkovicmilos added a commit that referenced this issue Jul 8, 2024
This PR introduces the `r/gnoland/monit` realm, which can be used by an
external tool to verify if everything is working well, including:
- gnokey compatibility (and all the tx/amino/etc)
- networking (rpc)
- realm state persistency (counter should be higher than the previous
value)

In addition to being a good target for an external monitoring agent, the
realm displays (`Render`) some information, including whether the agent
appears to be missing.

- [x] improve ownable (depends on #2330)
- [x] p/demo/watchdog
- [x] r/gnoland/monit
- [ ] ~update contribs/autocounterd~ -> let's @gnolang/devops tackle
this in another PR. -> #1443

---------

Signed-off-by: moul <94029+moul@users.noreply.github.com>
Co-authored-by: Miloš Živković <milos@zmilos.com>
@DIGIX666
Copy link
Contributor

DIGIX666 commented Jul 12, 2024

Hi 👋🏼
Are there any people working on this project ?

cc @moul @zivkovicmilos

@moul
Copy link
Member Author

moul commented Jul 14, 2024

@sw360cab, have you already started working on it? If not, could @DIGIX666 try to assist?

gfanton pushed a commit to gfanton/gno that referenced this issue Jul 23, 2024
This PR introduces the `r/gnoland/monit` realm, which can be used by an
external tool to verify if everything is working well, including:
- gnokey compatibility (and all the tx/amino/etc)
- networking (rpc)
- realm state persistency (counter should be higher than the previous
value)

In addition to being a good target for an external monitoring agent, the
realm displays (`Render`) some information, including whether the agent
appears to be missing.

- [x] improve ownable (depends on gnolang#2330)
- [x] p/demo/watchdog
- [x] r/gnoland/monit
- [ ] ~update contribs/autocounterd~ -> let's @gnolang/devops tackle
this in another PR. -> gnolang#1443

---------

Signed-off-by: moul <94029+moul@users.noreply.github.com>
Co-authored-by: Miloš Živković <milos@zmilos.com>
@moul
Copy link
Member Author

moul commented Aug 8, 2024

@aeddi, can you check with @sw360cab and @DIGIX666 if you can maybe help them; i think it's a good onboarding challenge for you

@linear linear bot removed the 🗺️good first issue🗺️ Ideal for newcomer contributors label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Status: 📥 Inbox
Status: 🌟 Wanted for Launch
Status: TODO
Development

Successfully merging a pull request may close this issue.

4 participants