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

Proposer Is Creating Collation For Every Received Transaction #277

Closed
prestonvanloon opened this issue Jul 14, 2018 · 3 comments · Fixed by #305
Closed

Proposer Is Creating Collation For Every Received Transaction #277

prestonvanloon opened this issue Jul 14, 2018 · 3 comments · Fixed by #305
Assignees
Labels
Bug Something isn't working
Milestone

Comments

@prestonvanloon
Copy link
Member

This should be batching transactions into a transaction pool.

https://github.com/prysmaticlabs/geth-sharding/blob/b883562e12344c7eeab25b5fb24133fc820b6f05/sharding/proposer/service.go#L80-L101

Please wait for #222 to be merged as there will be some changes to the p2p message types.

@prestonvanloon prestonvanloon added the Bug Something isn't working label Jul 14, 2018
@prestonvanloon prestonvanloon added this to the Ruby milestone Jul 14, 2018
@prestonvanloon
Copy link
Member Author

Maybe depends on #161. @terenc3t can you confirm?

@nisdas
Copy link
Member

nisdas commented Jul 15, 2018

It looks like it happens because everytime a transaction is received in the channel a collation is proposed. One solution is to make the channel buffered and have a condition

if len(p.msgchan) == size {

collationtx := make( []types.Transaction,0,len(p.msgchan)) 

for (i  = 0; i < len(p.msgchan) ; i++ ){
tx := <- p.msgchan
collationntx = append(collationtx,tx...)
}

err := p.createCollation(p.ctx, collationtx)
}

where size would be the number of transactions in the collation

@terencechain terencechain self-assigned this Jul 15, 2018
@rauljordan
Copy link
Contributor

@nisdas can you open a PR for this and try out your suggestion?

@nisdas nisdas mentioned this issue Jul 21, 2018
4 tasks
Redidacove pushed a commit to Redidacove/prysm that referenced this issue Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants