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

feat(bundle-cost): reduce by 100x as in mainnet 61 #75

Merged
merged 6 commits into from
Mar 6, 2024
Merged

Conversation

dckc
Copy link
Member

@dckc dckc commented Jan 22, 2024

fixes #28

@dckc dckc marked this pull request as ready for review January 22, 2024 21:54
@dckc dckc requested review from turadg and mhofman January 22, 2024 21:55
package.json Outdated Show resolved Hide resolved
Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

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

I'll review again when it's green.

Feel free to force push (e.g. to remove afb5852 )

packages/synthetic-chain/src/cli/dockerfileGen.ts Outdated Show resolved Hide resolved
@@ -0,0 +1,13 @@

lower-bundle-cost.json:
jq '.tx.body.messages[0].content | .changes[0].value |= fromjson' tx-61.json >$@
Copy link
Member

Choose a reason for hiding this comment

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

On first read I thought this was able to build dynamically from the ARCHIVE_NODE.

Please comment how this Makefile is intended to be used.

Incidentally, I suggest that lower-bundle-cost.json be produced during the build since it's a fast local operation to create from tx-61.json

Copy link
Member Author

Choose a reason for hiding this comment

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

Please comment how this Makefile is intended to be used.

I added some comments. I don't think I quite covered this though. Feel free to add more or discuss it or something.

I suggest that lower-bundle-cost.json be produced during the build ...

I don't have a good sense of how the work should be partitioned in EVAL vs other stuff, so I'll leave this to you.

clean:
rm -f lower-bundle-cost.json

realclean: clean
Copy link
Member

Choose a reason for hiding this comment

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

why two cleans? please comment

for naming, it's odd to imply that the other isn't real. consider clean-all

but I'd prefer to have lower-bundle-cost.json be produced in the build, in which case there'd be only one target and one clean here.

Copy link
Member Author

Choose a reason for hiding this comment

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

realclean vs clean is a gnu convention

The difference in this case is: re-fetching from the network is expensive / wasteful while I was rapidly iterating on the jq step.

Will comment...

proposals/61:lo-bundle-cost/eval.sh Outdated Show resolved Hide resolved
lower-bundle-cost.json:
jq '.tx.body.messages[0].content | .changes[0].value |= fromjson' tx-61.json >$@

hash=6EA7B46DFDD0973338BB50781B33D651FE0E8EE8ABF4D7BCB1BF8235334AAFE0
Copy link
Member

Choose a reason for hiding this comment

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

very cool to pull from an archive node.

can we make this easier to work with? e.g. a default ARCHIVE_NODE value?

how does determine the correct hash value?

Copy link
Member Author

Choose a reason for hiding this comment

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

I added the relevant query commands to go from the proposal number 61 to the tx hash. Overkill?

@turadg turadg self-assigned this Jan 23, 2024
@dckc dckc changed the title feat(bundle-cost): lower cost by 100x as in mainnet 61 feat(bundle-cost): reduce by 100x as in mainnet 61 Jan 23, 2024
Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

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

LGTM.

I had wanted to simplify this with #84 but that needn't delay this Mainnet fidelity

@dckc dckc merged commit 989f22d into main Mar 6, 2024
2 checks passed
@dckc dckc deleted the dc-bundle-cost branch March 6, 2024 21:55
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.

proposal 61 lower bundle cost
2 participants