Giter Club home page Giter Club logo

Comments (7)

freak12techno avatar freak12techno commented on July 3, 2024 1

Okay so I'm releasing v0.2.2 with the fix and then you can use this version instead of building it from source. I'll close this issue after that, if something like this would happen let me know.

from cosmos-exporter.

freak12techno avatar freak12techno commented on July 3, 2024

Hi there. I unfortunately cannot reproduce it as I don't have the fetchai fullnode, can you try the following?

  1. clone this repo
  2. in validator.go, replace this part:
	validatorTokensGauge.With(prometheus.Labels{
		"address": validator.Validator.OperatorAddress,
		"moniker": validator.Validator.Description.Moniker,
		"denom":   Denom,
	}).Set(float64(validator.Validator.Tokens.Int64()) / DenomCoefficient)

with the followiing

	if value, err := strconv.ParseFloat(validator.Validator.Tokens.String(), 64); err != nil {
		sublogger.Error().
			Str("address", address).
			Err(err).
			Msg("Could not parse validator tokens")
	} else {
		validatorTokensGauge.With(prometheus.Labels{
			"address": validator.Validator.OperatorAddress,
			"moniker": validator.Validator.Description.Moniker,
			"denom":   Denom,
		}).Set(value / DenomCoefficient)
	}
  1. build the binary with go build ., this'll produce the output at ./main
  2. try this version if it'll have the same issue

Let me know if this'll work @MatisseB

from cosmos-exporter.

MatisseB avatar MatisseB commented on July 3, 2024

Hi, thanks for the help @freak12techno !
It works for those lines of code but the same error is triggered further in validator.go at line 471 and sometimes line 576.
Maybe there is a need to change the value globally?

Output:
image

from cosmos-exporter.

freak12techno avatar freak12techno commented on July 3, 2024

Seems like the same issue but in other places, I’ll fix it there later today as well.

from cosmos-exporter.

freak12techno avatar freak12techno commented on July 3, 2024

@MatisseB okay I've pushed the version that should fix at least some of these panics, can you fetch the latest changes (with the commit from today), build the exporter from it and check if it panics? if everything's okay I'll release the new version with the fix

from cosmos-exporter.

MatisseB avatar MatisseB commented on July 3, 2024

@freak12techno all good for me, it works like charm.
Thanks a lot !

from cosmos-exporter.

freak12techno avatar freak12techno commented on July 3, 2024

Done. Thanks for helping!

from cosmos-exporter.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.