graphprotocol / graphprotocol/graph-node
Add support for failed transactions
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Rust
- Star
- 3.2k
- Fork
- 1.1k
- Merge trung bình
- 4 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 1
Mô tả
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
Transactions do not support the status flag from receipts, nor do they support the error reason (gas or revert reason). Moreover only successful call transactions will invoke a subgraph's handlers.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
What is the expected behavior?
That a failed transaction from an invocation of a call handler would:
a) Trigger the call handler in the subgraph
b) That the EthereumTransaction class would contain the following:
* a flag for status reflecting the success status of the transaction
* an errorType - reverted or out-of-gas (others?)
* the revertReason if any (which is easy to surface in ethers and web3)
The main motivation for something like this is for projects, such as ours, to track errors users have when interacting with our contracts (for monitoring tools). As users pay gas even for failed transactions, it's critical to minimize these where possible. It's even more important when they call our functions from their own contracts. As you can imagine, these calls are harder to track as unlike regular transactions invoking our contracts directly (where we are the to destination of the transaction) - their to destination is their contract which is calling ours by reference in the code.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Issue nêu tên lớp EthereumTransaction và các trình xử lý lệnh gọi subgraph, nhưng không có tệp nào trong repository hoặc test nào. Hãy bắt đầu bằng cách theo dõi cách receipts và các trình xử lý lệnh gọi được xử lý, sau đó xác định các giao dịch thất bại nên được biểu diễn và phân phối như thế nào. Hoàn thành khi các lệnh gọi thất bại kích hoạt trình xử lý và cung cấp status, loại lỗi cùng mọi lý do revert nếu có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- blockchain, graphql, rust
- Lĩnh vực
- backend-api-design, blockchain
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100