hacash / service Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
(1) What does this line mean:
amount [int] The amount of bitcoins to be paid, in units of "satoshi" and "satoshi" (0.00000001 bitcoins); for example, if you transfer 10 bitcoins, you will pass "1000000000", and if you transfer 0.01 bitcoins, you will pass "1000000"; the system does not Bitcoin units below 1 satoshi are supported.
(2) What private key to be used to transfer using API: main_prikey:
http://rpcapi.hacash.org/create?action=value_transfer_tx&main_prikey=8D969EEF6ECAD3C29A3A629280E686CF0C3F5D5A86AFF3CA12020C923ADC6C92&fee=0.0001&
And
If Hacash then how can we transfer Bitcoin to the address without knowing its key | else if Bitcoin how does 'a bitcoin' transferred into the Hacash Chain? Since the BTC is on a different chain?
RE : DeprecatedApiService_Data_Races_Sep-21-2021.txt
Summary of Data Races associated with [*DeprecatedApiService]
Text file of instrumented Diamond Miner [DiamondMiner_log_Sep_21_2021.txt], available via Github Gist [https://gist.github.com/dwymi02/95140687b566efa22939dec3cd14dd6d]
The instrumented binary was built from refreshed code, dated Sep-21-2021.
The source code repository was wiped clean and "git clone ..." was used to create the updated code base.
The instrumented code was built with "-race", e.g., "go build -race".
The directory [hacash_mainnet_data/] was completely removed, to allow the Hacash blockchain to be built from scratch, also allowing for additional Data Races to be uncovered, if any.
In searching for Data Races I tried to group them based on specific Hacash components.
Grep was used to search for known Hacash components, following is a list of potential Data Races, based on Hacash components:
For each Hacash component I will list the specific Data Race.
When the current code does not match what was previously built, a [*** NOTE ***] will be included
In the event the stack trace that is too lengthy, the results will be truncated.
If it is necessary, the full log will be provided, as needed.
For the specific Read and Write that are involved in the Data Race, the [<===] will be used to identify where the specific Read/Write occurred, based on current source available ...
Once the Data Race has been documented, an issue will be opened on Github.
I will leave it to your team to decide how the Data Race is to be handled.
You can opt to fix the Data Race or simply close the issue. as you so choose.
This decision I leave with you and your team ...
=-=-=-=-=-=-=-=-=-=-=-=-=-
Data Races associated with [*DeprecatedApiService]
DeprecatedApiService Data Race # 1:
sync blocks from peer hacash_beijing(182.92.163.225:3337): 36001... got blocks: 36001 ~ 37000, inserting... OK
sync blocks from peer hacash_beijing(182.92.163.225:3337): 37001... got blocks: 37001 ~ 38000, inserting... ==================
WARNING: DATA RACE
Read at 0x00c420194f30 by goroutine 57:
service/deprecated.(*DeprecatedApiService).dealHome()
service/deprecated/home.go:131 +0x1851
service/deprecated.(*DeprecatedApiService).(service/deprecated.dealHome)-fm()
service/deprecated/http.go:82 +0x5f
net/http.HandlerFunc.ServeHTTP()
/opt/go/src/net/http/server.go:1947 +0x51
net/http.(*ServeMux).ServeHTTP()
/opt/go/src/net/http/server.go:2340 +0x9f
net/http.serverHandler.ServeHTTP()
/opt/go/src/net/http/server.go:2697 +0xb9
net/http.(*conn).serve()
/opt/go/src/net/http/server.go:1830 +0x7dc
Previous write at 0x00c420194f30 by goroutine 40:
miner/memtxpool.(*TxGroup).Clean()
miner/memtxpool/group.go:36 +0x7f
miner/memtxpool.(*MemTxPool).loop()
miner/memtxpool/loop.go:18 +0x336
Read:
[service/deprecated/home.go:131]
[service/deprecated.(*DeprecatedApiService).dealHome()]
...
...
...
// 交易池信息
txpool := api.txpool
if pool, ok := txpool.(*memtxpool.MemTxPool); ok {
diamonds := ""
hd := pool.GetDiamondCreateTxGroup().Head
for i := 0; i < 200; i++ {
if hd != nil {
if as := hd.GetTx().GetActions(); len(as) > 0 {
if as[0].Kind() == 4 {
if dia, ok := as[0].(*actions.Action_4_DiamondCreate); ok {
if len(diamonds) > 0 { <=== Read
diamonds += " / " + string(dia.Diamond)
} else {
diamonds = string(dia.Diamond)
}
}
}
}
hd = hd.GetNext()
} else {
break
}
}
plcount, plsize := pool.GetTotalCount()
responseStrAry = append(responseStrAry, fmt.Sprintf(
"txpool length: %d, size: %fkb, diamond: %s",
plcount,
float64(plsize)/1024,
diamonds,
))
}
...
...
...
Write:
[miner/memtxpool/group.go:36]
func (g *TxGroup) Clean() {
g.itemsLocker.Lock()
defer g.itemsLocker.Unlock()
g.Head = nil <== Write
g.Tail = nil
g.items = make(map[string]*TxItem)
g.Count = 0
}
=-=-=-=-=-=-=-=-=-=-=-=-=-
Hello
I am going to use quoteFee api in HaCash.
How to set url?
I set url to https://wallet.hacash.org/api/quote_fee but not found.
I have 2 addresses with enough coin to be in the top 100 list, however only 1 of the addresses is there. The other is not. I have not transacted for a very long time, so its not as if the blockchain just needs to catch up. Seems like a bug.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.