Skip to content

Instantly share code, notes, and snippets.

View jaekwon's full-sized avatar

Jae Kwon jaekwon

View GitHub Profile
balance = 1.0 # amount of reserve tokens
supply = 1000.0 # amount of smart tokens
crr = 0.001 # arbitrary reserve ratio
def printInfo():
price = computePrice()
print "balance", balance, "supply", supply, "price", price
def computePrice():
return balance / (supply * crr)
@jaekwon
jaekwon / golangcapabilities.md
Last active December 16, 2017 21:04
Toward a capabilities-based security model for Golang
```
sdk.ChainDecorators(
...
customTxParseDecorator,
auth.Decorator(perms.SetFn("AUTH")),
coins.Decorator(perms.Get("AUTH"), perms.SetFn("COINS")), // set ctx.Set(coinstore.coinsPerm, coinstore.NewCoinStore(ms.GetKVStore("main")))
fees.Decorator(perms.Get("COINS")) // ctx.Get(coinstore.coinsPerm).(CoinStore),
sketchy.Decorator, // doesn't have authKey
...
.WithHandler(
diff --git a/codec.go b/codec.go
index f3f2eaf..35a6c3a 100644
--- a/codec.go
+++ b/codec.go
@@ -219,7 +219,7 @@ func (cdc *Codec) getTypeInfoFromPrefix_rlock(iinfo *TypeInfo, pb PrefixBytes) (
return
}
if len(infos) > 1 {
- err = fmt.Errorf("Conflicting concrete types registered for %X: e.g. %v and %v.", pb)
+ err = fmt.Errorf("Conflicting concrete types registered for %X: e.g. %v and %v.", pb, infos[0].Type, infos[1].Type)
STACK:
%v goroutine 22 [running]:
command-line-arguments.timeoutWaitGroup(0xc4200f6b40, 0x7, 0xc4201d1180, 0xc420058bc0, 0x7, 0x7)
/gocode/src/github.com/tendermint/tendermint/consensus/reactor_test.go:416 +0x4b8
command-line-arguments.waitForBlockWithUpdatedValsAndValidateIt(0xc4200f6b40, 0x7, 0xc420af8d80, 0xc420adc780, 0x7, 0x7, 0xc420058bc0, 0x7, 0x7)
/gocode/src/github.com/tendermint/tendermint/consensus/reactor_test.go:347 +0xe8
command-line-arguments.TestReactorValidatorSetChanges(0xc4200f6b40)
/gocode/src/github.com/tendermint/tendermint/consensus/reactor_test.go:231 +0x710
testing.tRunner(0xc4200f6b40, 0x18aa860)

Summary

  • Agree on a plan to set up a testnet using the Cosmos SDK v0.34.0 release, along with mainnet conditions, plus transfer enablement and increased block size, as a testing ground.

  • After this proposal is passed and after successful testing, and after the software Git hash for v0.34.0 has been finalized, conduct a second proposal which includes the specific Git hash, using expedited rules to determine acceptance.

function handleConnCloseTry()
  {state, version, counterpartyIdentifier, rootOfTrust} = Get(identifier)
  assert(state == OPEN)
  assert(identifierCounterparty == counterpartyIdentifier)
  assert(verify(roofOfTrust, proofInit, (counterpartyIdentifier, TRYCLOSE)))
  state = CLOSED
  Set(identifier, (state, version, counterpartyIdentifier, rootOfTrust))
@jaekwon
jaekwon / amino_proto3_proposal_1.md
Last active December 20, 2019 02:54
Jae's Amino interface/proto3-compat proposal (version 1)

Proposed solution:

  • a Go interface is encoded as a top-level Proto3 message. In the example below, the Animal go interface is represented by a Animal proto3 message.
type Animal interface
type Dog struct
type Cat struct
type House struct {
(capital) One is the *meta-Cosmos
. the *meta-Cosmos includes our Cosmos, our universe, all past/present/future.
. one is a local construct of the Cosmos.
. there are many truths all enmeshed with each other.
. the whole Truth cannot be seen.
. each one has their unique truth.
. only they (the "one"s in the statement above) can say their truths.
. only the One (or They) can say the Truth.
. every one should be encouraged to speak their truth.
. it's ok to claim that something is True, if you really believe it.
@jaekwon
jaekwon / jaekwon_aib.md
Last active December 9, 2021 04:58
jaekwon_aib

Is Jae "stepping down from Cosmos"?

No, that's FUD, and probably intentional misrepresentation, or perhaps a mistake in translation.

Jae & CEO role of Tendermint Inc.

The goal is to eliminate the role of the CEO for Tendermint Inc, so it isn’t correct to say that Jae is “stepping down”. Rather, the role is being eliminated to decentralize Tendermint Inc. and implement checks and balances from within.

Tendermint Inc. organizational structure today comprises a sole decision factor, which is Jae Kwon, in his role of company's CEO. Jae and company has decided that moving forward the company will adopt a more decentralized corporate “Process” that is being developed along with the Virgo project.