8000 Tags · 01builders/celestia-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tags: 01builders/celestia-core

Tags

v1.45.0-tm-v0.34.35

Toggle v1.45.0-tm-v0.34.35's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: support gRPC endpoints in core (celestiaorg#1513)

This is an implementation of a streaming API for blocks in core. 

Helps close celestiaorg/celestia-app#3421 but
not sure it entirely closes it.

It can easily be used:

```go
package main

import (
	"context"
	"fmt"
	coregrpc "github.com/tendermint/tendermint/rpc/grpc"
)

func main() {
	client := coregrpc.StartBlockAPIGRPCClient("tcp://localhost:9090")

	blockStreamer, err := client.BlockByHeight(context.Background(), &coregrpc.BlockByHeightRequest{Height: 2})
	if err != nil {
		panic(err)
	}
	blockMeta, err := client.BlockMetaByHeight(context.Background(), &coregrpc.BlockMetaByHeightRequest{Height: 2})
	if err != nil {
		panic(err)
	}
	parts := make([]*core.Part, 0)
	for i := 0; i < int(blockMeta.BlockMeta.BlockID.PartSetHeader.Total); i++ {
		resp, err := blockStreamer.Recv()
		if err != nil {
			panic(err)
		}
		parts = append(parts, resp.BlockPart)
		if resp.IsLast && i < int(blockMeta.BlockMeta.BlockID.PartSetHeader.Total)-1 {
			panic("couldn't get all parts")
		} else if resp.IsLast {
			break
		}
	}

	h := types.NewPartSetFromHeader(types.PartSetHeader{
		Total: blockMeta.BlockMeta.BlockID.PartSetHeader.Total,
		Hash:  blockMeta.BlockMeta.BlockID.PartSetHeader.Hash,
	})

	for _, part := range parts {
		ok, err := h.AddPart(&types.Part{
			Index: part.Index,
			Bytes: part.Bytes,
			Proof: merkle.Proof{
				Total:    part.Proof.Total,
				Index:    part.Proof.Index,
				LeafHash: part.Proof.LeafHash,
				Aunts:    part.Proof.Aunts,
			},
		})
		if err != nil {
			panic(err)
		}
		if !ok {
			panic("not okey")
		}
	}
	pbb := new(core.Block)
	bz, err := io.ReadAll(h.GetReader())
	if err != nil {
		panic(err)
	}
	err = proto.Unmarshal(bz, pbb)
	if err != nil {
		panic(err)
	}
	block, err := types.BlockFromProto(pbb)
	if err != nil {
		panic(err)
	}
	fmt.Println(block)

	// get a commit
	commit, err := client.Commit(context.Background(), &coregrpc.CommitRequest{Height: 10})
	if err != nil {
		panic(err)
	}
	fmt.Println(commit)

	// listen for new heights
	streamer, err := client.SubscribeNewHeights(context.Background(), &coregrpc.SubscribeNewHeightsRequest{})
	if err != nil {
		panic(err)
	}
	for {
		resp, err := streamer.Recv()
		if err != nil {
			panic(err)
		}
		fmt.Println(resp)
	}
}
```

Ps: I didn't add the tests because I didn't find a direct way of mocking
the environment without polluting the rest of the repo (exporting some
methods, adding new helpers, etc). And I think since the implementation
is simple, just querying the block/state stores for results, it's fine
to leave it untested.

---------

Co-authored-by: Rootul P <rootulp@gmail.com>

v1.44.2-tm-v0.34.35

Toggle v1.44.2-tm-v0.34.35's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: mempool locking mechanism in v1 and cat (celestiaorg#1582)

This is residual of
celestiaorg#1553

The problem is now even more subtle. Because the mempool mutexes weren't
over both CheckTx and the actual adding of the transaction to the
mempool we occasionally hit a situation as follows:

- CheckTx a tx with nonce 2
- Before saving it to the store, collect all transactions and recheck
tx. This excludes the last tx with nonce 2, thus the nonce in the state
machine is still 1
- Save the tx to the pool
- New tx comes in with nonce 3. The application is at 1 so rejects it
expecting the next to be 2.

This PR fixes this pattern, however this won't be watertight for the CAT
pool until we can order both on gas fee (priority) and nonce.

---------

Co-authored-by: Rootul Patel <rootulp@gmail.com>

v1.44.1-tm-v0.34.35

Toggle v1.44.1-tm-v0.34.35's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: remove go routines for RecheckTx (celestiaorg#1553)

Closes: celestiaorg#1552

v1.44.0-tm-v0.34.35

Toggle v1.44.0-tm-v0.34.35's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Typo fix Update adr-002-ipld-da-sampling.md (celestiaorg#1535)

## Description

Fix Typographical Errors in Function Descriptions

This pull request addresses and fixes critical typographical errors in
the descriptions of several functions that affect code clarity and
correctness.

#### Fixed Issues:

1. **Typo in "contex.Context"**:
- In the descriptions of the following functions:
`ValidateAvailability`, `RetrieveBlockData`, and `PutBlock`, the
reference to **"contex.Context"** has been corrected to
**"context.Context"**.
- **Importance**: This correction is crucial as the incorrect spelling
could lead to confusion or misinterpretation of the intended type,
especially for developers referencing or using these functions. Proper
naming ensures clarity, adherence to Go standards, and minimizes
potential errors or misunderstandings in documentation and code
navigation.

#### PR checklist

- [x] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments

---

**Please review and consider merging this fix. Thank you!**

v1.43.0-tm-v0.34.35

Toggle v1.43.0-tm-v0.34.35's commit message

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
feat: retrieves timeout propose and timeout commit dynamically per he…

…ight according to the app version (celestiaorg#1494)

The celestia-core portion of
[#3859](celestiaorg/celestia-app#3859)

---------

Co-authored-by: evan-forbes <evan.samuel.forbes@gmail.com>

v1.42.0-tm-v0.34.35

Toggle v1.42.0-tm-v0.34.35's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat(statesync): add app version to snapshot (celestiaorg#1477)

Part of celestiaorg/celestia-app#3818

v1.41.0-tm-v0.34.29

Toggle v1.41.0-tm-v0.34.29's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: mocha block sync (celestiaorg#1469)

Unblocks celestiaorg/celestia-app#3843

v1.40.1-tm-v0.34.29-rc0

Toggle v1.40.1-tm-v0.34.29-rc0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: DNS TTL not respected (celestiaorg#1442)

## Description

Fixes celestiaorg#1425 

## Testing

Testing DNS change is not really possible in unit tests so @smuu agreed
to help me test manually

v1.40.0-tm-v0.34.29

Toggle v1.40.0-tm-v0.34.29's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat(rpc): update tx status to return logs (celestiaorg#1459)

## Description

Part of celestiaorg#1454

v1.39.0-tm-v0.34.29

Toggle v1.39.0-tm-v0.34.29's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: metric for counting rejected transactions (port celestiaorg#1415)…

… (celestiaorg#1445)

Add counter to the block executor metrics :
- RejectedTransactions

Port of celestiaorg#1415

---------

Co-authored-by: Eoous <38656355+Eoous@users.noreply.github.com>
Co-authored-by: 0xEclair <38656355+0xEclair@users.noreply.github.com>
Co-authored-by: Rootul P <rootulp@gmail.com>
0