0chain / 0chain/zboxcli

Optimization proposal from Sculptex

Đang mở
#673 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
28
Fork
23
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

https://discord.com/channels/992566329632641056/1045060754103078933/1373235805459316816

Quotes from the discord message from Sculptex:
I have an app that uses the cli tools on the back end to post transactions to the Blockchain (Solana + Züs). Now the miner Active Set is much smaller, just a small number of inactive miners has a more dramatic effect on tx times.

My understanding is that each tx is sent to a random subset of miners. If inoperative miners are included in this subset, then there is a 30s timeout experienced. This can clearly and consistently be seen, the times for cli tx commands to complete consistently falls in the range around 5-7 seconds, 35-37 seconds or even 65-67 seconds. This shows instances of timeouts. The 5+ odd seconds is consistent with a minimum number of blocks passing to ensure finalization which is fine, it's the clear stepping of additional 30 seconds that is a problem.

The simple fix is to reduce the default timeout for miner response in the order of a few seconds max, this way the tx will be retried much quicker with a different set of miners.

This will result in a much more consistent UX.

A different approach that I have had success with is to curate the Active Set list of miners to only include ones that are recently active, so instead of using mainnet/dns/network that returns the entire Active Set, you would have a service running that excludes any miners that are currently inactive, such as active/dns/network.

![Image](https://github.com/user-attachments/assets/b3aeefcd-fbfd-4863-898f-c3235d61e9b7)

![Image](https://github.com/user-attachments/assets/91b80ba5-5095-4fef-8acc-97b739120ca2)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Xem xét logic gửi giao dịch của công cụ CLI, có thể trong GoSDK, để tìm nơi các tập hợp con của thợ đào được chọn và thời gian chờ được đặt. Issue đề cập đến việc giảm thời gian chờ mặc định cho phản hồi của thợ đào và có thể quản lý Active Set. Bắt đầu bằng cách kiểm tra các hàm gọi mạng và cấu hình thời gian chờ. Việc kiểm tra các thay đổi sẽ yêu cầu hiểu luồng giao dịch và có thể thiết lập môi trường kiểm tra để mô phỏng phản hồi của thợ đào.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
go, shell
Lĩnh vực
backend, cli, performance
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.