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

[move-lang] Remove ability to assign values to named addresses in source code #8880

Merged
merged 1 commit into from
Aug 9, 2021

Conversation

tzakian
Copy link
Contributor

@tzakian tzakian commented Aug 5, 2021

This PR removes the ability to declare named address values in Move source code. Instead, all named address values need to be passed to the compiler -- today via the command line, but in the future this will be handled by the package system.

Nothing too interesting is happening in this PR, just a lot of plumbing. Probably the most interesting is that we now include the named address values in the metadata file that we have temporarily in the CLI.

Testing

Updated tests to make them all pass with the new syntax.

@tzakian tzakian changed the title [move-lang] Remove ability to declare assign values to named addresses [move-lang] Remove ability to assign values to named addresses in source code Aug 5, 2021
@tzakian tzakian force-pushed the named_addresses_update branch from 1a9b024 to 55769e9 Compare August 6, 2021 00:02
Copy link
Contributor

@tnowacki tnowacki left a comment

Choose a reason for hiding this comment

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

Mostly good to go! Just maybe an additional test showing the old address syntax is invalid. And the few other small comments around.

language/move-stdlib/src/lib.rs Outdated Show resolved Hide resolved
language/move-lang/src/shared/mod.rs Show resolved Hide resolved
language/move-lang/src/shared/mod.rs Show resolved Hide resolved
language/move-lang/src/shared/mod.rs Show resolved Hide resolved
language/move-lang/src/expansion/translate.rs Show resolved Hide resolved
language/move-lang/tests/move_check_testsuite.rs Outdated Show resolved Hide resolved
language/move-lang/tests/move_check_testsuite.rs Outdated Show resolved Hide resolved
@tzakian tzakian force-pushed the named_addresses_update branch 4 times, most recently from 557b558 to 10e9181 Compare August 6, 2021 21:22
tnowacki
tnowacki previously approved these changes Aug 6, 2021
Copy link
Contributor

@tnowacki tnowacki left a comment

Choose a reason for hiding this comment

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

We can make improvements as we go, I'd like to see those move-prover arguments as lazy-static or something, so they aren't hard coded.
Thanks for doing this!

If you don't mind, can you also update the changelog?

Comment on lines +32 to +48
"-a=Std=0x1",
"-a=DiemFramework=0x1",
"-a=DiemRoot=0xA550C18",
"-a=CurrencyInfo=0xA550C18",
"-a=TreasuryCompliance=0xB1E55ED",
"-a=VMReserved=0x0",
];
const REGULAR_TEST_FLAGS: &[&str] = &[
"--dependency=../move-stdlib/modules",
"--dependency=../diem-framework/modules",
"-a=Std=0x1",
"-a=DiemFramework=0x1",
"-a=DiemRoot=0xA550C18",
"-a=CurrencyInfo=0xA550C18",
"-a=TreasuryCompliance=0xB1E55ED",
"-a=VMReserved=0x0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there someway to populate these with the stuff in diem-framework and mvoe-stdlib, just worried about changes overtime

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Once we have packages we can do this without introducing a Cargo dep on the diem side of things. However, if I try to use the stuff from the diem-framework that will then introduce a diem dependency. So at least for now, I think we should probably keep this like this. I'll add a TODO and tag myself in it to change this once packages are in.

tnowacki
tnowacki previously approved these changes Aug 9, 2021
@tnowacki
Copy link
Contributor

tnowacki commented Aug 9, 2021

/land

@github-actions
Copy link

github-actions bot commented Aug 9, 2021

Cluster Test Result

Test runner setup time spent 248 secs
Compatibility test results for land_abdc8f0d ==> land_093bc9ed (PR)
1. All instances running land_abdc8f0d, generating some traffic on network
2. First full node land_abdc8f0d ==> land_093bc9ed, to validate new full node to old validator node traffic
3. First Validator node land_abdc8f0d ==> land_093bc9ed, to validate storage compatibility
4. First batch validators (14) land_abdc8f0d ==> land_093bc9ed, to test consensus and traffic between old full nodes and new validator node
5. First batch full nodes (14) land_abdc8f0d ==> land_093bc9ed
6. Second batch validators (15) land_abdc8f0d ==> land_093bc9ed, to upgrade rest of the validators
7. Second batch of full nodes (15) land_abdc8f0d ==> land_093bc9ed, to finish the network upgrade, time spent 676 secs
all up : 1063 TPS, 4275 ms latency, 4850 ms p99 latency, no expired txns, time spent 250 secs
Logs: http://kibana.ct-1-k8s-testnet.aws.hlw3truzy4ls.com/app/kibana#/discover?_g=(time:(from:'2021-08-09T20:28:22Z',to:'2021-08-09T20:53:09Z'))
Dashboard: http://grafana.ct-1-k8s-testnet.aws.hlw3truzy4ls.com/d/performance/performance?from=1628540902000&to=1628542389000
Validator 1 logs: http://kibana.ct-1-k8s-testnet.aws.hlw3truzy4ls.com/app/kibana#/discover?_g=(time:(from:'2021-08-09T20:28:22Z',to:'2021-08-09T20:53:09Z'))&_a=(columns:!(log),query:(language:kuery,query:'kubernetes.pod_name:"val-1"'),sort:!(!('@timestamp',desc)))

Repro cmd:

./scripts/cti --tag land_abdc8f0d --cluster-test-tag land_093bc9ed -E BATCH_SIZE=15 -E UPDATE_TO_TAG=land_093bc9ed --report report.json --suite land_blocking_compat

🎉 Land-blocking cluster test passed! 👌

@bors-libra bors-libra force-pushed the named_addresses_update branch from 9dab98d to 093bc9e Compare August 9, 2021 20:53
@bors-libra bors-libra closed this in 093bc9e Aug 9, 2021
@bors-libra bors-libra merged commit 093bc9e into diem:main Aug 9, 2021
@bors-libra bors-libra temporarily deployed to Sccache August 9, 2021 20:53 Inactive
@bors-libra bors-libra temporarily deployed to Docker August 9, 2021 20:54 Inactive
@bors-libra bors-libra temporarily deployed to Docker August 9, 2021 20:54 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants