Skip to content

Compile triehash for no_std#280

Merged
ordian merged 8 commits into
masterfrom
triehash_no_std
Dec 9, 2019
Merged

Compile triehash for no_std#280
ordian merged 8 commits into
masterfrom
triehash_no_std

Conversation

@svyatonik
Copy link
Copy Markdown
Contributor

The idea is to use this crate to compute trie_root(transactions_receipts) in EthPoA -> Substrate bridge runtime module. The native version of keccak_256() is already available in Substrate => I hope most of time trie_root() will spend in native code.

Another option is to provide native ext fn keccak_256_trie_root(), but since trie codec in Ethereum != trie codec in Substrate, it'll be called fn ethereum_trie_root() && I do not think that it is a good idea to have fn like that in Substrate. I'm open to suggestions, though.

Copy link
Copy Markdown
Contributor

@niklasad1 niklasad1 left a comment

Choose a reason for hiding this comment

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

Looks good, but please update the CHANGELOG

@svyatonik
Copy link
Copy Markdown
Contributor Author

@niklasad1 I'm having troubles with compiling this in substrate, so will move this back to inprogress. Sorry for disturbance :/

@svyatonik
Copy link
Copy Markdown
Contributor Author

So, I've been compiling with SKIP_WASM_BUILD=1 before :/ Sorry again, for that, Niklas. Moving to pleasereview.

@ordian
Copy link
Copy Markdown
Contributor

ordian commented Dec 6, 2019

@ordian
Copy link
Copy Markdown
Contributor

ordian commented Dec 6, 2019

https://travis-ci.org/paritytech/parity-common/jobs/621565021#L216-L220

cargo fmt should fix the CI failure

@ordian ordian merged commit b5dc410 into master Dec 9, 2019
@ordian ordian deleted the triehash_no_std branch December 9, 2019 10:09
dvdplm added a commit that referenced this pull request Dec 10, 2019
* master:
  Compile triehash for no_std (#280)
  [kvdb-rocksdb] Use "pinned" gets to avoid allocations (#274)
  [kvdb-rocksdb] Release 0.2 (#273)
  [kvdb-rocksdb] switch to upstream (#257)
  travis: try to fix wasmpack chrome test on macOS (#263)
  Use 2018 edition for rustfmt (#266)
  [fixed-hash]: re-export `alloc_` (#268)
  kvdb-web: async-awaitify (#259)
  kvdb-rocksdb: configurable memory budget per column (#256)
  Bump rlp crate version. (#270)
  Introduce Rlp::at_with_offset method. (#269)
  Make fixed-hash test structs public (#267)
  Migrate primitive types to 2018 edition (#262)
  upgrade tiny-keccak to 2.0 (#260)
dvdplm added a commit that referenced this pull request Dec 17, 2019
* master:
  Fix a typo in error rlp error message (#283)
  [kvdb*] Make column type u32 instead of Option<u32> (#278)
  [kvdb-rocksdb] Add benchmark for point lookups (#275)
  Compile triehash for no_std (#280)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants