graphprotocol / graphprotocol/graph-node
contract call do not allow you to specify blocknumber and they execute from the block that trigger the handler
Nessuno ha ancora preso questa issue.
- Lingua principale
- Rust
- Stelle
- 3.2k
- Fork
- 1.1k
- Merge medio
- 4g 1h
- PR unite (30g)
- 1
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia tracciando le chiamate ai contratti effettuate da un handler e il modo in cui il blocco che le attiva viene fornito come contesto di esecuzione. Determina come un caller potrebbe selezionare un blocco precedente, ad esempio currentBlock - 1, e definisci il comportamento per le chiamate che coinvolgono transazioni nello stesso blocco; il lavoro è completo quando le letture dei contratti rispettano il blocco selezionato senza modificare il comportamento predefinito.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- backend, blockchain
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100