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

Fixes issues in #96 #100

Closed
wants to merge 63 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
f605e60
Updated
18aaddy Sep 19, 2024
2291d91
Revert "Updated"
18aaddy Sep 24, 2024
025f101
Modified go.mod and go.sum
18aaddy Oct 29, 2024
313a7a0
Updated
18aaddy Sep 19, 2024
020954f
Revert "Updated"
18aaddy Sep 24, 2024
a8fae8a
Initial Commit
18aaddy Oct 23, 2024
6e8ee83
Updated
18aaddy Oct 29, 2024
1e1d769
Update
18aaddy Oct 29, 2024
b09b233
Update
18aaddy Oct 29, 2024
8bbedbe
Tests working locally
18aaddy Oct 29, 2024
6635d26
Added test file
18aaddy Oct 29, 2024
6402277
Update
18aaddy Oct 30, 2024
2da2aa2
Commented CreateAccessListTest
18aaddy Oct 30, 2024
b137762
Update
18aaddy Oct 30, 2024
460629c
fix for #96
ABD-AZE Nov 1, 2024
efb93d5
json error resolved from createaccess list
ABD-AZE Nov 1, 2024
4a05db6
resolved warnings
ABD-AZE Nov 1, 2024
664b81d
tests passing
ABD-AZE Nov 1, 2024
ad0e041
final warnings resolved
ABD-AZE Nov 1, 2024
c76a2a2
edit common/types.go
ABD-AZE Nov 2, 2024
826916b
Running workflow again
ABD-AZE Nov 4, 2024
a28f2d1
Tests passing
ABD-AZE Nov 4, 2024
5778b54
type consistency maintained
ABD-AZE Nov 4, 2024
8aa8dc0
refactoring
ABD-AZE Nov 4, 2024
5898174
.gitignore
ABD-AZE Nov 4, 2024
ee4a0f0
Delete go.mod
ABD-AZE Nov 4, 2024
8d8156d
Delete go.sum
ABD-AZE Nov 4, 2024
f52b2a9
Update consensus.go
DarkLord017 Oct 15, 2024
4325390
Update consensus_core.go
DarkLord017 Oct 15, 2024
60d1a76
Create serde_utils.go
DarkLord017 Oct 15, 2024
69e5dc9
Update utils.go
DarkLord017 Oct 15, 2024
231cfd4
Update consensus_rpc.go
DarkLord017 Oct 15, 2024
7c5644e
Update consensus_rpc_test.go
DarkLord017 Oct 15, 2024
ede23f9
Update mock_rpc.go
DarkLord017 Oct 15, 2024
a01bad1
Update mock_rpc_test.go
DarkLord017 Oct 15, 2024
dd5efbf
Update nimbus_rpc.go
DarkLord017 Oct 15, 2024
58af92e
Update nimbus_rpc_test.go
DarkLord017 Oct 15, 2024
f57d83a
Update go.mod
DarkLord017 Oct 15, 2024
95b027a
Update go.sum
DarkLord017 Oct 15, 2024
b3bf300
Create consensus_test.go
DarkLord017 Oct 15, 2024
13982ab
Refactor consensus/rpc/consensus_rpc.go
DarkLord017 Sep 27, 2024
e240988
Refactor mock_rpc.go
DarkLord017 Sep 27, 2024
5feb1aa
Refactor nimbus_rpc.go
DarkLord017 Sep 27, 2024
a25749a
Update consensus_rpc.go
DarkLord017 Nov 4, 2024
069c873
Update consensus.go
DarkLord017 Nov 4, 2024
c9023e8
Removed duplicated types and structs in basic.go
DarkLord017 Oct 1, 2024
dbcf04a
Refactor beacon.go to remove duplicxatoed types and structs
DarkLord017 Oct 1, 2024
468590d
Update consensus_core.go to remove import cycle errors after refactor…
DarkLord017 Oct 1, 2024
de838bd
Update basic.go
DarkLord017 Nov 4, 2024
cb66bee
Resolved builder errors
Nov 4, 2024
0d1c3eb
Create tests consensus/database_test.go
DarkLord017 Nov 4, 2024
5e0ccf7
Update consensus.go to correctly use rlp unmarsahalling and handle le…
DarkLord017 Nov 4, 2024
bb46c01
Update serde_utils.go to correctly handle unmarsahhlihng
DarkLord017 Nov 4, 2024
c3fb924
Update consensus_test.go to handle block Tests
DarkLord017 Nov 4, 2024
dbca377
Update mock_rpc_test.go to handle Blocks
DarkLord017 Nov 4, 2024
7704238
Update nimbus_rpc_test.go to handle Blocks
DarkLord017 Nov 4, 2024
512f8c4
Update consensus_core.go to handle Transactions correctly
DarkLord017 Nov 4, 2024
ce5cb70
Updated
18aaddy Sep 19, 2024
fc21118
Revert "Updated"
18aaddy Sep 24, 2024
d1a2886
Modified go.mod and go.sum
18aaddy Oct 29, 2024
5f61b96
Updated
18aaddy Sep 19, 2024
e48119b
Revert "Updated"
18aaddy Sep 24, 2024
4e55d9c
Update
18aaddy Oct 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
go.mod
go.sum
45 changes: 23 additions & 22 deletions common/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package common
import (
"encoding/json"
"fmt"
"math/big"
"strconv"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types"
"github.com/holiman/uint256"
)
Expand Down Expand Up @@ -45,27 +45,28 @@ type Transactions struct {
Hashes [][32]byte
Full []Transaction // transaction needs to be defined
}

