* Get basic getStorage/setStorage stubs working
* Clean up tests
* Add state_manager
* Add StateManager set & getStorage
* Add state mananger create function
* Add get & increment nonce
* Add getCodeContractBytecode
* Add GetCodeContractHash
* Add getCodeContractHash to the state manager
* Add associateCodeContract to state manager
* Pass the tests
* go fmt
* Add stateTransition to test with
* Fix tests
* Test deploying contract with transition state
* Call executeTransaction on contract deployment
* Added ExecutionManager deployment
* Get contract deployments working
* Cleanup logging
* Get stubbed ExecutionManager working
* Get a simple contract to deploy through the ExecutionManager
* Refactor simpleAbiEncode
* Revert unnecessary changes
* Remove comments
* Revert changes outside of this PR
* Revert changes outside of this PR
* Revert changes outside of this PR
* Fix broken tests
* Move OVM bytecode & ABI into constants
* Add crazy printlines
* Remove crazy comments
* Add a bunch of debug printlns
* Add helper fn for applying msgs to the EVM
* Update ExecutionManager bytecode
* Shim CREATE for EM to use correct addr
* Add SimpleStorage test
* Add the EM/SM to all new states
* Force all txs to be routed through the EM
* Remove unused files
* Remove unused comments
* Increment nonce after failed tx
* Add debug statements
* Use evm.Time for timestamp
* Change EM deployment, fix broken tests, clean up
* Add an OVM test & remove printlns
* Fix lint errors & remove final printlns
* Final cleanup--remove some comments
* Limiting Geth to one transaction per block (#3)
* Limiting Geth to one transaction per block
* Adding TransitionBatchBuilder to build & submit rollup blocks
* Adding L1MessageSender to Transaction (#4)
* Adding L1MessageSender to Transaction
* Adding logic to omit L1MessageSender in encoding / decoding when nil and never use it in hash computation
Co-authored-by: ben-chain <ben@pseudonym.party>
* Fixing Geth Tests (#6)
Fixing broken tests, skipping tests we intentionally break, and configuring CI within Github Actions
* Hex Trie -> Binary Trie (#7)
*** Changing Hex Trie to Binary Trie ***
Note: This changes and/or comments out a bunch of tests, so if things break down the line, this is likely the cause!
* Ingest Block Batches (#8)
Handling BlockBatches in Geth at `SendBlockBatches` endpoint (eth_sendBlockBatches)
Other:
* Adding PR template
* Adding ability to set timestamp and making blocks use configured timestamp
* Adding ability to encode original tx nonce in calldata
* Adding L1MessageSender to Contract Creation Txs
* Add L1MessageSender to Message
* Increment nonce on CREATE failure
* Fix bug where evm.Time=0
* Use state dump with hardcoded EM & SM addrs
- ExecutionMgr address should always be 0x0000...dead0000
- StateMgr address should always be 0x0000...dead0001
* Move EM deployment into genesis block maker
* Update EM contracts to latest version
* Update EM to remove events
* Fix the OVM tests
* Skip an ungodly number of tests
* Fix lint errors
* Clean up logging
* Cleanup more logs
* Use local reference to state manager
* Rename applyOvmToState(..)
* Remove unneeded check
* Clean up logging & add EM ABI panic
* Add gas metering to SM & small refactor
* Update core/vm/state_manager.go
Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>
Co-authored-by: Mason Fischer <mason@kissr.co>
Co-authored-by: Will Meister <william.k.meister@gmail.com>
Co-authored-by: ben-chain <ben@pseudonym.party>
Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>
* Adding L1RollupTxId field to Transactions
* Adding rollup transactions signing key config and bug fixing within api.go. Signing key and endpoint will be removed when go handles batch fetching
Handling BlockBatches in Geth at `SendBlockBatches` endpoint (eth_sendBlockBatches)
Other:
* Adding PR template
* Adding ability to set timestamp and making blocks use configured timestamp
* Adding ability to encode original tx nonce in calldata
* Adding L1MessageSender to Contract Creation Txs
* Adding L1MessageSender to Transaction
* Adding logic to omit L1MessageSender in encoding / decoding when nil and never use it in hash computation
Co-authored-by: ben-chain <ben@pseudonym.party>
* Add more functionality to the sim (#5)
* backends: implement more of ethclient in sim
* backends: add BlockByNumber to simulated backend
* backends: make simulated progress function agree with syncprogress interface for client
* backends: add more tests
* backends: add more comments
* backends: fix sim for index in tx and add tests
* backends: add lock back to estimategas
* backends: goimports
* backends: go ci lint
* Add more functionality to the sim (#5)
* backends: implement more of ethclient in sim
* backends: add BlockByNumber to simulated backend
* backends: make simulated progress function agree with syncprogress interface for client
* backends: add more tests
* backends: add more comments
* backends: fix sim for index in tx and add tests
* backends: add lock back to estimategas
* backends: goimports
* backends: go ci lint
* assert errs
* accounts/abi: fix various issues
The fixed issues include:
(1) If there is no return in a call function, unpack should
return nil error
(2) For some functions which have struct array as parameter,
it will also be detected and generate the struct definition
(3) For event, if it has non-indexed parameter, the parameter
name will also be assigned if empty. Also the internal struct
will be detected and generate struct defition if not exist.
(4) Fix annotation generation in event function
* accounts/abi: add new abi field internalType
* accounts: address comments and add tests
* accounts/abi: replace strings.ReplaceAll with strings.Replace
The gas price was not passed to the `EstimateGas` function. As a result,
conditional execution paths depending on `tx.gasprice` could be not
correctly processed and we could get invalid gas estimates for contract
function calls.
The abi package already supports function overload by adding a suffix to the overloaded function name, but it uses the function name with suffix to calculate signature(both for the event and method).
This PR fixes it by adding a new field named RawName, which can be used to calcuate all signatures but use Name to distinguish different overloaded function.
* accounts, abigen: link dependent libs in deploy
* abigen: add java generation
* bind: Fix unit tests
* abigen: add unit test
* Fix CI
* Post-rebase fixes
* Fix rebase issue
* accounts/abi: Gary's review feedback
* accounts/abi: More Gary feedback
* accounts/abi: minor fixes
* accounts/abi, cmd/abigen: support tuple
accounts/abi/bind, cmd/abigen: add objc back
accounts/abi/bind: use byte[24] as function indicator
accounts/abi/bind: resolve struct slice or array
accounts/abi/bind: remove sort logic
accounts: fix issues in abi
* accounts/abi: address comment
* accounts/abi/bind: Accept function ptr parameter
They are translated as [24]byte
* Add Java template version
* accounts/abi/bind: fix merge issue
* Fix CI
* accounts/abi: Fix method overwritten by same name methods.
* accounts/abi: Fix method overwritten by same name methods.
* accounts/abi: avoid possible name conflict
Co-authored-by: Guillaume Ballet <gballet@gmail.com>
This function searches for an event+parameters in the ABI and returns it if found.
Co-authored-by: Victor Tran <vu.tran54@gmail.com>
Co-authored-by: Guillaume Ballet <gballet@gmail.com>
* accounts/abi: fix name styling when unpacking abi fields w/ underscores
ABI fields with underscores that are being unpacked
into structs expect structs with following form:
int_one -> Int_one
whereas in abigen the generated structs are camelcased
int_one -> IntOne
so updated the unpack method to expect camelcased structs as well.