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

shielded-pool(spend): Use a real address for dummy spends #3872

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

cronokirby
Copy link
Contributor

Closes #3869.

I cross checked with #1383 to make sure all relevant places were covered; turns out we just need to change the dummy spend method to take an FVK to have an address we own. The surrounding code already signs dummy spends, it's just that the clue key and pk are random, instead of originating from our key hierarchy, so the signature won't verify. Using a real address fixes that.

The bespoke detection logic we have for spends of 0 value relates to adding fake inclusion proofs, which we want to preserve.

@cratelyn cratelyn added the zellic-component-remediated Tag PRs that are remediating Zellic findings label Feb 23, 2024
@erwanor erwanor changed the title Use a real address for dummy spends shielded-pool(spend): Use a real address for dummy spends Feb 23, 2024
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of crates"><title>Index of crates</title><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-e883e87179a81222.css"><meta name="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="pcli" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0-nightly (3340d49d2 2023-12-12)" data-channel="nightly" data-search-js="search-cca444cbb68c36e9.js" data-settings-js="settings-fe03fdc259827cd2.js" ><script src="./static.files/storage-bc37acceda91d44a.js"></script><script defer src="./static.files/main-77dede896d6ac08e.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-5d8b3c7633ad77ba.css"></noscript><link rel="alternate icon" type="image/png" href="./static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="./static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="./static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.76.0-nightly</span></h2></div><div class="version">(3340d49d2 2023-12-12)</div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="./help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="./settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="./static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><h1>List of all crates</h1><ul class="all-items"><li><a href="ark_ff/index.html">ark_ff</a></li><li><a href="ark_serialize/index.html">ark_serialize</a></li><li><a href="cnidarium/index.html">cnidarium</a></li><li><a href="cnidarium_component/index.html">cnidarium_component</a></li><li><a href="decaf377/index.html">decaf377</a></li><li><a href="decaf377_fmd/index.html">decaf377_fmd</a></li><li><a href="decaf377_ka/index.html">decaf377_ka</a></li><li><a href="decaf377_rdsa/index.html">decaf377_rdsa</a></li><li><a href="ibc_types/index.html">ibc_types</a></li><li><a href="jmt/index.html">jmt</a></li><li><a href="measure/index.html">measure</a></li><li><a href="pcli/index.html">pcli</a></li><li><a href="pclientd/index.html">pclientd</a></li><li><a href="pd/index.html">pd</a></li><li><a href="penumbra_app/index.html">penumbra_app</a></li><li><a href="penumbra_asset/index.html">penumbra_asset</a></li><li><a href="penumbra_community_pool/index.html">penumbra_community_pool</a></li><li><a href="penumbra_custody/index.html">penumbra_custody</a></li><li><a href="penumbra_dex/index.html">penumbra_dex</a></li><li><a href="penumbra_distributions/index.html">penumbra_distributions</a></li><li><a href="penumbra_genesis/index.html">penumbra_genesis</a></li><li><a href="penumbra_governance/index.html">penumbra_governance</a></li><li><a href="penumbra_ibc/index.html">penumbra_ibc</a></li><li><a href="penumbra_keys/index.html">penumbra_keys</a></li><li><a href="penumbra_num/index.html">penumbra_num</a></li><li><a href="penumbra_proof_params/index.html">penumbra_proof_params</a></li><li><a href="penumbra_proof_setup/index.html">penumbra_proof_setup</a></li><li><a href="penumbra_proto/index.html">penumbra_proto</a></li><li><a href="penumbra_sct/index.html">penumbra_sct</a></li><li><a href="penumbra_shielded_pool/index.html">penumbra_shielded_pool</a></li><li><a href="penumbra_tct/index.html">penumbra_tct</a></li><li><a href="penumbra_transaction/index.html">penumbra_transaction</a></li><li><a href="penumbra_txhash/index.html">penumbra_txhash</a></li><li><a href="penumbra_view/index.html">penumbra_view</a></li><li><a href="penumbra_wallet/index.html">penumbra_wallet</a></li><li><a href="poseidon377/index.html">poseidon377</a></li><li><a href="poseidon_paramgen/index.html">poseidon_paramgen</a></li><li><a href="poseidon_permutation/index.html">poseidon_permutation</a></li><li><a href="tendermint/index.html">tendermint</a></li><li><a href="tendermint_config/index.html">tendermint_config</a></li><li><a href="tower_abci/index.html">tower_abci</a></li></ul></section></div></main></body></html>
Copy link
Member

Choose a reason for hiding this comment

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

Can we drop this from the PR?

@cronokirby cronokirby force-pushed the 3869-full-dummy-spend branch from d7be89e to 0d2880b Compare February 23, 2024 21:43
@cronokirby cronokirby merged commit 0346973 into main Feb 23, 2024
6 checks passed
@cronokirby cronokirby deleted the 3869-full-dummy-spend branch February 23, 2024 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
zellic-component-remediated Tag PRs that are remediating Zellic findings
Projects
None yet
3 participants