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

pd testnet generate silently fails on malformed allocation csvs #2746

Closed
conorsch opened this issue Jun 27, 2023 · 0 comments · Fixed by #2755
Closed

pd testnet generate silently fails on malformed allocation csvs #2746

conorsch opened this issue Jun 27, 2023 · 0 comments · Fixed by #2755
Assignees

Comments

@conorsch
Copy link
Contributor

Describe the bug
If you pass an invalid CSV to pd test generate --allocations-file, there's a good chance pd will silently ignore the malformed data. It should definitely fail instead.

To Reproduce
Run pd testnet generate --allocations-file <file> with both of these, and inspect the contents of ~/.penumbra/testnet_data/node0/tendermint/config/genesis.json afterward generation.

bad malformed CSV file
"amount","denom","address"\n"100000","udelegation_penumbravalid1jzcc6vsm29am9ggs8z0d7s9jk9uf8tfrqg7hglc9ufs7r23nu5yqtw77ex","penumbrav2t1tntrwl92wmud955405mhduuvlxqksa00d2yqe3npjafvley64pal4sre3jcjhq5xjmrs56hk2fs8u648zcaarnz57rynqa0vtaxyd6rwev225lx4kku3lrjktrcacjyw5070nj"\n"100000","upenumbra","penumbrav2t1tntrwl92wmud955405mhduuvlxqksa00d2yqe3npjafvley64pal4sre3jcjhq5xjmrs56hk2fs8u648zcaarnz57rynqa0vtaxyd6rwev225lx4kku3lrjktrcacjyw5070nj"\n"100000","udelegation_penumbravalid1p2hfuch2p8rshyc90qa23gqk82s74tqcu3x2x3y5tfwpzth4vvrq2gv283","penumbrav2t1ctq4cm9fjewj790alfka634n2t32vh32vqnfufw2dpegw7c2a3lw9np2f4pcthl2w2ke4a32cdmmnurd95sjreu92vey3fwj9ccjz2hpudd9kz9xqlwqp39sly8knl0e2esqjw"\n"100000","upenumbra","penumbrav2t1ctq4cm9fjewj790alfka634n2t32vh32vqnfufw2dpegw7c2a3lw9np2f4pcthl2w2ke4a32cdmmnurd95sjreu92vey3fwj9ccjz2hpudd9kz9xqlwqp39sly8knl0e2esqjw"\n"100000","udelegation_penumbravalid182k8x46hg5vx3ez8ec58ze5yd6a3q4q3fkx45ddt5jahnzz0xyyqdtz7hc","penumbrav2t1ks2ee68kf96zs3p2af2pzcu7p36uep5gynwc38slvs8kpcyk0t0gdseww4aulntzaq9vurahmka99c4frpgehtteur29p5kt39a2qv0nd89etty36s55knlv7e98kl93p8farz"\n"100000","upenumbra","penumbrav2t1ks2ee68kf96zs3p2af2pzcu7p36uep5gynwc38slvs8kpcyk0t0gdseww4aulntzaq9vurahmka99c4frpgehtteur29p5kt39a2qv0nd89etty36s55knlv7e98kl93p8farz"\n"100000","udelegation_penumbravalid1t2hr2lj5n2jt3hftzjw3strjllnakc7jtw234d229x3zakhaqsqsg9yarw","penumbrav2t1wvjml4xqa70x3ypqa530npy8ygsftyjxc2wfgh4t7yftja7cfrlr7temqcerhnkd6g7qe75r7wg0ny9vvf4wcrd9rttvuhj9fy20yx630g26khmnxd2zvjnhm2t3wqu59e7nzk"\n"100000","upenumbra","penumbrav2t1wvjml4xqa70x3ypqa530npy8ygsftyjxc2wfgh4t7yftja7cfrlr7temqcerhnkd6g7qe75r7wg0ny9vvf4wcrd9rttvuhj9fy20yx630g26khmnxd2zvjnhm2t3wqu59e7nzk"\n
good, reformatted CSV file
"amount","denom","address"
"100000","udelegation_penumbravalid1jzcc6vsm29am9ggs8z0d7s9jk9uf8tfrqg7hglc9ufs7r23nu5yqtw77ex","penumbrav2t1tntrwl92wmud955405mhduuvlxqksa00d2yqe3npjafvley64pal4sre3jcjhq5xjmrs56hk2fs8u648zcaarnz57rynqa0vtaxyd6rwev225lx4kku3lrjktrcacjyw5070nj"
"100000","upenumbra","penumbrav2t1tntrwl92wmud955405mhduuvlxqksa00d2yqe3npjafvley64pal4sre3jcjhq5xjmrs56hk2fs8u648zcaarnz57rynqa0vtaxyd6rwev225lx4kku3lrjktrcacjyw5070nj"
"100000","udelegation_penumbravalid1p2hfuch2p8rshyc90qa23gqk82s74tqcu3x2x3y5tfwpzth4vvrq2gv283","penumbrav2t1ctq4cm9fjewj790alfka634n2t32vh32vqnfufw2dpegw7c2a3lw9np2f4pcthl2w2ke4a32cdmmnurd95sjreu92vey3fwj9ccjz2hpudd9kz9xqlwqp39sly8knl0e2esqjw"
"100000","upenumbra","penumbrav2t1ctq4cm9fjewj790alfka634n2t32vh32vqnfufw2dpegw7c2a3lw9np2f4pcthl2w2ke4a32cdmmnurd95sjreu92vey3fwj9ccjz2hpudd9kz9xqlwqp39sly8knl0e2esqjw"
"100000","udelegation_penumbravalid182k8x46hg5vx3ez8ec58ze5yd6a3q4q3fkx45ddt5jahnzz0xyyqdtz7hc","penumbrav2t1ks2ee68kf96zs3p2af2pzcu7p36uep5gynwc38slvs8kpcyk0t0gdseww4aulntzaq9vurahmka99c4frpgehtteur29p5kt39a2qv0nd89etty36s55knlv7e98kl93p8farz"
"100000","upenumbra","penumbrav2t1ks2ee68kf96zs3p2af2pzcu7p36uep5gynwc38slvs8kpcyk0t0gdseww4aulntzaq9vurahmka99c4frpgehtteur29p5kt39a2qv0nd89etty36s55knlv7e98kl93p8farz"
"100000","udelegation_penumbravalid1t2hr2lj5n2jt3hftzjw3strjllnakc7jtw234d229x3zakhaqsqsg9yarw","penumbrav2t1wvjml4xqa70x3ypqa530npy8ygsftyjxc2wfgh4t7yftja7cfrlr7temqcerhnkd6g7qe75r7wg0ny9vvf4wcrd9rttvuhj9fy20yx630g26khmnxd2zvjnhm2t3wqu59e7nzk"
"100000","upenumbra","penumbrav2t1wvjml4xqa70x3ypqa530npy8ygsftyjxc2wfgh4t7yftja7cfrlr7temqcerhnkd6g7qe75r7wg0ny9vvf4wcrd9rttvuhj9fy20yx630g26khmnxd2zvjnhm2t3wqu59e7nzk"

Expected behavior
If pd can't understand the input file, it should complain loudly and fall down.

Additional context
This bug was uncovered during interchaintest pairing, tracked in strangelove-ventures/interchaintest#644

@conorsch conorsch self-assigned this Jun 27, 2023
conorsch added a commit that referenced this issue Jun 28, 2023
Ensures that at least some allocations were parsed from the csv input
file, otherwise errors. Includes tests with hardcoded csv data.

Closes #2746.
conorsch added a commit that referenced this issue Jun 29, 2023
Ensures that at least some allocations were parsed from the csv input
file, otherwise errors. Includes tests with hardcoded csv data.

Closes #2746.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Testnet 56: Callisto
Development

Successfully merging a pull request may close this issue.

1 participant