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

Core Script Builder Codegen Logic #14168

Merged
merged 18 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 109 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ members = [
"aptos-move/aptos-vm-profiling",
"aptos-move/aptos-vm-types",
"aptos-move/block-executor",
"aptos-move/dynamic-transaction-composer",
Copy link
Contributor

Choose a reason for hiding this comment

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

Not that important, but I think on this level transaction-composer would be good enough, 'dynamic' is more like an extra marketing attribute. Moving forward, we will just call it on technical level the 'transaction composer' anyway, three words too long.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll rename this folder after a stamp. Brian suggested that renaming will dismiss previous commments

"aptos-move/e2e-benchmark",
"aptos-move/e2e-move-tests",
"aptos-move/e2e-tests",
Expand Down Expand Up @@ -327,6 +328,7 @@ aptos-event-notifications = { path = "state-sync/inter-component/event-notificat
aptos-executable-store = { path = "storage/executable-store" }
aptos-executor = { path = "execution/executor" }
aptos-block-partitioner = { path = "execution/block-partitioner" }
aptos-dynamic-transaction-composer = { path = "aptos-move/dynamic-transaction-composer" }
aptos-enum-conversion-derive = { path = "crates/aptos-enum-conversion-derive" }
aptos-executor-service = { path = "execution/executor-service" }
aptos-executor-test-helpers = { path = "execution/executor-test-helpers" }
Expand Down
39 changes: 39 additions & 0 deletions aptos-move/dynamic-transaction-composer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[package]
name = "aptos-dynamic-transaction-composer"
description = "Generating Move Script from a batched Move calls"
version = "0.1.0"

# Workspace inherited keys
authors = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
publish = { workspace = true }
repository = { workspace = true }
rust-version = { workspace = true }

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
anyhow = { workspace = true }
bcs = { workspace = true }
getrandom = { workspace = true, features = ["js"] }
hex = { workspace = true }
move-binary-format = { workspace = true }
move-bytecode-verifier = { workspace = true }
move-core-types = { workspace = true }
reqwest = { version = "*", features = ["blocking"] }
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not workspace here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason why I'm avoiding workspace is this repo will be compiled into WASM and thus might have different dependencies and I don't want to pollute the main workspace because of that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I started to think how we deal with THAT. As a matter of fact, you have to pull in significant other parts of the code which already have workspace dependencies. We need a more general solution for this problem. I'm not sure whether there is something like 'dependency override' in cargo. Or perhaps for the WASM build, we need to generate the build config by our own script, that is generate source for a crate then compile it. For now I think this should be workspace too, it doesn't appear to solve the problem this way.

Copy link
Contributor

Choose a reason for hiding this comment

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

Still needs resolution. Not using workspace doesn't help here. Also "*" is not our practice, should be a concrete version.

serde = { workspace = true }
serde_bytes = { workspace = true }
serde_json = { workspace = true }
tsify-next = "0.5.4"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4.42"

[dev-dependencies]
aptos-types = { workspace = true }
e2e-move-tests = { path = "../e2e-move-tests" }

[package.metadata.cargo-machete]
ignored = ["serde_bytes", "wasm-bindgen-futures", "getrandom"]
Loading
Loading