-
Notifications
You must be signed in to change notification settings - Fork 5
hypermap binding cacher #161
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
Open
nick1udwig
wants to merge
31
commits into
develop
Choose a base branch
from
dw/hmap-binding-cacher
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,787
−152
Open
Changes from 4 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
85333ff
JetBrains IDE .gitignore addition
dolled-possum 088332f
first step of bypermap binding caching
dolled-possum 8b6c2e5
new .wit adding binding-cacher interface
dolled-possum f18eb71
First inclusion in the new bindings support
dolled-possum 6e1091e
binding-cacher supports bootstrapping
dolled-possum e11d17c
Format Rust code using rustfmt
github-actions[bot] 3f69276
Merge branch 'develop' into dw/hmap-binding-cacher
dolled-possum 131ba1f
Merge branch 'develop' into dw/hmap-binding-cacher
dolled-possum 78a6a7e
Production addresses and starting blocks
dolled-possum ac36caf
Merge branch 'develop' into dw/hmap-binding-cacher
dolled-possum 0d1ac83
skipping validation of log_cache
dolled-possum e95ff8d
Format Rust code using rustfmt
github-actions[bot] a420cc2
Merge branch 'develop' into dw/hmap-binding-cacher
dolled-possum 9e15803
bindings.rs cleanup
dolled-possum 491ebbd
Format Rust code using rustfmt
github-actions[bot] 9d373bd
Initial support for tokenregistry calls
dolled-possum 5d53f9b
Helper structs
dolled-possum 0e41df0
Support for building transactions for writes
dolled-possum 2e3e473
new event filters
dolled-possum 5717ea7
tiny change in doc
dolled-possum 8c4a427
additional support functions
dolled-possum 009fb7b
Questionable changes to process_lib?
dolled-possum 77e5014
Format Rust code using rustfmt
github-actions[bot] bd5b6b0
new duration preview function
a46ad34
working our way backwards computation
48b6715
Format Rust code using rustfmt
github-actions[bot] 4b3e4ae
Merge branch 'develop' into dw/hmap-binding-cacher
dolled-possum 26565b9
removing obsolete comment
dolled-possum b40a832
Add DAO support
dolled-possum f409607
Merge branch 'develop' into dw/hmap-binding-cacher
dolled-possum 1c463af
Format Rust code using rustfmt
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| target | ||
| *.swp | ||
| .vscode | ||
| /.idea | ||
| .DS_Store |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,162 @@ | ||
| interface binding-cacher { | ||
| // Metadata associated with a batch of Ethereum logs. | ||
| record binding-logs-metadata { | ||
| chain-id: string, | ||
| from-block: string, | ||
| to-block: string, | ||
| time-created: string, | ||
| created-by: string, | ||
| signature: string, | ||
| } | ||
|
|
||
| // Represents an item in the manifest, detailing a single log cache file. | ||
| record binding-manifest-item { | ||
| metadata: binding-logs-metadata, | ||
| is-empty: bool, | ||
| file-hash: string, | ||
| file-name: string, | ||
| } | ||
|
|
||
| // The main manifest structure, listing all available log cache files. | ||
| // WIT does not support direct map types, so a list of key-value tuples is used. | ||
| record binding-manifest { | ||
| // The key is the filename of the log cache. | ||
| items: list<tuple<string, binding-manifest-item>>, | ||
| manifest-filename: string, | ||
| chain-id: string, | ||
| protocol-version: string, | ||
| } | ||
|
|
||
| record binding-get-logs-by-range-request { | ||
| from-block: u64, | ||
| to-block: option<u64>, // If None, signifies to the latest available/relevant cached block. | ||
| } | ||
|
|
||
| variant binding-get-logs-by-range-ok-response { | ||
| logs(tuple<u64, string>), | ||
| latest(u64), | ||
| } | ||
|
|
||
| // Defines the types of requests that can be sent to the Hypermap Cacher process. | ||
| variant binding-cacher-request { | ||
| get-manifest, | ||
| get-log-cache-content(string), | ||
| get-status, | ||
| get-logs-by-range(binding-get-logs-by-range-request), | ||
| reset(option<list<string>>), | ||
| start-providing, | ||
| stop-providing, | ||
| set-nodes(list<string>), | ||
| } | ||
|
|
||
| // Represents the operational status of the cacher. | ||
| record binding-cacher-status { | ||
| last-cached-block: u64, | ||
| chain-id: string, | ||
| protocol-version: string, | ||
| next-cache-attempt-in-seconds: option<u64>, | ||
| manifest-filename: string, | ||
| log-files-count: u32, | ||
| our-address: string, | ||
| is-providing: bool, | ||
| } | ||
|
|
||
| // Defines the types of responses the Hypermap Cacher process can send. | ||
| variant binding-cacher-response { | ||
| get-manifest(option<binding-manifest>), | ||
| get-log-cache-content(result<option<string>, string>), | ||
| get-status(binding-cacher-status), | ||
| get-logs-by-range(result<binding-get-logs-by-range-ok-response, string>), | ||
| start-providing(result<string, string>), | ||
| stop-providing(result<string, string>), | ||
| set-nodes(result<string, string>), | ||
| reset(result<string, string>), | ||
| rejected, | ||
| is-starting, | ||
| } | ||
| } | ||
|
|
||
| interface hypermap-cacher { | ||
| // Metadata associated with a batch of Ethereum logs. | ||
| record logs-metadata { | ||
| chain-id: string, | ||
| from-block: string, | ||
| to-block: string, | ||
| time-created: string, | ||
| created-by: string, | ||
| signature: string, | ||
| } | ||
|
|
||
| // Represents an item in the manifest, detailing a single log cache file. | ||
| record manifest-item { | ||
| metadata: logs-metadata, | ||
| is-empty: bool, | ||
| file-hash: string, | ||
| file-name: string, | ||
| } | ||
|
|
||
| // The main manifest structure, listing all available log cache files. | ||
| // WIT does not support direct map types, so a list of key-value tuples is used. | ||
| record manifest { | ||
| // The key is the filename of the log cache. | ||
| items: list<tuple<string, manifest-item>>, | ||
| manifest-filename: string, | ||
| chain-id: string, | ||
| protocol-version: string, | ||
| } | ||
|
|
||
| record get-logs-by-range-request { | ||
| from-block: u64, | ||
| to-block: option<u64>, // If None, signifies to the latest available/relevant cached block. | ||
| } | ||
|
|
||
| variant get-logs-by-range-ok-response { | ||
| logs(tuple<u64, string>), | ||
| latest(u64), | ||
| } | ||
|
|
||
| // Defines the types of requests that can be sent to the Hypermap Cacher process. | ||
| variant cacher-request { | ||
| get-manifest, | ||
| get-log-cache-content(string), | ||
| get-status, | ||
| get-logs-by-range(get-logs-by-range-request), | ||
| reset(option<list<string>>), | ||
| start-providing, | ||
| stop-providing, | ||
| set-nodes(list<string>), | ||
| } | ||
|
|
||
| // Represents the operational status of the cacher. | ||
| record cacher-status { | ||
| last-cached-block: u64, | ||
| chain-id: string, | ||
| protocol-version: string, | ||
| next-cache-attempt-in-seconds: option<u64>, | ||
| manifest-filename: string, | ||
| log-files-count: u32, | ||
| our-address: string, | ||
| is-providing: bool, | ||
| } | ||
|
|
||
| // Defines the types of responses the Hypermap Cacher process can send. | ||
| variant cacher-response { | ||
| get-manifest(option<manifest>), | ||
| get-log-cache-content(result<option<string>, string>), | ||
| get-status(cacher-status), | ||
| get-logs-by-range(result<get-logs-by-range-ok-response, string>), | ||
| start-providing(result<string, string>), | ||
| stop-providing(result<string, string>), | ||
| set-nodes(result<string, string>), | ||
| reset(result<string, string>), | ||
| rejected, | ||
| is-starting, | ||
| } | ||
| } | ||
|
|
||
| world hypermap-cacher-sys-v1 { | ||
| import sign; | ||
| import binding-cacher; | ||
| import hypermap-cacher; | ||
| include process-v1; | ||
| } |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| /// Hypermap binding deployment address on base | ||
| pub const HYPERMAP_BINDING_ADDRESS: &'static str = "0x8A791620dd6260079BF849Dc5567aDC3F2FdC318"; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.