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

lazy vec and map #503

Merged
merged 83 commits into from
Oct 13, 2022
Merged

lazy vec and map #503

merged 83 commits into from
Oct 13, 2022

Conversation

tzemanovic
Copy link
Member

@tzemanovic tzemanovic commented Sep 22, 2022

Based on #458 and #465 (merged here before the actual changes on top of #442). Adds LazyVec and LazyMap from #168 needed for PoS.

This PR is split out from #332 where we'll finish adding LazySet, LazyHashSet and LazyHashMap.

tzemanovic and others added 30 commits August 17, 2022 18:39
@tzemanovic tzemanovic force-pushed the tomas+brent/lazy-vec-and-map branch from 6c8f2e2 to a5d4a67 Compare September 22, 2022 16:18
@tzemanovic
Copy link
Member Author

pls update wasm

@tzemanovic tzemanovic marked this pull request as ready for review September 22, 2022 16:54
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)
This was referenced Sep 23, 2022
@juped juped merged commit 85a3ff3 into main Oct 13, 2022
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
  ...
@juped juped deleted the tomas+brent/lazy-vec-and-map branch October 13, 2022 06:51
james-chf added a commit that referenced this pull request Oct 27, 2022
* base/v0.8.1: (429 commits)
  Namada 0.8.1
  changelog: add #510
  [feat]: Make process proposal stateless
  test/e2e: fix node_connectivity test
  test/e2e: update expected string for non-validator node
  [fix]: Removed unnecessary patches in wasm
  [feat]: Patched tendermint-rs and ibc-rs to compatible versions
  app: set "namada" set default bin for `cargo run`
  fix: rename anoma to namada, remove author print
  CI: add workaround for release build missing git tag
  Namada 0.8.0
  changelog: add #547
  wasm: update checksums
  [chore]: Lints and formatting
  [fix]: Fixed proof specs for non-existence proofs
  [fix]: Update the main tree when deleting a key
  [fix]: Fixed last ibc unit test
  [fix]: Fixed some tests.
  [feat]: Refactored the merkle tree into a more maintainable multi-store
  build: pin abciplus library revisions
  wasm: update checksums.json
  ci: standardize on one tendermint hash
  formatting changes
  change `L_{NAM}` -> `L_{PoS}` for clarity and consistency
  change inflation `I` to have units of tokens per epoch
  fix term ordering in error calculation
  Remove other `:=` in favor of `=`
  distinguish new and old inflation rates with a prime
  fix md rendering
  correct the shielded pool error calculation
  change storing of error to storing of token ratios (same procedure)
  fix: `I` is percent per annum
  distinguish between `K` in storage and `K` as intermediate value in inflation calculation
  Use `I` for inflation rates, as `R` reserved for locked ratios
  specify some default values, other small edits
  release: add scripts/release.sh
  release: add release.toml to wasm workspace and wasm_for_tests
  release: don't tag from cargo release
  release: update release.toml for cargo-release 0.21.4
  wasm: remove tx_from_intent build
  wasm: repair wasm checksums
  Add changelog
  Add changelog
  Fix TransactionGasExceededed typo
  changelog: add #594
  shared/storage: fix the height recorded for a new epoch
  Apply suggestions from code review
  changelog: add #590
  wasm/tx_bond: fix delegation detection to compare source and validator
  wasm/tx_bond: add test seed which makes it fail
  Adds missing excape chars
  fix: governance docs latex
  ci: upload docs after build
  move unreleased changelogs accidentally added to v0.7.1
  Update .gitignore
  Add install-release target
  Update shared/src/ledger/ibc/handler.rs
  ci: added tendermint ad825dcadbd4b98c3f91ce5a711e4fb36a69c377
  [fix]: Fixed some array concatenations
  Update shared/src/ledger/ibc/handler.rs
  ci: fix build-and-test.yml
  ci: update wasm version
  ci: added gh action specific to eth-bridge-integration branch
  [feat]: Moved to ics23 v0.7.0. This came with some ibc updates as well
  Update README.md
  minor edits, ensuring consistency of terms
  updated the front page of docs
  added the right favicon
  ci: added slack secret
  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
  ...