// Updated as earlier, txn data fetched from rpc was not able to unmarshal
// into the struct
type Transaction struct {
AccessList types.AccessList
Hash common.Hash
Nonce uint64
BlockHash [32]byte
BlockNumber *uint64
TransactionIndex uint64
From string
To *common.Address
Value *big.Int
GasPrice *big.Int
Gas uint64
Input []byte
ChainID *big.Int
TransactionType uint8
Signature *Signature
MaxFeePerGas *big.Int
MaxPriorityFeePerGas *big.Int
MaxFeePerBlobGas *big.Int
BlobVersionedHashes []common.Hash
AccessList types.AccessList `json:"accessList"`
Hash common.Hash `json:"hash"`
Nonce hexutil.Uint64 `json:"nonce"`
BlockHash common.Hash `json:"blockHash"` // Pointer because it's nullable
BlockNumber hexutil.Uint64 `json:"blockNumber"` // Pointer because it's nullable
TransactionIndex hexutil.Uint64 `json:"transactionIndex"`
From *common.Address `json:"from"`
To *common.Address `json:"to"` // Pointer because 'to' can be null for contract creation
Value hexutil.Big `json:"value"`
GasPrice hexutil.Big `json:"gasPrice"`
Gas hexutil.Uint64 `json:"gas"`
Input hexutil.Bytes `json:"input"`
ChainID hexutil.Big `json:"chainId"`
TransactionType hexutil.Uint `json:"type"`
Signature *Signature `json:"signature"`
MaxFeePerGas hexutil.Big `json:"maxFeePerGas"`
MaxPriorityFeePerGas hexutil.Big `json:"maxPriorityFeePerGas"`
MaxFeePerBlobGas hexutil.Big `json:"maxFeePerBlobGas"`
BlobVersionedHashes []common.Hash `json:"blobVersionedHashes"`
}

type Signature struct {
Expand Down Expand Up @@ -116,7 +117,7 @@ func (b BlockTag) String() string {
if b.Finalized {
return "finalized"
}
return fmt.Sprintf("%d", b.Number)
return fmt.Sprintf("0x%x", b.Number)
}

func (b *BlockTag) UnmarshalJSON(data []byte) error {
Expand Down
Loading