Skip to content

Commit 11dda37

Browse files
Moving latest development work back into eip-4844 branch (#39)
* update to use latest kzg lib (#35) * Expose JSON GetBlock * start port over to the shared kzg lib (#37) * start port over to the shared kzg lib * have CL compute the aggregated proof for the block, per updated spec * start port over to the shared kzg lib (#37) (#38) * start port over to the shared kzg lib * have CL compute the aggregated proof for the block, per updated spec Co-authored-by: dancoffman <coffman@coinbase.com> Co-authored-by: Daniel Coffman <dgcoffman@gmail.com>
1 parent eb1b85d commit 11dda37

File tree

21 files changed

+150
-671
lines changed

21 files changed

+150
-671
lines changed

WORKSPACE

Lines changed: 0 additions & 196 deletions
Original file line numberDiff line numberDiff line change
@@ -396,216 +396,20 @@ go_repository(
396396
version = "v0.14.0",
397397
)
398398

399-
go_repository(
400-
name = "com_github_confluentinc_confluent_kafka_go",
401-
importpath = "github.com/confluentinc/confluent-kafka-go",
402-
sum = "h1:13EK9RTujF7lVkvHQ5Hbu6bM+Yfrq8L0MkJNnjHSd4Q=",
403-
version = "v1.4.2",
404-
)
405-
406399
go_repository(
407400
name = "com_github_dnaeon_go_vcr",
408401
importpath = "github.com/dnaeon/go-vcr",
409402
sum = "h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI=",
410403
version = "v1.2.0",
411404
)
412405

413-
go_repository(
414-
name = "com_github_form3tech_oss_jwt_go",
415-
importpath = "github.com/form3tech-oss/jwt-go",
416-
sum = "h1:xdtqez379uWVJ9P3qQMX8W+F/nqsTdUvyMZB36tnacA=",
417-
version = "v3.2.1+incompatible",
418-
)
419-
420-
go_repository(
421-
name = "com_github_go_check_check",
422-
importpath = "github.com/go-check/check",
423-
sum = "h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI=",
424-
version = "v0.0.0-20180628173108-788fd7840127",
425-
)
426-
427-
go_repository(
428-
name = "com_github_iancoleman_strcase",
429-
importpath = "github.com/iancoleman/strcase",
430-
sum = "h1:dJBk1m2/qjL1twPLf68JND55vvivMupZ4wIzE8CTdBw=",
431-
version = "v0.1.3",
432-
)
433-
434-
go_repository(
435-
name = "com_github_ipfs_go_ipfs_addr",
436-
importpath = "github.com/ipfs/go-ipfs-addr",
437-
sum = "h1:DpDFybnho9v3/a1dzJ5KnWdThWD1HrFLpQ+tWIyBaFI=",
438-
version = "v0.0.1",
439-
)
440-
441-
go_repository(
442-
name = "com_github_jackpal_gateway",
443-
importpath = "github.com/jackpal/gateway",
444-
sum = "h1:qzXWUJfuMdlLMtt0a3Dgt+xkWQiA5itDEITVJtuSwMc=",
445-
version = "v1.0.5",
446-
)
447-
448-
go_repository(
449-
name = "com_github_kubuxu_go_os_helper",
450-
importpath = "github.com/Kubuxu/go-os-helper",
451-
sum = "h1:EJiD2VUQyh5A9hWJLmc6iWg6yIcJ7jpBcwC8GMGXfDk=",
452-
version = "v0.0.1",
453-
)
454-
455-
go_repository(
456-
name = "com_github_libp2p_go_addr_util",
457-
importpath = "github.com/libp2p/go-addr-util",
458-
sum = "h1:7cWK5cdA5x72jX0g8iLrQWm5TRJZ6CzGdPEhWj7plWU=",
459-
version = "v0.0.2",
460-
)
461-
462-
go_repository(
463-
name = "com_github_libp2p_go_libp2p_autonat",
464-
importpath = "github.com/libp2p/go-libp2p-autonat",
465-
sum = "h1:3y8XQbpr+ssX8QfZUHekjHCYK64sj6/4hnf/awD4+Ug=",
466-
version = "v0.4.0",
467-
)
468-
469-
go_repository(
470-
name = "com_github_libp2p_go_libp2p_crypto",
471-
importpath = "github.com/libp2p/go-libp2p-crypto",
472-
sum = "h1:k9MFy+o2zGDNGsaoZl0MA3iZ75qXxr9OOoAZF+sD5OQ=",
473-
version = "v0.1.0",
474-
)
475-
476-
go_repository(
477-
name = "com_github_libp2p_go_libp2p_discovery",
478-
importpath = "github.com/libp2p/go-libp2p-discovery",
479-
sum = "h1:Qfl+e5+lfDgwdrXdu4YNCWyEo3fWuP+WgN9mN0iWviQ=",
480-
version = "v0.5.0",
481-
)
482-
483-
go_repository(
484-
name = "com_github_libp2p_go_libp2p_loggables",
485-
importpath = "github.com/libp2p/go-libp2p-loggables",
486-
sum = "h1:h3w8QFfCt2UJl/0/NW4K829HX/0S4KD31PQ7m8UXXO8=",
487-
version = "v0.1.0",
488-
)
489-
490-
go_repository(
491-
name = "com_github_libp2p_go_libp2p_nat",
492-
importpath = "github.com/libp2p/go-libp2p-nat",
493-
sum = "h1:wMWis3kYynCbHoyKLPBEMu4YRLltbm8Mk08HGSfvTkU=",
494-
version = "v0.0.6",
495-
)
496-
497-
go_repository(
498-
name = "com_github_libp2p_go_libp2p_netutil",
499-
importpath = "github.com/libp2p/go-libp2p-netutil",
500-
sum = "h1:zscYDNVEcGxyUpMd0JReUZTrpMfia8PmLKcKF72EAMQ=",
501-
version = "v0.1.0",
502-
)
503-
504-
go_repository(
505-
name = "com_github_libp2p_go_libp2p_noise",
506-
importpath = "github.com/libp2p/go-libp2p-noise",
507-
sum = "h1:IH9GRihQJTx56obm+GnpdPX4KeVIlvpXrP6xnJ0wxWk=",
508-
version = "v0.1.2",
509-
)
510-
511-
go_repository(
512-
name = "com_github_libp2p_go_libp2p_peer",
513-
importpath = "github.com/libp2p/go-libp2p-peer",
514-
sum = "h1:EQ8kMjaCUwt/Y5uLgjT8iY2qg0mGUT0N1zUjer50DsY=",
515-
version = "v0.2.0",
516-
)
517-
518-
go_repository(
519-
name = "com_github_libp2p_go_libp2p_secio",
520-
importpath = "github.com/libp2p/go-libp2p-secio",
521-
sum = "h1:rLLPvShPQAcY6eNurKNZq3eZjPWfU9kXF2eI9jIYdrg=",
522-
version = "v0.2.2",
523-
)
524-
525-
go_repository(
526-
name = "com_github_libp2p_go_stream_muxer",
527-
importpath = "github.com/libp2p/go-stream-muxer",
528-
sum = "h1:Ce6e2Pyu+b5MC1k3eeFtAax0pW4gc6MosYSLV05UeLw=",
529-
version = "v0.0.1",
530-
)
531-
532-
go_repository(
533-
name = "com_github_libp2p_go_ws_transport",
534-
importpath = "github.com/libp2p/go-ws-transport",
535-
sum = "h1:ZX5rWB8nhRRJVaPO6tmkGI/Xx8XNboYX20PW5hXIscw=",
536-
version = "v0.3.1",
537-
)
538-
539-
go_repository(
540-
name = "com_github_libp2p_go_yamux",
541-
importpath = "github.com/libp2p/go-yamux",
542-
sum = "h1:P1Fe9vF4th5JOxxgQvfbOHkrGqIZniTLf+ddhZp8YTI=",
543-
version = "v1.4.1",
544-
)
545-
546406
go_repository(
547407
name = "com_github_modocache_gover",
548408
importpath = "github.com/modocache/gover",
549409
sum = "h1:8Q0qkMVC/MmWkpIdlvZgcv2o2jrlF6zqVOh7W5YHdMA=",
550410
version = "v0.0.0-20171022184752-b58185e213c5",
551411
)
552412

553-
go_repository(
554-
name = "com_github_nbutton23_zxcvbn_go",
555-
importpath = "github.com/nbutton23/zxcvbn-go",
556-
sum = "h1:AREM5mwr4u1ORQBMvzfzBgpsctsbQikCVpvC+tX285E=",
557-
version = "v0.0.0-20180912185939-ae427f1e4c1d",
558-
)
559-
560-
go_repository(
561-
name = "com_github_prestonvanloon_go_recaptcha",
562-
importpath = "github.com/prestonvanloon/go-recaptcha",
563-
sum = "h1:/JK1WfWJGBNDKY70uiB53iKKbFqxBx2CuYgj9hK2O70=",
564-
version = "v0.0.0-20190217191114-0834cef6e8bd",
565-
)
566-
567-
go_repository(
568-
name = "com_github_prysmaticlabs_eth2_types",
569-
importpath = "github.com/prysmaticlabs/eth2-types",
570-
sum = "h1:1dN7YAqMN3oAJ0LceWcyv/U4jHLh+5urnSnr4br6zg4=",
571-
version = "v0.0.0-20210303084904-c9735a06829d",
572-
)
573-
574-
go_repository(
575-
name = "com_github_prysmaticlabs_prysm",
576-
importpath = "github.com/prysmaticlabs/prysm",
577-
sum = "h1:vgtnaMaTpKHPRcFNbndLH+qf5NWNMykTmnCHFDvH/4o=",
578-
version = "v1.4.4",
579-
)
580-
581-
go_repository(
582-
name = "com_github_whyrusleeping_go_keyspace",
583-
importpath = "github.com/whyrusleeping/go-keyspace",
584-
sum = "h1:EKhdznlJHPMoKr0XTrX+IlJs1LH3lyx2nfr1dOlZ79k=",
585-
version = "v0.0.0-20160322163242-5b898ac5add1",
586-
)
587-
588-
go_repository(
589-
name = "com_github_whyrusleeping_go_logging",
590-
importpath = "github.com/whyrusleeping/go-logging",
591-
sum = "h1:fwpzlmT0kRC/Fmd0MdmGgJG/CXIZ6gFq46FQZjprUcc=",
592-
version = "v0.0.1",
593-
)
594-
595-
go_repository(
596-
name = "com_github_whyrusleeping_mafmt",
597-
importpath = "github.com/whyrusleeping/mafmt",
598-
sum = "h1:TCghSl5kkwEE0j+sU/gudyhVMRlpBin8fMBBHg59EbA=",
599-
version = "v1.2.8",
600-
)
601-
602-
go_repository(
603-
name = "in_gopkg_confluentinc_confluent_kafka_go_v1",
604-
importpath = "gopkg.in/confluentinc/confluent-kafka-go.v1",
605-
sum = "h1:JabkIV98VYFqYKHHzXtgGMFuRgFBNTNzBytbGByzrJI=",
606-
version = "v1.4.2",
607-
)
608-
609413
gazelle_dependencies()
610414

611415
load("@com_github_bazelbuild_buildtools//buildifier:deps.bzl", "buildifier_dependencies")

api/client/beacon/client.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ func withSSZEncoding() reqOption {
143143
}
144144
}
145145

146+
func withJSONEncoding() reqOption {
147+
return func(req *http.Request) {
148+
req.Header.Set("Accept", "application/json")
149+
}
150+
}
151+
146152
// get is a generic, opinionated GET function to reduce boilerplate amongst the getters in this package.
147153
func (c *Client) get(ctx context.Context, path string, opts ...reqOption) ([]byte, error) {
148154
u := c.baseURL.ResolveReference(&url.URL{Path: path})
@@ -189,6 +195,15 @@ func (c *Client) GetBlock(ctx context.Context, blockId StateOrBlockId) ([]byte,
189195
return b, nil
190196
}
191197

198+
func (c *Client) GetBlockJSON(ctx context.Context, blockId StateOrBlockId) ([]byte, error) {
199+
blockPath := renderGetBlockPath(blockId)
200+
b, err := c.get(ctx, blockPath, withJSONEncoding())
201+
if err != nil {
202+
return nil, errors.Wrapf(err, "error requesting state by id = %s", blockId)
203+
}
204+
return b, nil
205+
}
206+
192207
var getBlockRootTpl = idTemplate(getBlockRootPath)
193208

194209
// GetBlockRoot retrieves the hash_tree_root of the BeaconBlock for the given block id.

beacon-chain/core/blob/BUILD.bazel

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,5 @@ go_library(
1616
"@com_github_ethereum_go_ethereum//crypto/kzg:go_default_library",
1717
"@com_github_ethereum_go_ethereum//params:go_default_library",
1818
"@com_github_pkg_errors//:go_default_library",
19-
"@com_github_protolambda_go_kzg//bls:go_default_library",
20-
"@com_github_prysmaticlabs_fastssz//:go_default_library",
2119
],
2220
)

0 commit comments

Comments
 (0)