Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 1 addition & 1 deletion core/types/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/CortexFoundation/CortexTheseus/common/hexutil"
)

//go:generate go run ../../rlp/rlpgen -type Log -out gen_log_rlp.go
//go:generate go run ../../rlp/rlpgen -norlpgen=false -type Log -out gen_log_rlp.go
//go:generate go run github.com/fjl/gencodec -type Log -field-override logMarshaling -out gen_log_json.go

// Log represents a contract log event. These events are generated by the LOG opcode and
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1
github.com/CortexFoundation/inference v1.0.2-0.20230307032835-9197d586a4e8
github.com/CortexFoundation/statik v0.0.0-20210315012922-8bb8a7b5dc66
github.com/CortexFoundation/torrentfs v1.0.53-0.20230825152533-5b7878b72e74
github.com/CortexFoundation/torrentfs v1.0.54-0.20230828094606-9457a1bef6bd
github.com/VictoriaMetrics/fastcache v1.12.1
github.com/arsham/figurine v1.3.0
github.com/aws/aws-sdk-go-v2 v1.19.0
Expand All @@ -17,7 +17,7 @@ require (
github.com/cespare/cp v1.1.1
github.com/charmbracelet/bubbletea v0.24.2
github.com/cloudflare/cloudflare-go v0.57.1
github.com/cockroachdb/pebble v0.0.0-20230824192853-9bb0864bdb98
github.com/cockroachdb/pebble v0.0.0-20230826001808-0b401ee526b8
github.com/consensys/gnark-crypto v0.11.1
github.com/crate-crypto/go-kzg-4844 v0.3.0
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
Expand Down Expand Up @@ -83,7 +83,7 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect
github.com/CortexFoundation/cvm-runtime v0.0.0-20221117094012-b5a251885572 // indirect
github.com/CortexFoundation/merkletree v0.0.0-20230724124840-b6e80265a137 // indirect
github.com/CortexFoundation/robot v1.0.5-0.20230824151105-7b645eb24891 // indirect
github.com/CortexFoundation/robot v1.0.5-0.20230828094447-91dadd9d34b7 // indirect
github.com/DataDog/zstd v1.5.6-0.20230622172052-ea68dcab66c0 // indirect
github.com/RoaringBitmap/roaring v1.3.0 // indirect
github.com/ajwerner/btree v0.0.0-20211221152037-f427b3e689c0 // indirect
Expand Down Expand Up @@ -237,7 +237,7 @@ require (
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ucwong/filecache v1.0.6-0.20230405163841-810d53ced4bd // indirect
github.com/ucwong/go-ttlmap v1.0.2-0.20221020173635-331e7ddde2bb // indirect
github.com/ucwong/golang-kv v1.0.23-0.20230825073420-bbd65392f5a0 // indirect
github.com/ucwong/golang-kv v1.0.23-0.20230827081935-0ebb6ae028c9 // indirect
github.com/ucwong/shard v1.0.1-0.20230505153952-911e99b5f0c2 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ github.com/CortexFoundation/inference v1.0.2-0.20230307032835-9197d586a4e8 h1:W/
github.com/CortexFoundation/inference v1.0.2-0.20230307032835-9197d586a4e8/go.mod h1:Doj3mBNzdjCDvKVwysKaHEPbS20A7RRaQY0bHtEVz88=
github.com/CortexFoundation/merkletree v0.0.0-20230724124840-b6e80265a137 h1:GdrLwJRKPrUSd4V/cBpPyzhNQEo8IDT7Le15hmuC+/4=
github.com/CortexFoundation/merkletree v0.0.0-20230724124840-b6e80265a137/go.mod h1:OwfhC316GcEJ9QVNWPqj6QV7sorcXBnc0P9p8dPfSbM=
github.com/CortexFoundation/robot v1.0.5-0.20230824151105-7b645eb24891 h1:u8WDPtkE3/qmQJ2We45/NGujplnYVbz27qEZz+sO/kU=
github.com/CortexFoundation/robot v1.0.5-0.20230824151105-7b645eb24891/go.mod h1:nxAuzCt5wbgvvqdrHoYakgeOvzJfwLRwC8GmoJCn7bA=
github.com/CortexFoundation/robot v1.0.5-0.20230828094447-91dadd9d34b7 h1:UbkO9LjBxFcql2zXQBUNVhbVglblwTqjBxVrhE/SpR0=
github.com/CortexFoundation/robot v1.0.5-0.20230828094447-91dadd9d34b7/go.mod h1:woeWmwwGA6H/AYwBP7sbVcJY2gg57ZZZo1O0nGmUNhM=
github.com/CortexFoundation/statik v0.0.0-20210315012922-8bb8a7b5dc66 h1:yJbN4DFvpStCShXOVxNV64aawsPqizLuXZhrnhCr2fY=
github.com/CortexFoundation/statik v0.0.0-20210315012922-8bb8a7b5dc66/go.mod h1:AkjV4OECAskB9m6w+2e84F0Zcx7oZWEmHB3EKoaDXYk=
github.com/CortexFoundation/torrentfs v1.0.13-0.20200623060705-ce027f43f2f8/go.mod h1:Ma+tGhPPvz4CEZHaqEJQMOEGOfHeQBiAoNd1zyc/w3Q=
github.com/CortexFoundation/torrentfs v1.0.14-0.20200703071639-3fcabcabf274/go.mod h1:qnb3YlIJmuetVBtC6Lsejr0Xru+1DNmDCdTqnwy7lhk=
github.com/CortexFoundation/torrentfs v1.0.20-0.20200810031954-d36d26f82fcc/go.mod h1:N5BsicP5ynjXIi/Npl/SRzlJ630n1PJV2sRj0Z0t2HA=
github.com/CortexFoundation/torrentfs v1.0.53-0.20230825152533-5b7878b72e74 h1:ccq02u4er1eYuRNPk0HdElvv9YdM3qOL8Nha5WKi2es=
github.com/CortexFoundation/torrentfs v1.0.53-0.20230825152533-5b7878b72e74/go.mod h1:wYWD0cOPra0MLJtvWJPI1oIDbRW/LlRQ8Um2/De3/I0=
github.com/CortexFoundation/torrentfs v1.0.54-0.20230828094606-9457a1bef6bd h1:22y7Q0mgJLKfMwU1euQRJdZntGLjrPMG8dHwBdduzIM=
github.com/CortexFoundation/torrentfs v1.0.54-0.20230828094606-9457a1bef6bd/go.mod h1:FNmuUoyPOi27YYBn8haVMZ/CjvdGVgooSnjb2Q/aZd4=
github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/DataDog/zstd v1.5.6-0.20230622172052-ea68dcab66c0 h1:ye3LRgDs6Og7SKC1wBQH8oMaGczhCRpPpnU74l4rma8=
github.com/DataDog/zstd v1.5.6-0.20230622172052-ea68dcab66c0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
Expand Down Expand Up @@ -355,8 +355,8 @@ github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+
github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE=
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE=
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs=
github.com/cockroachdb/pebble v0.0.0-20230824192853-9bb0864bdb98 h1:Y7g+YeGJ+1Ni31uOplgf7mi+1X+Em5PzIx9WMPq/2zY=
github.com/cockroachdb/pebble v0.0.0-20230824192853-9bb0864bdb98/go.mod h1:EDjiaAXc0FXiRmxDzcu1wIEJ093ohHMUWxrI6iku0XA=
github.com/cockroachdb/pebble v0.0.0-20230826001808-0b401ee526b8 h1:ilhlTIOOfIxuOCo72EnV2oPNCMwiOy6sO19P8RmM/Xw=
github.com/cockroachdb/pebble v0.0.0-20230826001808-0b401ee526b8/go.mod h1:EDjiaAXc0FXiRmxDzcu1wIEJ093ohHMUWxrI6iku0XA=
github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30=
github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo=
Expand Down Expand Up @@ -1264,8 +1264,8 @@ github.com/ucwong/filecache v1.0.6-0.20230405163841-810d53ced4bd h1:gBtlvLAsgLk+
github.com/ucwong/filecache v1.0.6-0.20230405163841-810d53ced4bd/go.mod h1:ddwX+NCjMZPdpzcGh1fcEbNTUTCtKgt2hC2rqvmLKgA=
github.com/ucwong/go-ttlmap v1.0.2-0.20221020173635-331e7ddde2bb h1:dVZH3AH9f7zB3VBmsjn25B7lfcAyMP4QxdFYTrfj7tg=
github.com/ucwong/go-ttlmap v1.0.2-0.20221020173635-331e7ddde2bb/go.mod h1:3yswsBsVuwsOjDvFfC5Na9XSEf4HC7mj3W3g6jvSY/s=
github.com/ucwong/golang-kv v1.0.23-0.20230825073420-bbd65392f5a0 h1:16MgAJcj6Uk5xDmGgIeThuyozv09+gWMJWkzAnPXpzA=
github.com/ucwong/golang-kv v1.0.23-0.20230825073420-bbd65392f5a0/go.mod h1:BRrhHHyxZa+puK5RW9PmMvFXtzUjILfgbKpnukbs5VY=
github.com/ucwong/golang-kv v1.0.23-0.20230827081935-0ebb6ae028c9 h1:7hAuCyafHw18lJ7X+oGR1+glU1gT8mYio9nsLuSdDGg=
github.com/ucwong/golang-kv v1.0.23-0.20230827081935-0ebb6ae028c9/go.mod h1:D9Q8lNtacTHgZmUzPWSl8eCRCH0k+woz2C0pwsdZoZ0=
github.com/ucwong/golang-set v1.8.1-0.20200419153428-d7b0b1ac2d43/go.mod h1:xu0FaiQFGbBcFZj2o7udZ5rbA8jRTsv47hkPoG5qQNM=
github.com/ucwong/goleveldb v1.0.3-0.20200508074755-578cba616f37/go.mod h1:dgJUTtDxq/ne6/JzZhHzF24OL/uqILz9IWk8HmT4V2g=
github.com/ucwong/goleveldb v1.0.3-0.20200618184106-f1c6bc3a428b/go.mod h1:7Sq6w7AfEZuB/a6mrlvHCSXCSkqojCMMrM3Ei12QAT0=
Expand Down
15 changes: 10 additions & 5 deletions rlp/rlpgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func main() {
output = flag.String("out", "-", "output file (default is stdout)")
genEncoder = flag.Bool("encoder", true, "generate EncodeRLP?")
genDecoder = flag.Bool("decoder", false, "generate DecodeRLP?")
norlpGen = flag.Bool("norlpgen", true, "apply norlpgen build tag")
typename = flag.String("type", "", "type to generate methods for")
)
flag.Parse()
Expand All @@ -45,7 +46,7 @@ func main() {
GenerateEncoder: *genEncoder,
GenerateDecoder: *genDecoder,
}
code, err := cfg.process()
code, err := cfg.process(*norlpGen)
if err != nil {
fatal(err)
}
Expand All @@ -70,13 +71,17 @@ type Config struct {
}

// process generates the Go code.
func (cfg *Config) process() (code []byte, err error) {
func (cfg *Config) process(norlpGen bool) (code []byte, err error) {
// Load packages.
pcfg := &packages.Config{
Mode: packages.NeedName | packages.NeedTypes | packages.NeedImports | packages.NeedDeps,
Dir: cfg.Dir,
BuildFlags: []string{"-tags", "norlpgen"},
Mode: packages.NeedName | packages.NeedTypes | packages.NeedImports | packages.NeedDeps,
Dir: cfg.Dir,
}

if norlpGen {
pcfg.BuildFlags = []string{"-tags", "norlpgen"}
}

ps, err := packages.Load(pcfg, pathOfPackageRLP, ".")
if err != nil {
return nil, err
Expand Down
Loading