-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow a data source to create another in the same block it was created #1185
Conversation
let block_with_calls = EthereumBlockWithCalls { | ||
ethereum_block: block.deref().clone(), | ||
calls: calls.clone(), | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is wrong afaict, if the new data source contains call handlers for new addresses the call won't be contained here. But this is the way it was before so I will open an issue for fixing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looked into this and found that the calls will not be included in the block in the case where the data sources at the beginning of the block did not require them. The calls will be complete when they are included though.
…created Resolves #1105.
Use impl Trait in signature. Remove dead variables.
It's too small to exist by itself. Add note to the loop.
605b4f1
to
256cc4a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, let's just fix the issue with the calls not being included if the data sources at the beginning of the block did not require them
let block_with_calls = EthereumBlockWithCalls { | ||
ethereum_block: block.deref().clone(), | ||
calls: calls.clone(), | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looked into this and found that the calls will not be included in the block in the case where the data sources at the beginning of the block did not require them. The calls will be complete when they are included though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked with @leoyvens, will merge now and fix the issue with calls not being populated during reprocessing separately
Thanks for the review! |
Resolves #1105, this involved some refactoring to
instance_manager::process_block
.This was tested by uncommenting this line on this subgraph https://github.com/graphprotocol/aragon-subgraph/blob/sistemico/canary/canary/src/mappings/apm.ts#L42. Previously it would print the expected error, now it spawns the data source and processes its events on the same block.