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

tendermint lite init and fix the proxy #970

Closed
ebuchman opened this issue Dec 13, 2017 · 5 comments
Closed

tendermint lite init and fix the proxy #970

ebuchman opened this issue Dec 13, 2017 · 5 comments
Labels
C:light Component: Light
Milestone

Comments

@ebuchman
Copy link
Contributor

Running the lite proxy requires an init step that's currently insecurely skipped.

Also some code is commented out to make it (insecurely) work without init

@zramsay
Copy link
Contributor

zramsay commented Jan 18, 2018

running tendermint lite i get WARNING (tendermint/rpc/lib): Please use fully formed listening addresses, including the tcp:// or unix:// prefix module=main

@zramsay zramsay removed the priority? label Feb 19, 2018
@ebuchman ebuchman added the C:light Component: Light label Feb 19, 2018
@greg-szabo greg-szabo added this to the launch milestone Feb 19, 2018
odeke-em added a commit that referenced this issue Mar 11, 2018
Noticed while investigating
#970

As reported by @zramsay, we'd get the warning
from tendermint/rpc/lib because we were passing in
scheme-less addresses, so by default use "tcp".

Also by default, "node" (nodeAddr) has been set to:
  "tcp://localhost:46657"
instead of the bare:
  "localhost:46657"

This change is just to clean up such warnings as
they spuriously would spook users for a package "lite"
that claims to be secure.
@odeke-em
Copy link
Contributor

Running the lite proxy requires an init step that's currently insecurely skipped.
Also some code is commented out to make it (insecurely) work without init

Could you please elaborate on what this means? That would be nice for easy pickup of the work by anyone such as me as well as new Tendermint coders i.e. that isn't always looking at the code, thank you!

@odeke-em
Copy link
Contributor

Okay I found some context for this issue:
a) Lite proxy requires an init step that's currently insecurely skipped

// XXX: total insecure hack to avoid `init`
fc, err := source.LatestCommit()
/* XXX
// this gets the most recent verified commit
fc, err := trust.LatestCommit()
if certerr.IsCommitNotFoundErr(err) {
return nil, errors.New("Please run init first to establish a root of trust")
}*/
if err != nil {
return nil, err
}

which was added in 11761d1

melekes pushed a commit that referenced this issue Mar 12, 2018
Noticed while investigating
#970

As reported by @zramsay, we'd get the warning
from tendermint/rpc/lib because we were passing in
scheme-less addresses, so by default use "tcp".

Also by default, "node" (nodeAddr) has been set to:
  "tcp://localhost:46657"
instead of the bare:
  "localhost:46657"

This change is just to clean up such warnings as
they spuriously would spook users for a package "lite"
that claims to be secure.
@odeke-em
Copy link
Contributor

@zramsay your concern in #970 (comment)

running tendermint lite i get WARNING (tendermint/rpc/lib): Please use fully formed listening addresses, including the tcp:// or unix:// prefix module=main

has been addressed in #1297

@jackzampolin
Copy link
Contributor

Closing this issue as addressed. Please reopen if I'm wrong.

Cashmaney pushed a commit to scrtlabs/tendermint that referenced this issue Aug 2, 2023
…ackport tendermint#865) (tendermint#970)

* fix: avoid recursive call after rename to (*PeerState).MarshalJSON (tendermint#865)

* avoid recursive call after rename to (*PeerState).MarshalJSON

* add test

* add change doc

* explain for nolint

* fix lint

* fix golangci-lint to v1.52.2

* fix golangci-lint to v1.52.2

* Revert "fix golangci-lint to v1.52.2"

This reverts commit 598a9ef4c86fc29cf038251676c33a222217826c.

* Revert "fix golangci-lint to v1.52.2"

This reverts commit a8aad121e27382813e95b1911b1b560c62e1c7c3.

* Reintroduced `cmtjson`

* Avoid copying Mutex

* Avoid copying Mutex -- 2nd try, more succint

* Update .changelog/unreleased/bug-fixes/865-fix-peerstate-marshaljson.md

* Update consensus/reactor_test.go

---------

Co-authored-by: Sergio Mena <sergio@informal.systems>
(cherry picked from commit f6ea091)

# Conflicts:
#	consensus/reactor_test.go

* Revert "fix: avoid recursive call after rename to (*PeerState).MarshalJSON (tendermint#865)"

* fix: avoid recursive call after rename to (*PeerState).MarshalJSON (tendermint#865)

* avoid recursive call after rename to (*PeerState).MarshalJSON

* add test

* add change doc

* explain for nolint

* fix lint

* fix golangci-lint to v1.52.2

* fix golangci-lint to v1.52.2

* Revert "fix golangci-lint to v1.52.2"

This reverts commit 598a9ef4c86fc29cf038251676c33a222217826c.

* Revert "fix golangci-lint to v1.52.2"

This reverts commit a8aad121e27382813e95b1911b1b560c62e1c7c3.

* Reintroduced `cmtjson`

* Avoid copying Mutex

* Avoid copying Mutex -- 2nd try, more succint

* Update .changelog/unreleased/bug-fixes/865-fix-peerstate-marshaljson.md

* Update consensus/reactor_test.go

---------

Co-authored-by: Sergio Mena <sergio@informal.systems>

---------

Co-authored-by: mmsqe <mavis@crypto.com>
Co-authored-by: Sergio Mena <sergio@informal.systems>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:light Component: Light
Projects
None yet
Development

No branches or pull requests

5 participants