Skip to content

[cli] Disallow minting/transferring LBR in the CLI #6445

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

Merged
merged 1 commit into from
Oct 8, 2020

Conversation

tzakian
Copy link
Contributor

@tzakian tzakian commented Oct 7, 2020

This PR disallows minting of LBR in the CLI to make the user experience better. E.g.,

libra% a c
>> Creating/retrieving next local account from wallet
Created/retrieved local account #0 address 016a90624cde5806e1b3cfaac2796ba9
libra% a mb 0 222 LBR
[ERROR] Error transferring coins from faucet: LBR not allowed to be minted or transferred
libra% a mb 0 222 Coin1
>> Creating recipient account before minting from faucet
waiting for 0000000000000000000000000B1E55ED with sequence number 1
.................................................................................
transaction executed!
>> Sending coins from faucet
waiting for 000000000000000000000000000000DD with sequence number 1
.............................................................................................
transaction executed!
Finished sending coins from faucet!
libra%

Closes #6441

@tzakian tzakian requested a review from xli October 7, 2020 23:11
pub fn convert_to_on_chain_representation(
&mut self,
input: &str,
currency: &str,
) -> Result<u64> {
ensure!(!input.is_empty(), "Empty input not allowed for libra unit");
ensure!(
currency != LBR_NAME,
"LBR not allowed to be minted or transferred"
Copy link

Choose a reason for hiding this comment

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

may add: use {COIN1_NAME} instead?

@tzakian
Copy link
Contributor Author

tzakian commented Oct 7, 2020

/land

bors-libra pushed a commit that referenced this pull request Oct 8, 2020
@bors-libra
Copy link
Contributor

💔 Test Failed - commit-workflow

@github-actions
Copy link

github-actions bot commented Oct 8, 2020

Cluster Test Result

Compatibility test results for land_91b3d933 ==> land_bc9b033b (PR)
1. All instances running land_91b3d933, generating some traffic on network
2. First validator land_91b3d933 ==> land_bc9b033b, to validate storage
3. First batch validators (14) land_91b3d933 ==> land_bc9b033b, to test consensus
4. Second batch validators (15) land_91b3d933 ==> land_bc9b033b, to upgrade rest of the validators
5. All full nodes (30) land_91b3d933 ==> land_bc9b033b, to finish the network upgrade
all up : 1001 TPS, 4516 ms latency, 5700 ms p99 latency, no expired txns
Logs: http://kibana.ct-0-k8s-testnet.aws.hlw3truzy4ls.com/app/kibana#/discover?_g=(time:(from:'2020-10-08T03:17:41Z',to:'2020-10-08T03:48:39Z'))
Dashboard: http://grafana.ct-0-k8s-testnet.aws.hlw3truzy4ls.com/d/2XqUIhnWz/performance?from=1602127061000&to=1602128919000
Validator 1 logs: http://kibana.ct-0-k8s-testnet.aws.hlw3truzy4ls.com/app/kibana#/discover?_g=(time:(from:'2020-10-08T03:17:41Z',to:'2020-10-08T03:48:39Z'))&_a=(columns:!(log),query:(language:kuery,query:'kubernetes.pod_name:"val-1"'),sort:!(!('@timestamp',desc)))

Repro cmd:

./scripts/cti --tag land_91b3d933 --cluster-test-tag land_bc9b033b -E RUST_LOG=debug -E BATCH_SIZE=15 -E UPDATE_TO_TAG=land_bc9b033b --report report.json --suite land_blocking_compat

🎉 Land-blocking cluster test passed! 👌

@tzakian
Copy link
Contributor Author

tzakian commented Oct 8, 2020

/land

@github-actions
Copy link

github-actions bot commented Oct 8, 2020

Cluster Test Result

Compatibility test results for land_968318f0 ==> land_62c65304 (PR)
1. All instances running land_968318f0, generating some traffic on network
2. First validator land_968318f0 ==> land_62c65304, to validate storage
3. First batch validators (14) land_968318f0 ==> land_62c65304, to test consensus
4. Second batch validators (15) land_968318f0 ==> land_62c65304, to upgrade rest of the validators
5. All full nodes (30) land_968318f0 ==> land_62c65304, to finish the network upgrade
all up : 1003 TPS, 4519 ms latency, 5700 ms p99 latency, no expired txns
Logs: http://kibana.ct-2-k8s-testnet.aws.hlw3truzy4ls.com/app/kibana#/discover?_g=(time:(from:'2020-10-08T14:29:47Z',to:'2020-10-08T14:50:53Z'))
Dashboard: http://grafana.ct-2-k8s-testnet.aws.hlw3truzy4ls.com/d/2XqUIhnWz/performance?from=1602167387000&to=1602168653000
Validator 1 logs: http://kibana.ct-2-k8s-testnet.aws.hlw3truzy4ls.com/app/kibana#/discover?_g=(time:(from:'2020-10-08T14:29:47Z',to:'2020-10-08T14:50:53Z'))&_a=(columns:!(log),query:(language:kuery,query:'kubernetes.pod_name:"val-1"'),sort:!(!('@timestamp',desc)))

Repro cmd:

./scripts/cti --tag land_968318f0 --cluster-test-tag land_62c65304 -E RUST_LOG=debug -E BATCH_SIZE=15 -E UPDATE_TO_TAG=land_62c65304 --report report.json --suite land_blocking_compat

🎉 Land-blocking cluster test passed! 👌

@bors-libra bors-libra closed this in 62c6530 Oct 8, 2020
@bors-libra bors-libra merged commit 62c6530 into diem:master Oct 8, 2020
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.

[Bug] local swarm cli can't mint coins
3 participants