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

VpEnv/TxEnv using concrete storage_api::Error #465

Merged
merged 38 commits into from
Oct 13, 2022

Conversation

tzemanovic
Copy link
Member

@tzemanovic tzemanovic commented Sep 13, 2022

based on #380

This PR replaces the generic associated type on VpEnv and TxEnv with storage_api::Error to make it possible to wrap custom errors and also to improve the ergonomics of using these traits together with storage_api::{StorageRead, StorageWrite}

tzemanovic and others added 30 commits August 17, 2022 18:39
@tzemanovic
Copy link
Member Author

pls update wasm

tzemanovic added a commit that referenced this pull request Sep 14, 2022
* tomas/vp-tx-env-concrete-error:
  changelog: add #465
  [ci skip] wasm checksums update
  ledger: use storage_api::Error in VpEnv and TxEnv instead of generic
  update wasm checksums
  changelog: add #380
  shared: Add pre/post to VpEnv and use them to provide default impls
  changelog: add #334
  wasm checksums update
  storage_api: add default borsh encoded read/write impl and handle errors
tzemanovic added a commit that referenced this pull request Sep 14, 2022
handle TODOs to fix LazyVec's iter order to fix the API SM test
@tzemanovic tzemanovic marked this pull request as ready for review September 14, 2022 09:18
tzemanovic added a commit that referenced this pull request Sep 14, 2022
* tomas/vp-tx-env-concrete-error:
  changelog: add #465
  [ci skip] wasm checksums update
  ledger: use storage_api::Error in VpEnv and TxEnv instead of generic
@tzemanovic tzemanovic mentioned this pull request Sep 14, 2022
This was referenced Sep 21, 2022
tzemanovic added a commit that referenced this pull request Sep 23, 2022
* tomas/vp-tx-env-concrete-error:
  changelog: add #465
  [ci skip] wasm checksums update
  ledger: use storage_api::Error in VpEnv and TxEnv instead of generic
tzemanovic added a commit that referenced this pull request Sep 23, 2022
* tomas/vp-tx-env-concrete-error:
  changelog: add #465
  [ci skip] wasm checksums update
  ledger: use storage_api::Error in VpEnv and TxEnv instead of generic
