Giter Club home page Giter Club logo

litewallet's People

Contributors

ewagmig avatar xuyz avatar yangchuang64 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

litewallet's Issues

cannot encode unregistered concrete type sdksource.MsgSend when reconstructing over cosmos-sdk v0.35.0

It is weird that cosmos core team decided to create internal package under the x/bank module. It makes the reconstruction over cosmos v0.35.0 difficult due to the reason internal package not allowed to use with Golang importing policy.
Some local code migration have been done into the branch dev-cosmosv35.0, however, there are still consequences as what the internal package use has brought.
One issue was raised to the cosmos community, resulting in some brief feedback following closure. use of internal package github.com/cosmos/cosmos-sdk/x/bank/internal/types not allowed
I have no idea about why they do in this way.
However, the reconstruction should be continued with more efforts from our side:

  • cannot encode unregistered concrete type sdksource.MsgSend

This could be fixed only under the litewallet repo with local efforts.

Approach to make wallet more secured

It's not so complicated that to make the seed or the salt with an original plaintext password. However, this could make the wallet not so secured because fo the source code open to community. There could be some security threat underline. So there should be an approach to make the wallet more secured.

new interface for querying tnx details via tags flag

It is an enhancement for current querying process for the detailed Tnx, this feature is initiated from Frontend user with receipt.
Currently, this part is resolved from block data via Qmoon. We think there is some trade-off here.
New interface should be designed here to query Tnx with tags from cosmos networks.

Provide the link for the dapp

latest dapp link should be provided in the readme of the project, so everyone access the repo could download the dapps to make full use of it.

#Feat: ETH 2.0 access

#feat: ETH 2.0 access
The litewallet should take some step into the most advanced blockchains in the industry, e.g. the ETH 2.0 beacon chain.
There could be some beacon chain nodes available in Infura or self established one.
Public apis should be exposed outside.

连续转账奔溃