# Conflicts:
#	.changelog/v0.8.0/bug-fixes/1249-fix-shell-last-epoch.md
#	.changelog/v0.8.0/bug-fixes/384-fix-new-epoch-start-height.md
#	.changelog/v0.8.0/improvements/1231-refactor-ledger-run-with-cleanup.md
#	.github/workflows/build-tendermint.yml
#	Cargo.lock
#	Makefile
#	apps/Cargo.toml
#	apps/src/lib/cli.rs
#	apps/src/lib/client/gossip.rs
#	apps/src/lib/client/mod.rs
#	apps/src/lib/client/rpc.rs
#	apps/src/lib/client/tendermint_rpc_types.rs
#	apps/src/lib/client/tendermint_websocket_client.rs
#	apps/src/lib/client/tx.rs
#	apps/src/lib/client/utils.rs
#	apps/src/lib/config/genesis.rs
#	apps/src/lib/config/mod.rs
#	apps/src/lib/node/ledger/mod.rs
#	apps/src/lib/node/ledger/protocol/mod.rs
#	apps/src/lib/node/ledger/rpc.rs
#	apps/src/lib/node/ledger/shell/finalize_block.rs
#	apps/src/lib/node/ledger/shell/init_chain.rs
#	apps/src/lib/node/ledger/shell/mod.rs
#	apps/src/lib/node/ledger/shell/prepare_proposal.rs
#	apps/src/lib/node/ledger/shell/process_proposal.rs
#	apps/src/lib/node/ledger/shell/queries.rs
#	apps/src/lib/node/ledger/shims/abcipp_shim.rs
#	apps/src/lib/node/ledger/shims/abcipp_shim_types.rs
#	apps/src/lib/node/ledger/storage/mod.rs
#	apps/src/lib/node/ledger/tendermint_node.rs
#	apps/src/lib/node/matchmaker.rs
#	proof_of_stake/src/lib.rs
#	proof_of_stake/src/types.rs
#	shared/Cargo.toml
#	shared/src/ledger/governance/vp.rs
#	shared/src/ledger/ibc/handler.rs
#	shared/src/ledger/ibc/vp/channel.rs
#	shared/src/ledger/ibc/vp/client.rs
#	shared/src/ledger/ibc/vp/connection.rs
#	shared/src/ledger/ibc/vp/mod.rs
#	shared/src/ledger/ibc/vp/port.rs
#	shared/src/ledger/ibc/vp/token.rs
#	shared/src/ledger/native_vp.rs
#	shared/src/ledger/pos/mod.rs
#	shared/src/ledger/pos/vp.rs
#	shared/src/ledger/storage/merkle_tree.rs
#	shared/src/ledger/storage/mod.rs
#	shared/src/ledger/storage/traits.rs
#	shared/src/ledger/treasury/mod.rs
#	shared/src/ledger/treasury/parameters.rs
#	shared/src/proto/mod.rs
#	shared/src/proto/types.rs
#	shared/src/types/hash.rs
#	shared/src/types/intent.rs
#	shared/src/types/key/common.rs
#	shared/src/types/key/mod.rs
#	shared/src/types/key/secp256k1.rs
#	shared/src/types/storage.rs
#	shared/src/vm/wasm/host_env.rs
#	tests/Cargo.toml
#	tests/src/e2e/ledger_tests.rs
#	tests/src/native_vp/mod.rs
#	tests/src/native_vp/pos.rs
#	tests/src/vm_host_env/ibc.rs
#	tests/src/vm_host_env/mod.rs
#	vm_env/Cargo.toml
#	vm_env/src/governance.rs
#	vm_env/src/ibc.rs
#	vm_env/src/lib.rs
#	vm_env/src/proof_of_stake.rs
#	vm_env/src/token.rs
#	wasm/Cargo.lock
#	wasm/checksums.json
#	wasm/tx_template/Cargo.toml
#	wasm/vp_template/Cargo.lock
#	wasm/vp_template/Cargo.toml
#	wasm/wasm_source/Cargo.lock
#	wasm/wasm_source/Cargo.toml
#	wasm/wasm_source/Makefile
#	wasm/wasm_source/src/tx_from_intent.rs
#	wasm/wasm_source/src/tx_transfer.rs
#	wasm/wasm_source/src/vp_testnet_faucet.rs
#	wasm/wasm_source/src/vp_user.rs
#	wasm_for_tests/tx_mint_tokens.wasm
#	wasm_for_tests/wasm_source/Cargo.lock
#	wasm_for_tests/wasm_source/Cargo.toml
juped added a commit that referenced this pull request Oct 27, 2022
Namada 0.8.1

