Skip to content
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

nodeapi: add automatic runtime history provider #383

Merged
merged 9 commits into from
Apr 22, 2023
Merged

Conversation

pro-wh
Copy link
Collaborator

@pro-wh pro-wh commented Apr 14, 2023

use archive node based on runtime round

analyzer/api.go Show resolved Hide resolved
common/types.go Show resolved Hide resolved
common/types.go Show resolved Hide resolved
}

// ID returns the ID for a Runtime on the provided network.
func (r Runtime) ID(n Network) (string, error) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only used in statecheck, should move there

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

storage/oasis/runtime.go Outdated Show resolved Hide resolved
common/types.go Show resolved Hide resolved
Copy link
Contributor

@mitjat mitjat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, looks nice!
Two comments:

  • Please describe in the PR how you tested this. Should involve an analyzer run for blocks from..to where from and to are in separate archives (cobalt vs damask)
  • This does not solve the problem of sapphire needing to use a separate RPC URL. It's actually nicer in terms of a clean scope for the PR this way. I just thought it might make sense to do it together because the sapphire problem will probably require a small rethinking of the config structs. Let's follow up separately.

Thank you also for all the little drive-by housekeeping changes in this PR, neatly in their own commits too. ❤️

common/types.go Show resolved Hide resolved
common/types.go Show resolved Hide resolved
config/history.go Show resolved Hide resolved
storage/oasis/runtime.go Outdated Show resolved Hide resolved
config/history.go Outdated Show resolved Hide resolved
Base automatically changed from pro-wh/feature/holders9 to main April 19, 2023 16:34
@pro-wh
Copy link
Collaborator Author

pro-wh commented Apr 22, 2023

woo tested. one block in cobalt, one block in damask

{"analyzer":"emerald","caller":"runtime.go:118","level":"info","module":"analysis_service","msg":"attempting block","round":1003297,"ts":"2023-04-22T00:32:22.813837667Z"}
{"analyzer":"emerald","assumed_gas_used":0,"caller":"extract.go:427","level":"info","module":"analysis_service","msg":"tx didn't emit a core.GasUsed event and failed, assuming it used no gas","ts":"2023-04-22T00:32:24.622247728Z","tx_hash":"eeb746a873118519d89e78b9c50c8249385460f3b814063e38b7f4da404f8f97"}
{"analyzer":"emerald","assumed_gas_used":0,"caller":"extract.go:427","level":"info","module":"analysis_service","msg":"tx didn't emit a core.GasUsed event and failed, assuming it used no gas","ts":"2023-04-22T00:32:24.625347728Z","tx_hash":"50bb1fdbcbec91024e53a360ac5cb0799a40603a36286d8bde15377aaf6fcb81"}
{"analyzer":"emerald","assumed_gas_used":0,"caller":"extract.go:427","level":"info","module":"analysis_service","msg":"tx didn't emit a core.GasUsed event and failed, assuming it used no gas","ts":"2023-04-22T00:32:24.625819952Z","tx_hash":"3137970399137266958faf1ecd993b3e092d279c4b19ec9bb03fb36e1458ee20"}
{"analyzer":"emerald","caller":"runtime.go:136","level":"info","module":"analysis_service","msg":"processed block","round":1003297,"ts":"2023-04-22T00:32:24.673473075Z"}
{"analyzer":"emerald","caller":"runtime.go:118","level":"info","module":"analysis_service","msg":"attempting block","round":1003298,"ts":"2023-04-22T00:32:24.773989587Z"}
{"analyzer":"emerald","caller":"runtime.go:136","level":"info","module":"analysis_service","msg":"processed block","round":1003298,"ts":"2023-04-22T00:32:25.064154714Z"}
{"analyzer":"emerald","caller":"runtime.go:140","level":"info","module":"analysis_service","msg":"finished processing all blocks in the configured range [1003297, 1003298]","ts":"2023-04-22T00:32:25.064240583Z"}

@pro-wh pro-wh mentioned this pull request Apr 22, 2023
@pro-wh pro-wh merged commit 89df0e1 into main Apr 22, 2023
@pro-wh pro-wh deleted the pro-wh/feature/rtconf branch April 22, 2023 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants