Skip to content

Conversation

@WillPapper
Copy link
Contributor

daniilrrr and others added 29 commits August 15, 2024 07:46
* init scaffold

* logs

* ports

* readme
* Refactor server and add reverse proxy

* Update code to work with test RPC and add method parsing

* Add config struct for initialization

* Rename functions

* Drop -proxy from package/module names

* Add tests

* Address PR comments
* added golangci  based on AKM with updates, also pre-commit checks
* - added step to run `make test` on PR
- updated golangci Github Action

* - added step to run `make test` on PR
- updated golangci Github Action
Ethereum JSON-RPC only uses POST requests, so no non-POST request should be proxied

This fixes:
{"level":"warn","time":"2024-09-04T12:34:01-07:00","message":"Error decoding JSON: EOF"}
{"level":"debug","time":"2024-09-04T12:34:01-07:00","message":"Method: "}
{"level":"warn","time":"2024-09-04T12:34:04-07:00","message":"Error decoding JSON: EOF"}
{"level":"debug","time":"2024-09-04T12:34:04-07:00","message":"Method: "}
{"level":"warn","time":"2024-09-04T12:34:04-07:00","message":"Error decoding JSON: EOF"}
{"level":"debug","time":"2024-09-04T12:34:04-07:00","message":"Method: "}
* test technically passes

* rebased, test still runs

* cleanup

* cleanup

* simple "int" test of RPC calls that OP-node makes to op-translator server

* clean up

* pr comments
* feat: add air config and gitignore

* add rpc clients

* fix linter

* update package name

* update test

* add mocks folder

* add unit tets for rpc_client

* add unit tests

* add comments

* add comments

* add nolint

* update file name typo

* update based on review

* rm comment
…#7)

* Add functions for encoding batches into channels into frames

* Add comments and constants

* remove append

* Fix lint errors

* Import type from OP
* mimics OP stack approach to decode + parse a specific event from receipts
* feat: proxy eth_getBlockByNumber & eth_getBlockByHash methods to call the settlement client

* mocks & tests

* update TestCloseConnection

* update log

* add utils file

* update tests

* remove complexity, use interface

* add TODO

* style comments
* adding CLI flag and `.env` support
- refactored FrameSize to be in config
- proper interface and true mocks for Config
- Config struct has getters and private fields
…ing to a block (#15)

* Adding function for converting frames to spoofed txn and adding to a block

* Move types into new dir and implement some helper functions

* Rebase and add error
- pretty logger works. Response `body` formatted nicely
- logger middleware on requests
- zerolog config roughly matching AKM
- loglevel env flag
- simple ToFrames test
* Connect up functionality to append batcher transaction to settlement block

* Rebase, fix tests, and fix lint errors

* Adding nil response whenever all required blocks aren't available

* Update types and fix return for empty settlement block

* Refactor code to abstract away getting the data for a batch from the translator

* Rename var to be more descriptive and add logic for getting batch info w/ assumptions

* More refactors and updates from PR comments

* Clean up from PR comments

* Make go happy
* Refactor config test

* Update naming
* fix: use transactionDetailFlag on appendTransaction

* add unit test

* lint
* Adding batcher and batch inbox to config and translator

* Add debug logs

* Add zero hash

* More debug logs

* Add hardcoded signature values from batcher address

* Add yParity

* Adding TX type

* Add chain ID

* Add priority gas fields

* Adding translation of get receipts

* Fill out some fields in receipt

* Switch to block receipts

* Adding index to fake reciept

* Add correct number and hash

* Add gas used

* Try not adding spoofed tx on block header get

* Remove flag check

* add some info logs

* Add some more logs

* Adding actual txn signing

* Fixing chain id

* Change hash

* Try remove first byte

* Gross tests, but I think this should fix encoding

* Actually fix error

* Cleanup code and add back in tests

* Fix lint

* Adding ticket numbers and removing unused code

---------

Co-authored-by: Isaac <isaac@syndicate.io>
* fix: use transactionDetailFlag on appendTransaction

* add unit test

* lint

* do not translate if falg is false

* update tests
…mber (#19)

* test: implement integration tests for eth_GetBlockByHash and eth_GetBlockByNumber

* add further test

* add mocks

* simplify mocks

* add stubs

* fix int tests

* clean stubs & logs
* feat: move signer config

* update tests

* update NewBatcherTx to use config chain id

* use positive number for chain id

* update naming

* update naming

* remove log

* typo

* move chain id to signer

* update struct

* Update config.go

Co-authored-by: Daniil R <daniil@syndicate.io>

* update config and remove line

* remove chain id from struct

* add config tests and mock

* check chain id

---------

Co-authored-by: Daniil R <daniil@syndicate.io>
* refactor: simplify rpc usage

* add comments

* Update mocks/rpc_client_mock.go

Co-authored-by: Eric Velazquez <ericvelmar95@gmail.com>

* Update mocks/rpc_client_mock.go

Co-authored-by: Eric Velazquez <ericvelmar95@gmail.com>

* Update mocks/rpc_client_mock.go

Co-authored-by: Eric Velazquez <ericvelmar95@gmail.com>

* fix rpc client mock

---------

Co-authored-by: Eric Velazquez <ericvelmar95@gmail.com>
* publisher init

* remove wrong comment

* Update metabased-publisher/README.md

Co-authored-by: Daniil R <daniil@syndicate.io>

* Update metabased-publisher/README.md

Co-authored-by: Daniil R <daniil@syndicate.io>

* Update metabased-publisher/publisher/publisher.go

Co-authored-by: Daniil R <daniil@syndicate.io>

* Update metabased-publisher/publisher/publisher.go

Co-authored-by: Daniil R <daniil@syndicate.io>

* cleanup

* add SEQ tickets for TODOs

---------

Co-authored-by: Jorge Silva <jorge@Jorges-MacBook-Pro.local>
Co-authored-by: Daniil R <daniil@syndicate.io>
@WillPapper
Copy link
Contributor Author

Closing in favor of #3

@WillPapper WillPapper closed this Oct 11, 2024
WillPapper added a commit that referenced this pull request Oct 11, 2024
This makes it consistent with the protocol-v2 repo, which has served us quite well
WillPapper added a commit that referenced this pull request Oct 11, 2024
* feat: Add post-create script for devnet

* doc: Add comment on devnet initialization

* feat: Switch to Justfile for installation

* fix: Justfile setup

* chore: Remove bash script

* refactor: Dramatically simplify PATH export

This also improves Foundry handling, which lets Foundry installs succeed on the first attempt

* chore: Fix Justfile syntax

* chore: Clean up Justfile to be more idiomatic

* feat: Copy justfile to home directory for devnet commands

* docs: Specify that devnet is op-devnet

In contrast to an eventual Metabased devnet
@WillPapper WillPapper deleted the merge-op-translator branch October 12, 2024 00:57
ibremseth added a commit that referenced this pull request Oct 27, 2025
ibremseth added a commit that referenced this pull request Oct 29, 2025
* New gas metering contract used to track how much gas appchains use per epoch

* fix test

* PR updates and contract bindings

* assembly

* fix merge mistake

* fix certora

* certora fix attempt #2

* skip flaky fork test and fix certora syntax

* fmt, cerotra fix, and cli fix

* one more certora fix

* fix cli

* fix cli

* fix tests

* fmt

* fmt

* updates to fix tests

* fix clippy

* fix gas estimation issue

* fmt
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.

6 participants