tzemanovic added a commit that referenced this pull request Sep 23, 2022
* namada/tomas+brent/lazy-vec-and-map:
  changelog: #503
  [ci] wasm checksums update
  remove unfinished lazy_set, lazy_hashset and lazy_hashmap for now
  ledger/storage/lazy: update lazy_set for updated trait LazyCollection
  ledger/storage/lazy: remove unused error cases
  WIP: Nested LazyMap validation and testing
  WIP: validation for lazy_map
  WIP: StateMachine tests for lazy_vec validation
  post-conditions for Transition::Update + some comments
  quick bug and documentation fix
  update after rebase on #458, #465
  storage/lazy_vec: add state machine test for lazy vec API
  storage/lazy_vec/validation: disallow unrecognized keys matching prefix
  impl LazyCollection trait for all the collections + refactor
  storage_api/collections/lazy: allow nested lazy collections in LazyMap
  add lazy_vec validation
  fix clippy
  storage_api/collections/lazy: add basic tests and missing methods
  cargo test test_lazy_vec_basics
  update lazy for explicit lifetime in StorageRead trait
  storage: add `Key::last` method, impl KeySeg for all ints
  Switch to use storage::KeySeg and add LazySet
  add lazy map without hashing
  refactored lazy collections, replaced hasher, added iter
  fmt && clippy
  add fn get_elem_key_by_hash to LazyMap
  lazy hash map first commit
  add lazy set (WIP), make LazyVec.get public
  add lazy vector
  create lazy data structures for storage access
  rustdoc: resolve ambiguous link
  fixup! Merge branch 'namada/tomas/sorted-prefix-iter' (#458)
tzemanovic added a commit that referenced this pull request Sep 27, 2022
* tomas+brent/lazy-vec-and-map:
  changelog: #503
  [ci] wasm checksums update
  remove unfinished lazy_set, lazy_hashset and lazy_hashmap for now
  ledger/storage/lazy: update lazy_set for updated trait LazyCollection
  ledger/storage/lazy: remove unused error cases
  WIP: Nested LazyMap validation and testing
  WIP: validation for lazy_map
  WIP: StateMachine tests for lazy_vec validation
  post-conditions for Transition::Update + some comments
  quick bug and documentation fix
  update after rebase on #458, #465
  storage/lazy_vec: add state machine test for lazy vec API
  storage/lazy_vec/validation: disallow unrecognized keys matching prefix
  impl LazyCollection trait for all the collections + refactor
  storage_api/collections/lazy: allow nested lazy collections in LazyMap
  add lazy_vec validation
  fix clippy
  storage_api/collections/lazy: add basic tests and missing methods
  cargo test test_lazy_vec_basics
  update lazy for explicit lifetime in StorageRead trait
  storage: add `Key::last` method, impl KeySeg for all ints
  Switch to use storage::KeySeg and add LazySet
  add lazy map without hashing
  refactored lazy collections, replaced hasher, added iter
  fmt && clippy
  add fn get_elem_key_by_hash to LazyMap
  lazy hash map first commit
  add lazy set (WIP), make LazyVec.get public
  add lazy vector
  create lazy data structures for storage access
  rustdoc: resolve ambiguous link
  fixup! Merge branch 'namada/tomas/sorted-prefix-iter' (#458)
@tzemanovic tzemanovic mentioned this pull request Oct 6, 2022
@juped juped merged commit 1809ae1 into main Oct 13, 2022
@juped juped deleted the tomas/vp-tx-env-concrete-error branch October 13, 2022 06:51
juped added a commit that referenced this pull request Oct 13, 2022
Draft drifted somewhat over this release cycle. We can clear this up
with a merge-and-delete.

* draft: (373 commits)
  changelog: add #452
  feat: rocksdb use jemalloc
  feat: update rocksdb version
  [ci] wasm checksums update
  changelog: add #501
  fix e2e tests
  fix e2e tests
  Misc refactoring
  Uses `end_epoch` in `query_proposal_result`
  Refactors governance e2e tests
  [ci] wasm checksums update
  changelog: #503
  [ci] wasm checksums update
  remove unfinished lazy_set, lazy_hashset and lazy_hashmap for now
  ledger/storage/lazy: update lazy_set for updated trait LazyCollection
  Fixes specs
  [ci] wasm checksums update
  fix display proposal result in cli
  fix proposal_submission e2e test
  [misc] rebase
  ledger/storage/lazy: remove unused error cases
  WIP: Nested LazyMap validation and testing
  WIP: validation for lazy_map
  WIP: StateMachine tests for lazy_vec validation
  update wasm checksums
  changelog: add #500
  remove intent gossiper, matchmaker and their deps
  Adds `max_proposal_period` governance parameter
  Removes `max_proposal_fund_transfer` parameter
  Use proposal `end_epoch` instead of `start_epoch` for voting power
  Skip tx whitelist for proposal code
  Rename `Treasury` to `SlashFund`
  fmt and fix clippy
  Speeds up testing
  Fixes `safe_exit` call only if `force` is not set
  [misc]: remove logs
  [fix]: votes accumulation
  Fixes test artifacts folder persistence
  Fixes e2e tests
  [fix]: e2e test
  [fix]: e2e test
  [misc]: clippy, fmt
  [fix]: error println
  [feat]: vote transaction validation
  [fix]: governance vp author address, proposal submission validation
  [fix]: bad validation condition
  [fix]: clippy, fmt
  [fix]: clippy, fmt
  [misc]: clippy, fmt
  [feat]: added total votes to query
  [fix]: governance overflow, proposal validation
  fixup! Merge branch 'yuji/multitoken' (#359)
  fixup! rustdoc: fix more broken links
  fixup! Sync with 'main'
  rustdoc: fix more broken links
  fixup! Sync with 'main'
  [ci] wasm checksums update
  changelog: add #359
  change the balance format
  update a test wasm
  remove an error message
  [ci skip] wasm checksums update
  multitoken transfer and query
  post-conditions for Transition::Update + some comments
  quick bug and documentation fix
  update after rebase on #458, #465
  storage/lazy_vec: add state machine test for lazy vec API
  storage/lazy_vec/validation: disallow unrecognized keys matching prefix
  impl LazyCollection trait for all the collections + refactor
  storage_api/collections/lazy: allow nested lazy collections in LazyMap
  add lazy_vec validation
  fix clippy
  storage_api/collections/lazy: add basic tests and missing methods
  cargo test test_lazy_vec_basics
  update lazy for explicit lifetime in StorageRead trait
  storage: add `Key::last` method, impl KeySeg for all ints
  Switch to use storage::KeySeg and add LazySet
  add lazy map without hashing
  refactored lazy collections, replaced hasher, added iter
  fmt && clippy
  add fn get_elem_key_by_hash to LazyMap
  lazy hash map first commit
  add lazy set (WIP), make LazyVec.get public
  add lazy vector
  create lazy data structures for storage access
  rustdoc: resolve ambiguous link
  changelog: add #465
  fixup! Merge branch 'namada/tomas/sorted-prefix-iter' (#458)
  [ci skip] wasm checksums update
  ledger: use storage_api::Error in VpEnv and TxEnv instead of generic
  [ci skip] wasm checksums update
  changelog: add #458
  tests: extend prefix iter tests for reverse order
  add support for rev_iter_prefix in storage and VP and tx envs
  test/vm_host_env: check prefix iter order in tx and VP
  shared/storage/key: add support for int/uint keys that maintain order
  deps: replace hex with data-encoding
  update wasm checksums
  changelog: add #380
  changelog: add #384
  ...
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