Comments (20)
So do you mean checking the VotingBox
, WaitingBox
, and ReservedBox
every 2 minutes? I think it's a good idea since the the VotingResult
does not have to expire in "exactly" 2 minutes. A drawback could be a votingResult
waiting for 3min59s before expiring to next box
from sebak.
- save current state(snapshot) and check validity(uniqueness of hash in boxes)
- after 2 min, compare to previous snapshot and find target to move the other box
- Repeat above
In the worst case, some ballot may take 4 min to move WaitingBox
to ReservedBox
. But this is not that big a deal.
from sebak.
If time is recorded, you have to check how long does it take periodically.
I figure, using time.ticker is better.
from sebak.
Aha I agree. I was thinking about other ways too
from sebak.
Why are the Message.Hash
es sorted in BallotBox
? Will it be replaced by a combining function
?
Line 380 in 3cf6918
from sebak.
@leejames00 Would you please let me know in detail about combining function
?
from sebak.
I was confused on why the Message.Hash
es need to be sorted.
Because in SCP, the transaction sets are merged (by a combining function) into one message(or hash)... so if a combining function is implemented, there would be no need for sorting
from sebak.
Aha, there is no combining function
in sebak yet. All transactions are handled as they are.
from sebak.
and also I was thinking about timeouts to VotingResult
-- if the VotingResult
should be moved from VotingBox
to ReservedBox
after 2minutes, I think the message hash should be mapped with time
for example,
type BallotBox struct {
sebakcommon.SafeLock
Hashes map[hash]time.Time
}
or if there are other suggestions on implementing timeouts please comment :)
from sebak.
@leejames00 I don't think I need to record time. After the message is moved to the ReservedBox
, we don't have to check the time data in the message.
from sebak.
@astonshnam but after 2 minutes in VotingBox
, it should be moved to ReservedBox
. How do you check that the VotingResult
is expired?
from sebak.
@leejames00 However, a time check is only needed within the VotingBox
. It is unnecessary to change the structure of the BallotBox
because of the process in the VotingBox
. I want to think about other ways.
from sebak.
What do you think about changing BallotBox
to interface type?
from sebak.
Node
is also an interface type. As follows..
type Node interface {
Address() string
Keypair() *keypair.Full
SetKeypair(*keypair.Full)
Alias() string
SetAlias(string)
Endpoint() *Endpoint
Equal(Node) bool
DeepEqual(Node) bool
GetValidators() map[string]*Validator
AddValidators(validators ...*Validator) error
HasValidators(string) bool
RemoveValidators(validators ...*Validator) error
Serialize() ([]byte, error)
}
from sebak.
no. It does not seem to be a good way. Using the interface does not solve this problem. :(
from sebak.
I figure, we need the independent struct BoxManager
or ResultManager
This struct can handle Results
and Boxes
validation, move hashes each other, etc...
We can discuss about it tomorrow in detail :)
from sebak.
I have an idea. I figure, if ticker is attached every ballot, then it is not that good for performance. So, It is better to check every 2 minute by saving snapshot. @astonshnam @leejames00
from sebak.
@leejames00 You fully understand my word :)
from sebak.
Maybe I don't understand this issue, Is it(gist) right?
gist: https://gist.github.com/anarcher/b8e895f9793b87c1012f101f1bea6af7
from sebak.
@anarcher @astonshnam
I figure it is better to talk about this issue ASAP. Cause we did duplicated works :)
fyi @spikeekips
from sebak.
Related Issues (20)
- create_account operation is not always included in the get operations for transaction API endpoint HOT 2
- Log rotating HTTP log HOT 4
- Change key value of NewBlockOperationFrozenLinkedKey
- [Proposal] API endpoint to get operation details by hash HOT 1
- Retry when ballot sending fails HOT 1
- Consensus stuck after recovering enough validators HOT 2
- Memo in Payable Operations
- Broken dump from jsonrpc HOT 2
- Initial validation process for BlockOpertion takes too long
- Node discovered, but failed to connect
- fetcher add tx to si.Bts repeatedly
- Watcher Error: "unfreezing must be generated after the unfreezing request" HOT 5
- How to handle the stopped consensus for a long time HOT 6
- Block is missing, starting sebak is hang
- Use Server Sent Event for integration tests
- Separating API parts from SEBAK HOT 1
- read udp error in TimeSync HOT 6
- Check the process of signing an expired ballot in detail
- Requesting operations for an account sometimes returns a different amount of results for the same request
- Change NTP to Secure NTP
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sebak.