concrete-eth / concrete-geth

Concrete is a framework for building application-specific rollups on the OP Stack
GNU Lesser General Public License v3.0
47 stars 19 forks source link

Test block context methods in Concrete environment #40

Closed therealbytes closed 3 days ago

therealbytes commented 1 month ago

Rationale

Currently, the Concrete environment is poorly tested.

Implementation

This depends on #37 being implemented. Once that is done, the new mock block context can be used for testing. Both execution and gas usage should be tested.

At the moment, the block context methods are:

type Environment interface {
    // ...

    GetBlockNumber() uint64
    GetBlockGasLimit() uint64
    GetBlockTimestamp() uint64
    GetBlockDifficulty() *uint256.Int
    GetBlockBaseFee() *uint256.Int
    GetBlockCoinbase() common.Address
    GetPrevRandom() common.Hash
    GetBlockHash(block uint64) common.Hash
}

[ODHack 4.0] Contributors: Note that we highly recommend that you comment on the issue by introducing yourself and how you plan on tackling the issue! Just saying you want an issue is not helpful. This will help with assigning tasks, especially if many comment.

EjembiEmmanuel commented 1 month ago

@therealbytes I'd love to work on this

aji70 commented 1 month ago

hi @therealbytes i would love to work on this

Iwueseiter commented 1 month ago

@therealbytes can I work on this issue when #37 has been completed, I will conduct the tests, I would use Go test tool to: ensure all methods function as expected. I would make sure it return the expected outputs for the specified inputs. Call the methods on the mock implementations and use assertions to verify that actual outputs match expected outputs.

therealbytes commented 1 month ago

Any progress? @Iwueseiter

Iwueseiter commented 4 weeks ago

@therealbytes yes, I will create a PR as soon as possible.

Iwueseiter commented 1 week ago

@therealbytes I have opened a PR already.

therealbytes commented 6 days ago

Since @Iwueseiter is not responding maybe @aji70 can finish #55 instead?

aji70 commented 6 days ago

Okay let me get to work

Iwueseiter commented 5 days ago

@therealbytes please i will update the PR today. I wasn't online cos of some challenges. I'm just seeing this.

therealbytes commented 5 days ago

@aji70 Please wait a couple days before working on this!