06-06 16:38:16.306 E/Go (27757): panic: runtime error: invalid memory address or nil pointer dereference
06-06 16:38:16.306 E/Go (27757): [signal SIGSEGV: segmentation violation code=0x1 addr=0x4 pc=0xcae91e5c]
06-06 16:38:16.306 E/Go (27757):
06-06 16:38:16.306 E/Go (27757): goroutine 17 [running, locked to thread]:
06-06 16:38:16.306 E/GoLog (27757): panic: runtime error: invalid memory address or nil pointer dereference
06-06 16:38:16.306 E/GoLog (27757): [signal SIGSEGV: segmentation violation code=0x1 addr=0x4 pc=0xcae91e5c]
06-06 16:38:16.306 E/Go (27757): github.com/QOSGroup/litewallet/litewallet/eth.TransferETH(0x99eb02d0, 0x49, 0x99c78300,
9a03e090, 0x2a, ...)
06-06 16:38:16.306 E/Go (27757): /Users/skydevin/go/src/github.com/QOSGroup/litewallet/litewallet/eth/transfer.go:30 +0
06-06 16:38:16.306 E/Go (27757): github.com/QOSGroup/litewallet/litewallet.EthTransferETH(0x99eb02d0, 0x49, 0x99c78300, 0
a03e090, 0x2a, ...)
06-06 16:38:16.307 E/Go (27757): /Users/skydevin/go/src/github.com/QOSGroup/litewallet/litewallet/cshare.go:319 +0x94
06-06 16:38:16.307 E/Go (27757): main.proxylitewallet__EthTransferETH(0xd040b2c0, 0x49, 0xd046d700, 0x3b, 0xd08e64f8, 0x1
06-06 16:38:16.307 E/Go (27757): /tmp/gomobile-work-901923068/src/gobind/go_litewalletmain.go:367 +0x180
06-06 16:38:16.307 E/Go (27757): main._cgoexpwrap_7acd3932b608_proxylitewallet__EthTransferETH(0xd040b2c0, 0x49, 0xd046d7
, 0xb9f2a0c0, 0x2a, ...)
06-06 16:38:16.307 E/Go (27757): _cgo_gotypes.go:590 +0xcc

Break down all the Tnx generation locally within SDK

To collaborate with the enhancement for the comming #2 , some SDK code should be added to support the splitting including below parts:

  1. package sdksource, besides Tnx Transfer,
  • Delegate
  • UnbondingDelegation
  • WithdrawRewards
    new Tnx designed if any
  1. package slim for QOS part,
  • Transfer
    current interfaces from JianQian, if needed ,should be migrated too @ms8922

Co-operation with Qmoon node discovery function

As litewallet SDK itself, specific function on round robin selection is to be designed.
The draft code could be followed as below pattern if no further endurance:

node discovery with round-robin algorithm
var i = 0
var servers = []string{"127.0.0.1:8000", "127.0.0.1:8001", "127.0.0.1:8003"}

// Balance returns one of the servers based using round-robin algorithm
func Balance() string {
	server := servers[i]
	i++

	// it means that we reached the end of servers
	// and we need to reset the counter and start
	// from the beginning
	if i >= len(servers) {
		i = 0
	}
	return server
}


func main() {
	// requests loop
	for i := 0; i < 20; i++ {
		fmt.Println(Balance())
	}
}

Feat: generate signed tx before broadcast to chain

重构当前广播交易模式以支持REST API接口 #QOSGroup/qmoon#122
当前:build -> sign -> send via RPC
Feat:build -> sign -> send via REST
litewallet所做的是前两步build -> sign,前端集成HTTP API接口调用将签名的交易广播出去。类似的功能在后台充值提现中有实现https://github.com/cosmos/cosmos-sdk/commit/b1dce76c9684e3b6d0c7030157bb0cb5ff3be9b9
剩余delegate,unbondingdelegation,withdraw与前述版本一致;
新增redelegate, .etc

#feat: mnemonic_language support

For the diversity of the wallet application in around the world, there are some requirements on the diversity of the mnemonic language, here are the lists:

  1. Chinese with both simplified and traditional one;
  2. Korean
  3. English

QOS transfer funcs with multiple coin type in a single Transfer Tx

When one single Tx with multi-coins is to be generated within an ITx in litewallet/slim pack for QOS transfer scenario.
The ParseCoins method is not compatible with latest code.
Here is origin code from QOSGroup/qos :

// Parse QOS and QSCs from string
// str example : 100qos,100qstar
func ParseCoins(str string) (btypes.BigInt, QSCs, error) {
	if len(str) == 0 {
		return btypes.ZeroInt(), QSCs{}, nil
	}
	reDnm := `[[:alpha:]][[:alnum:]]{2,15}`
	reAmt := `[[:digit:]]+`
	reSpc := `[[:space:]]*`
	reCoin := regexp.MustCompile(fmt.Sprintf(`^(%s)%s(%s)$`, reAmt, reSpc, reDnm))

	arr := strings.Split(str, ",")
	qos := btypes.ZeroInt()
	qscs := QSCs{}
	for _, q := range arr {
		coin := reCoin.FindStringSubmatch(q)
		if len(coin) != 3 {
			return btypes.ZeroInt(), nil, fmt.Errorf("coins str: %s parse faild", q)
		}
		coin[2] = strings.TrimSpace(coin[2])
		amount, err := strconv.ParseInt(strings.TrimSpace(coin[1]), 10, 64)
		if err != nil {
			return btypes.ZeroInt(), nil, err
		}
		if strings.ToLower(coin[2]) == "qos" {
			qos = btypes.NewInt(amount)
		} else {
			qscs = append(qscs, &QSC{
				coin[2],
				btypes.NewInt(amount),
			})
		}

	}

	return qos, qscs, nil
}

The code in current patch is too old and need to be updated immediately!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.