-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The get_hash and get_hash_array functions are unstable between rust versions due to changes in the internal hashing function. This patch adds deprecation tags to these functions and implements a to and from bytes representation for the Identity struct. This is distinct from the Ethereum ABI functions, as the byte representation is entierly defined by the Identity struct and not the Ethereum standard. As such it's a lot more straightforward to implement. The downside is that the new implementation is quite a bit larger than the old hash implementation at 68 bytes versus 8 bytes. But that's not really a big deal, for 5000 routers thats an extra 300MB of data used in indexing. Furthermore there's no risk of someone trying to generate an Identity with a hash collision.
- Loading branch information
Showing
5 changed files
with
138 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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,7 +1,7 @@ | ||
[package] | ||
authors = ["Jehan <[email protected]>"] | ||
name = "althea_types" | ||
version = "0.1.0" | ||
version = "0.2.0" | ||
edition = "2021" | ||
license = "Apache-2.0" | ||
|
||
|
This file contains 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 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 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