* tag 'v0.8.1': (197 commits)
  Namada 0.8.1
  changelog: add #510
  [feat]: Make process proposal stateless
  test/e2e: fix node_connectivity test
  test/e2e: update expected string for non-validator node
  [fix]: Removed unnecessary patches in wasm
  [feat]: Patched tendermint-rs and ibc-rs to compatible versions
  app: set "namada" set default bin for `cargo run`
  fix: rename anoma to namada, remove author print
  CI: add workaround for release build missing git tag
  Namada 0.8.0
  changelog: add #547
  wasm: update checksums
  [chore]: Lints and formatting
  [fix]: Fixed proof specs for non-existence proofs
  [fix]: Update the main tree when deleting a key
  [fix]: Fixed last ibc unit test
  [fix]: Fixed some tests.
  [feat]: Refactored the merkle tree into a more maintainable multi-store
  build: pin abciplus library revisions
  wasm: update checksums.json
  ci: standardize on one tendermint hash
  formatting changes
  change `L_{NAM}` -> `L_{PoS}` for clarity and consistency
  change inflation `I` to have units of tokens per epoch
  fix term ordering in error calculation
  Remove other `:=` in favor of `=`
  distinguish new and old inflation rates with a prime
  fix md rendering
  correct the shielded pool error calculation
  change storing of error to storing of token ratios (same procedure)
  fix: `I` is percent per annum
  distinguish between `K` in storage and `K` as intermediate value in inflation calculation
  Use `I` for inflation rates, as `R` reserved for locked ratios
  specify some default values, other small edits
  release: add scripts/release.sh
  release: add release.toml to wasm workspace and wasm_for_tests
  release: don't tag from cargo release
  release: update release.toml for cargo-release 0.21.4
  wasm: remove tx_from_intent build
  wasm: repair wasm checksums
  Add changelog
  Add changelog
  Fix TransactionGasExceededed typo
  changelog: add #594
  shared/storage: fix the height recorded for a new epoch
  Apply suggestions from code review
  changelog: add #590
  wasm/tx_bond: fix delegation detection to compare source and validator
  wasm/tx_bond: add test seed which makes it fail
  Adds missing excape chars
  fix: governance docs latex
  ci: upload docs after build
  move unreleased changelogs accidentally added to v0.7.1
  Update .gitignore
  Add install-release target
  Update shared/src/ledger/ibc/handler.rs
  ci: added tendermint ad825dcadbd4b98c3f91ce5a711e4fb36a69c377
  [fix]: Fixed some array concatenations
  Update shared/src/ledger/ibc/handler.rs
  ci: fix build-and-test.yml
  ci: update wasm version
  ci: added gh action specific to eth-bridge-integration branch
  [feat]: Moved to ics23 v0.7.0. This came with some ibc updates as well
  Update README.md
  minor edits, ensuring consistency of terms
  updated the front page of docs
  added the right favicon
  ci: added slack secret
  changelog: add #452
  feat: rocksdb use jemalloc
  feat: update rocksdb version
  Enable mdbook-admonish for the specs mdbook
  [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
  ...
phy-chain pushed a commit to phy-chain/namada that referenced this pull request Mar 1, 2024
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.

3 participants