-
Notifications
You must be signed in to change notification settings - Fork 463
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
[合作] Integration with Farcaster Planning #5156
Comments
List of metrics (In active development)
venus-minerList of metrics could be found here. The wording might need some polish. Note that metrics below are available per miner_id. // latency for GetBaseInfo API
GetBaseInfoDuration = stats.Float64("getbaseinfo_ms", "Duration of GetBaseInfo in miner", stats.UnitMilliseconds)
// latency for ComputeTicket API
ComputeTicketDuration = stats.Float64("computeticket_ms", "Duration of ComputeTicket in miner", stats.UnitMilliseconds)
// latency for IsRoundWinner API
IsRoundWinnerDuration = stats.Float64("isroundwinner_ms", "Duration of IsRoundWinner in miner", stats.UnitMilliseconds)
// latency for ComputeProof API
ComputeProofDuration = stats.Float64("computeproof_s", "Duration of ComputeProof in miner", stats.UnitSeconds)
// number of block produced
NumberOfBlock = stats.Int64("number_of_block", "Number of production blocks", stats.UnitDimensionless)
// number of rounds that miner_id is winner
NumberOfIsRoundWinner = stats.Int64("number_of_isroundwinner", "Number of is round winner", stats.UnitDimensionless) venus-messagerList of metrics could be found here. // Below metrics are updated on a per wallet address granularity
WalletBalance = stats.Int64("wallet_balance", "Wallet balance", stats.UnitDimensionless)
WalletDBNonce = stats.Int64("wallet_db_nonce", "Wallet nonce in db", stats.UnitDimensionless)
WalletChainNonce = stats.Int64("wallet_chain_nonce", "Wallet nonce on the chain", stats.UnitDimensionless)
// Current number of messages that are waiting for venus-messager to fill out parameters like signature, gas usage, nonce etc.
// This metric is updated on a per wallet address granularity
NumOfUnFillMsg = stats.Int64("num_of_unfill_msg", "The number of unFill msg", stats.UnitDimensionless)
// Current number of messages that venus-messager has filled out parameters like signature, gas usage, nonce etc.
// This metric is updated on a per wallet address granularity
NumOfFillMsg = stats.Int64("num_of_fill_msg", "The number of fill Msg", stats.UnitDimensionless)
// Current number of messages that venus-messager has failed to fill out parameters like signature, gas usage, nonce etc.
// This metric is updated on a per wallet address granularity
NumOfFailedMsg = stats.Int64("num_of_failed_msg", "The number of failed msg", stats.UnitDimensionless)
// Current number of messages that haven't being on-chain for more than 3 minutes
NumOfMsgBlockedThreeMinutes = stats.Int64("blocked_three_minutes_msgs", "Number of messages blocked for more than 3 minutes", stats.UnitDimensionless)
// Current number of messages that haven't being on-chain for more than 5 minutes
NumOfMsgBlockedFiveMinutes = stats.Int64("blocked_five_minutes_msgs", "Number of messages blocked for more than 5 minutes", stats.UnitDimensionless)
// Number of message being selected by venus-messager during last round of message pushing
SelectedMsgNumOfLastRound = stats.Int64("selected_msg_num", "Number of selected messages in the last round", stats.UnitDimensionless)
// Number of message being pushed by venus-messager during last round of message pushing
ToPushMsgNumOfLastRound = stats.Int64("topush_msg_num", "Number of to-push messages in the last round", stats.UnitDimensionless)
// Number of message being expired by venus-messager during last round of message pushing
ExpiredMsgNumOfLastRound = stats.Int64("expired_msg_num", "Number of expired messages in the last round", stats.UnitDimensionless)
// Number of message encountered errors during last round of message pushing
ErrMsgNumOfLastRound = stats.Int64("err_msg_num", "Number of err messages in the last round", stats.UnitDimensionless)
// Current time difference between chain head time and time on venus-messager machine system time
ChainHeadStableDelay = stats.Int64("chain_head_stable_s", "Delay of chain head stabilization", stats.UnitSeconds)
// Histogram of time difference between chain head time and time on venus-messager machine system time
ChainHeadStableDuration = stats.Int64("chain_head_stable_dur_s", "Duration of chain head stabilization", stats.UnitSeconds)
) |
List of metrics used by farcaster (REST API) :Lotus nodeChainHead Lotus minerActorAddress Lotus markets/boostDealsConsiderOfflineRetrievalDeals |
API MappingHow to test chainHead
Lotus daemon API -> Venus daemon API mappingBoth daemon share similar APIs. ChainHead
WalletBalance Lotus miner API -> venus-cluster API
ActorAddress Lotus markets/boost API -> venus-market APIFor markets, both APIs like daemons share much commonality. Note that the following API need token of DealsConsiderOfflineRetrievalDeals
MarketGetAsk
MarketGetRetrievalAsk
MarketListDataTransfers Note that APIs tagged with "not implemented" will be implemented by Venus team soon. |
We use StateReadState to retrieve lock funds : "PreCommitDeposits", "LockedFunds", "FeeDebt", "InitialPledge"
How does farcaster can access the metrics ? can you give an example ? |
@diwufeiwen ,这个有办法吗?
@diwufeiwen ,cluster是不是还没有开始做?要等我们做好再有example还是说,跟venus-miner之类的差不多? |
Hello, @s0nik42, glad that you asked!
It is the team's goal to have StateReadState implemented in either the next sprint or the sprint after next one.
The metrics of venus-cluster is still under development. Meanwhile if there is any metrics you wish to see, please feel free to let us know. For examples, we could have the chain service on Calib updated with latest version of venus-miner and venus-messager (with metrics implemented) and expose relevant Prometheus ports to you for your testing. The integration with Venus could be broken down to 1) chain service and then 2) SP. Given the nature of Venus architecture where multiple SPs sharing access to one chain service, it might be the case that chain service operator and SP would deploy their own monitoring solution respectively. |
|
scoping the integration effort now. Will let you know soon |
Coud you give me access to :
Feedback on Venus daemon API :
All other API calls works fine 👍🏻 |
@s0nik42, glad you asked!
I will see if @Venus-ops has deployed venus-market on calib. Will come back to you on this.
Yes, venus-cluster comes with a default exporter too. But current documentation hasn't been translated yet. Maybe google translate could give you a quick overview?
Will bring this up with @Venus-ops too on Slack. |
One other thing, the engineering team has been giving thoughts on how Venus systems could give feedbacks to a monitoring system like Farcaster. So the team think that maybe instead of the monitoring system actively pulling APIs, maybe another approach could be Venus itself feed the data to Farcaster. This would lower the risk of API pulling affecting essential PoST messages to go through. Would love to hear your thoughts on that. |
Hi, WalletAddresses API: "params": [] eg: StateReadState need version greater than v1.7.1 |
I fully agree on that, I did ask that to the lotus when starting developing Farcaster, scraping the API every minutes is definitely not the best approach but that's the only solution available now (for lotus). What farcaster is doing right now is retrieving all the data over the REST API , formatting and enriching the data then exposing them to prometheus. The best approach would probably be to transition and have most of the data enriched directly available in prometheus. |
I think we must define the right target and path. As if it diverged to much from lotus, building a different implementation might be more relevant. |
yes, if you see any metrics that is lacking, please feel free to let the team know! Venus is more than happy to give the metrics that users want.
yes, there could be new path that more tailored toward Venus. The devs suggested that to take advantage of Venus’ distributed design and maybe have one layout for chain service operator and another layout for SP as the idea of chain service is that multiple SP could share access to one chain service and what a chain service operator may want to see is different from what a SP may want to see on their dashboards. Anyway the ultimate result should be whatever works for end users of Farcaster. |
Hello, @s0nik42! If you are stuck on any API usage of Venus node or design choices, please feel free to let us know! |
Closing the planning thread and moving the conversation to #5357 |
Background
To explore opportunities of integration with Farcaster so that Venus community could enjoy a open-source solution for better monitoring their storage systems.
Research
AI
Week 1
Week 2
The text was updated successfully, but these errors were encountered: