Skip to content

Fix graphql legacy types#796

Merged
lmoe merged 14 commits intoql-devfrom
fix_graphql_legacy_types
Mar 6, 2026
Merged

Fix graphql legacy types#796
lmoe merged 14 commits intoql-devfrom
fix_graphql_legacy_types

Conversation

@lmoe
Copy link
Copy Markdown
Collaborator

@lmoe lmoe commented Feb 27, 2026

Description of change

This PR removed the legacy JSON-RPC types, conversion and mapper functions.

It also adds an experimental fake L1 simulator, that can be plugged into all tests.

@lmoe lmoe force-pushed the fix_graphql_legacy_types branch from d8c9171 to 4347b17 Compare February 27, 2026 14:46
@lmoe lmoe force-pushed the fix_graphql_legacy_types branch from 33e9bc4 to 6e5c5fa Compare February 27, 2026 15:42
}

// TestSimulator starts the in-memory L1 simulator.
func TestSimulator() func() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am curious the reason to return function here

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The initial idea was for clean up, so it behaves like the other functions. We don't need cleanup but at least should remain the signature.

// (per-byte for new/mutated objects) - storage_rebate. Reproducing this
// requires executing Move bytecode, which the simulator doesn't do.
// TODO: Marker for adding Gas cost calculation, but this technically requires actual execution of contracts.
gasCost := uint64(0)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we set a small const value as testing gas cost?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That would be the best case scenario. I spent a day to improve upon this. Without a proper Move processing calculation + Gas calculation for handling the raw PTB any change in here either breaks some tests or other kinds of test.

This can be improved probably, but thats a big can of worms.

@lmoe lmoe marked this pull request as ready for review March 4, 2026 14:17
Copy link
Copy Markdown
Contributor

@dessaya dessaya left a comment

Choose a reason for hiding this comment

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

🎉

Too big to do a 100% detailed review. I focused on the test_simulator code and it looks just fine 👏

@lmoe lmoe merged commit 1324bcb into ql-dev Mar 6, 2026
4 of 7 checks passed
@lmoe lmoe deleted the fix_graphql_legacy_types branch March 6, 2026 14:03
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.

4 participants