graphprotocol / graphprotocol/graph-node

contract call do not allow you to specify blocknumber and they execute from the block that trigger the handler

オープン
#2,027 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

enhancement mappings
主要言語
Rust
スター
3.2k
フォーク
1.1k
平均マージ
4日 1時間
マージ済み PR(30日)
1

説明

Currently when in my handler I make a call to a contract, it is executed as the block that triggered the handler

This means that such call can potentially act on data in the future (relative to the trigger) since the tx that triggered the handler could be prior to other transactions in the same block that could modify the data that affect the contract call.

It would be great if we could specify which blockNunber to use for contracts. For example reading from currentBlock -1 would make sure the contract call will not only be affected by the action of further tx. It would have the effect of not considering prior tx effect (in the same block) but depending on use case, it can be preferable.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、handler から行われるコントラクト呼び出しと、トリガーとなったブロックが実行コンテキストとしてどのように渡されるかを追跡します。caller が currentBlock - 1 のように前のブロックを選択する方法を特定し、同じブロック内のトランザクションを伴う呼び出しの動作を定義します。完了の条件は、デフォルトの動作を変更せずに、コントラクトの読み取りが選択されたブロックを参照することです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
backend, blockchain
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。