graphprotocol / graphprotocol/graph-node
contract call do not allow you to specify blocknumber and they execute from the block that trigger the handler
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Rust
- Sterne
- 3.2k
- Forks
- 1.1k
- Ø Merge
- 4 T. 1 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, von einem Handler ausgehende Contract-Aufrufe nachzuverfolgen und zu untersuchen, wie der auslösende Block als Ausführungskontext bereitgestellt wird. Ermittle, wie ein Aufrufer einen früheren Block auswählen könnte, etwa currentBlock - 1, und lege das Verhalten für Aufrufe fest, die Transaktionen im selben Block betreffen; abgeschlossen ist die Aufgabe, wenn Contract-Lesezugriffe den ausgewählten Block berücksichtigen, ohne das Standardverhalten zu ändern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust
- Bereich
- backend, blockchain
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100