blockchain: Reorg reactor (#3561)
* go routines in blockchain reactor
* Added reference to the go routine diagram
* Initial commit
* cleanup
* Undo testing_logger change, committed by mistake
* Fix the test loggers
* pulled some fsm code into pool.go
* added pool tests
* changes to the design
added block requests under peer
moved the request trigger in the reactor poolRoutine, triggered now by a ticker
in general moved everything required for making block requests smarter in the poolRoutine
added a simple map of heights to keep track of what will need to be requested next
added a few more tests
* send errors to FSM in a different channel than blocks
send errors (RemovePeer) from switch on a different channel than the
one receiving blocks
renamed channels
added more pool tests
* more pool tests
* lint errors
* more tests
* more tests
* switch fast sync to new implementation
* fixed data race in tests
* cleanup
* finished fsm tests
* address golangci comments :)
* address golangci comments :)
* Added timeout on next block needed to advance
* updating docs and cleanup
* fix issue in test from previous cleanup
* cleanup
* Added termination scenarios, tests and more cleanup
* small fixes to adr, comments and cleanup
* Fix bug in sendRequest()
If we tried to send a request to a peer not present in the switch, a
missing continue statement caused the request to be blackholed in a peer
that was removed and never retried.
While this bug was manifesting, the reactor kept asking for other
blocks that would be stored and never consumed. Added the number of
unconsumed blocks in the math for requesting blocks ahead of current
processing height so eventually there will be no more blocks requested
until the already received ones are consumed.
* remove bpPeer's didTimeout field
* Use distinct err codes for peer timeout and FSM timeouts
* Don't allow peers to update with lower height
* review comments from Ethan and Zarko
* some cleanup, renaming, comments
* Move block execution in separate goroutine
* Remove pool's numPending
* review comments
* fix lint, remove old blockchain reactor and duplicates in fsm tests
* small reorg around peer after review comments
* add the reactor spec
* verify block only once
* review comments
* change to int for max number of pending requests
* cleanup and godoc
* Add configuration flag fast sync version
* golangci fixes
* fix config template
* move both reactor versions under blockchain
* cleanup, golint, renaming stuff
* updated documentation, fixed more golint warnings
* integrate with behavior package
* sync with master
* gofmt
* add changelog_pending entry
* move to improvments
* suggestion to changelog entry
2019-07-23 10:58:52 +02:00
|
|
|
package store
|
2014-08-10 16:35:08 -07:00
|
|
|
|
|
|
|
import (
|
2014-12-09 18:49:04 -08:00
|
|
|
"fmt"
|
2016-12-20 00:45:45 -05:00
|
|
|
"sync"
|
2014-08-10 16:35:08 -07:00
|
|
|
|
2019-08-08 12:31:13 +02:00
|
|
|
"github.com/pkg/errors"
|
|
|
|
|
2019-07-31 11:34:17 +02:00
|
|
|
dbm "github.com/tendermint/tm-db"
|
2018-01-03 11:29:19 +01:00
|
|
|
|
|
|
|
"github.com/tendermint/tendermint/types"
|
2014-08-10 16:35:08 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
/*
|
2017-10-04 15:04:23 -04:00
|
|
|
BlockStore is a simple low level store for blocks.
|
2014-12-23 01:35:54 -08:00
|
|
|
|
|
|
|
There are three types of information stored:
|
|
|
|
- BlockMeta: Meta information about each block
|
|
|
|
- Block part: Parts of each block, aggregated w/ PartSet
|
2016-04-02 09:10:16 -07:00
|
|
|
- Commit: The commit part of each block, for gossiping precommit votes
|
2014-12-23 01:35:54 -08:00
|
|
|
|
2015-06-05 14:15:40 -07:00
|
|
|
Currently the precommit signatures are duplicated in the Block parts as
|
2016-04-02 09:10:16 -07:00
|
|
|
well as the Commit. In the future this may change, perhaps by moving
|
2017-10-04 15:04:23 -04:00
|
|
|
the Commit data outside the Block. (TODO)
|
2015-06-17 00:16:58 -04:00
|
|
|
|
2017-10-23 19:46:14 -04:00
|
|
|
// NOTE: BlockStore methods will panic if they encounter errors
|
|
|
|
// deserializing loaded data, indicating probable corruption on disk.
|
2014-08-10 16:35:08 -07:00
|
|
|
*/
|
|
|
|
type BlockStore struct {
|
2016-12-20 00:45:45 -05:00
|
|
|
db dbm.DB
|
|
|
|
|
2016-12-22 21:51:58 -05:00
|
|
|
mtx sync.RWMutex
|
2017-12-01 19:04:53 -06:00
|
|
|
height int64
|
2014-08-10 16:35:08 -07:00
|
|
|
}
|
|
|
|
|
2017-10-05 17:03:01 -06:00
|
|
|
// NewBlockStore returns a new BlockStore with the given DB,
|
|
|
|
// initialized to the last height that was committed to the DB.
|
2015-01-14 20:34:53 -08:00
|
|
|
func NewBlockStore(db dbm.DB) *BlockStore {
|
2014-12-23 01:35:54 -08:00
|
|
|
bsjson := LoadBlockStoreStateJSON(db)
|
2014-08-10 16:35:08 -07:00
|
|
|
return &BlockStore{
|
|
|
|
height: bsjson.Height,
|
|
|
|
db: db,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-04 15:04:23 -04:00
|
|
|
// Height returns the last known contiguous block height.
|
2017-12-01 19:04:53 -06:00
|
|
|
func (bs *BlockStore) Height() int64 {
|
2016-12-22 21:51:58 -05:00
|
|
|
bs.mtx.RLock()
|
|
|
|
defer bs.mtx.RUnlock()
|
2014-08-10 16:35:08 -07:00
|
|
|
return bs.height
|
|
|
|
}
|
|
|
|
|
2017-10-04 15:04:23 -04:00
|
|
|
// LoadBlock returns the block with the given height.
|
|
|
|
// If no block is found for that height, it returns nil.
|
2017-12-01 19:04:53 -06:00
|
|
|
func (bs *BlockStore) LoadBlock(height int64) *types.Block {
|
2018-04-06 13:46:40 -07:00
|
|
|
var blockMeta = bs.LoadBlockMeta(height)
|
|
|
|
if blockMeta == nil {
|
2018-04-05 05:17:43 -07:00
|
|
|
return nil
|
|
|
|
}
|
2018-04-03 07:03:08 -07:00
|
|
|
|
2018-04-05 05:17:43 -07:00
|
|
|
var block = new(types.Block)
|
2018-04-03 07:03:08 -07:00
|
|
|
buf := []byte{}
|
2017-02-14 15:33:14 -05:00
|
|
|
for i := 0; i < blockMeta.BlockID.PartsHeader.Total; i++ {
|
2014-11-01 04:04:58 -07:00
|
|
|
part := bs.LoadBlockPart(height, i)
|
2018-04-03 07:03:08 -07:00
|
|
|
buf = append(buf, part.Bytes...)
|
2014-11-01 04:04:58 -07:00
|
|
|
}
|
2018-10-25 03:34:01 +02:00
|
|
|
err := cdc.UnmarshalBinaryLengthPrefixed(buf, block)
|
2014-10-18 01:42:33 -07:00
|
|
|
if err != nil {
|
2018-04-05 05:17:43 -07:00
|
|
|
// NOTE: The existence of meta should imply the existence of the
|
|
|
|
// block. So, make sure meta is only saved after blocks are saved.
|
2019-08-08 12:31:13 +02:00
|
|
|
panic(errors.Wrap(err, "Error reading block"))
|
2014-10-18 01:42:33 -07:00
|
|
|
}
|
|
|
|
return block
|
2014-08-10 16:35:08 -07:00
|
|
|
}
|
|
|
|
|
2017-10-04 15:04:23 -04:00
|
|
|
// LoadBlockPart returns the Part at the given index
|
|
|
|
// from the block at the given height.
|
|
|
|
// If no part is found for the given height and index, it returns nil.
|
2017-12-01 19:04:53 -06:00
|
|
|
func (bs *BlockStore) LoadBlockPart(height int64, index int) *types.Part {
|
2018-04-05 05:17:43 -07:00
|
|
|
var part = new(types.Part)
|
2018-04-03 07:03:08 -07:00
|
|
|
bz := bs.db.Get(calcBlockPartKey(height, index))
|
2018-04-05 05:17:43 -07:00
|
|
|
if len(bz) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
2018-04-03 07:03:08 -07:00
|
|
|
err := cdc.UnmarshalBinaryBare(bz, part)
|
2014-11-01 04:04:58 -07:00
|
|
|
if err != nil {
|
2019-08-08 12:31:13 +02:00
|
|
|
panic(errors.Wrap(err, "Error reading block part"))
|
2014-11-01 04:04:58 -07:00
|
|
|
}
|
|
|
|
return part
|
|
|
|
}
|
|
|
|
|
2017-10-04 15:04:23 -04:00
|
|
|
// LoadBlockMeta returns the BlockMeta for the given height.
|
|
|
|
// If no block is found for the given height, it returns nil.
|
2017-12-01 19:04:53 -06:00
|
|
|
func (bs *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta {
|
2018-04-05 05:17:43 -07:00
|
|
|
var blockMeta = new(types.BlockMeta)
|
2018-04-03 07:03:08 -07:00
|
|
|
bz := bs.db.Get(calcBlockMetaKey(height))
|
2018-04-05 05:17:43 -07:00
|
|
|
if len(bz) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
2018-04-03 07:03:08 -07:00
|
|
|
err := cdc.UnmarshalBinaryBare(bz, blockMeta)
|
2014-11-01 22:42:04 -07:00
|
|
|
if err != nil {
|
2019-08-08 12:31:13 +02:00
|
|
|
panic(errors.Wrap(err, "Error reading block meta"))
|
2014-11-01 22:42:04 -07:00
|
|
|
}
|
2017-02-14 15:33:14 -05:00
|
|
|
return blockMeta
|
2014-11-01 22:42:04 -07:00
|
|
|
}
|
|
|
|
|
2017-10-04 15:04:23 -04:00
|
|
|
// LoadBlockCommit returns the Commit for the given height.
|
|
|
|
// This commit consists of the +2/3 and other Precommit-votes for block at `height`,
|
|
|
|
// and it comes from the block.LastCommit for `height+1`.
|
|
|
|
// If no commit is found for the given height, it returns nil.
|
2017-12-01 19:04:53 -06:00
|
|
|
func (bs *BlockStore) LoadBlockCommit(height int64) *types.Commit {
|
2018-04-05 05:17:43 -07:00
|
|
|
var commit = new(types.Commit)
|
2018-04-03 07:03:08 -07:00
|
|
|
bz := bs.db.Get(calcBlockCommitKey(height))
|
2018-04-05 05:17:43 -07:00
|
|
|
if len(bz) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
2018-04-03 07:03:08 -07:00
|
|
|
err := cdc.UnmarshalBinaryBare(bz, commit)
|
2014-11-01 04:04:58 -07:00
|
|
|
if err != nil {
|
2019-08-08 12:31:13 +02:00
|
|
|
panic(errors.Wrap(err, "Error reading block commit"))
|
2014-11-01 04:04:58 -07:00
|
|
|
}
|
2016-04-02 09:10:16 -07:00
|
|
|
return commit
|
2014-11-01 04:04:58 -07:00
|
|
|
}
|
|
|
|
|
2017-10-04 15:04:23 -04:00
|
|
|
// LoadSeenCommit returns the locally seen Commit for the given height.
|
|
|
|
// This is useful when we've seen a commit, but there has not yet been
|
|
|
|
// a new block at `height + 1` that includes this commit in its block.LastCommit.
|
2017-12-01 19:04:53 -06:00
|
|
|
func (bs *BlockStore) LoadSeenCommit(height int64) *types.Commit {
|
2018-04-05 05:17:43 -07:00
|
|
|
var commit = new(types.Commit)
|
2018-04-03 07:03:08 -07:00
|
|
|
bz := bs.db.Get(calcSeenCommitKey(height))
|
2018-04-05 05:17:43 -07:00
|
|
|
if len(bz) == 0 {
|
|
|
|
return nil
|
|
|
|
}
|
2018-04-03 07:03:08 -07:00
|
|
|
err := cdc.UnmarshalBinaryBare(bz, commit)
|
2015-01-08 22:07:23 -08:00
|
|
|
if err != nil {
|
2019-08-08 12:31:13 +02:00
|
|
|
panic(errors.Wrap(err, "Error reading block seen commit"))
|
2015-01-08 22:07:23 -08:00
|
|
|
}
|
2016-04-02 09:10:16 -07:00
|
|
|
return commit
|
2015-01-08 22:07:23 -08:00
|
|
|
}
|
|
|
|
|
2017-10-04 15:04:23 -04:00
|
|
|
// SaveBlock persists the given block, blockParts, and seenCommit to the underlying db.
|
2016-04-02 09:10:16 -07:00
|
|
|
// blockParts: Must be parts of the block
|
|
|
|
// seenCommit: The +2/3 precommits that were seen which committed at height.
|
|
|
|
// If all the nodes restart after committing a block,
|
|
|
|
// we need this to reload the precommits to catch-up nodes to the
|
|
|
|
// most recent height. Otherwise they'd stall at H-1.
|
|
|
|
func (bs *BlockStore) SaveBlock(block *types.Block, blockParts *types.PartSet, seenCommit *types.Commit) {
|
2017-09-20 21:21:39 -06:00
|
|
|
if block == nil {
|
2019-04-26 06:23:43 -04:00
|
|
|
panic("BlockStore can only save a non-nil block")
|
2017-09-20 21:21:39 -06:00
|
|
|
}
|
2014-09-14 15:37:32 -07:00
|
|
|
height := block.Height
|
2017-10-14 19:21:13 -06:00
|
|
|
if g, w := height, bs.Height()+1; g != w {
|
2019-04-26 06:23:43 -04:00
|
|
|
panic(fmt.Sprintf("BlockStore can only save contiguous blocks. Wanted %v, got %v", w, g))
|
2014-08-10 16:35:08 -07:00
|
|
|
}
|
2014-11-01 04:04:58 -07:00
|
|
|
if !blockParts.IsComplete() {
|
2019-04-26 06:23:43 -04:00
|
|
|
panic(fmt.Sprintf("BlockStore can only save complete block part sets"))
|
2014-11-01 04:04:58 -07:00
|
|
|
}
|
2014-12-23 01:35:54 -08:00
|
|
|
|
2014-11-01 04:04:58 -07:00
|
|
|
// Save block meta
|
2017-02-14 15:33:14 -05:00
|
|
|
blockMeta := types.NewBlockMeta(block, blockParts)
|
2018-04-03 07:03:08 -07:00
|
|
|
metaBytes := cdc.MustMarshalBinaryBare(blockMeta)
|
2014-11-01 04:04:58 -07:00
|
|
|
bs.db.Set(calcBlockMetaKey(height), metaBytes)
|
2014-12-23 01:35:54 -08:00
|
|
|
|
2014-11-01 04:04:58 -07:00
|
|
|
// Save block parts
|
2015-06-25 20:28:34 -07:00
|
|
|
for i := 0; i < blockParts.Total(); i++ {
|
2018-04-05 05:17:43 -07:00
|
|
|
part := blockParts.GetPart(i)
|
|
|
|
bs.saveBlockPart(height, i, part)
|
2014-11-01 04:04:58 -07:00
|
|
|
}
|
2014-12-23 01:35:54 -08:00
|
|
|
|
2016-04-02 09:10:16 -07:00
|
|
|
// Save block commit (duplicate and separate from the Block)
|
2018-04-03 07:03:08 -07:00
|
|
|
blockCommitBytes := cdc.MustMarshalBinaryBare(block.LastCommit)
|
2016-04-02 09:10:16 -07:00
|
|
|
bs.db.Set(calcBlockCommitKey(height-1), blockCommitBytes)
|
2015-01-08 22:07:23 -08:00
|
|
|
|
2016-04-02 09:10:16 -07:00
|
|
|
// Save seen commit (seen +2/3 precommits for block)
|
2016-11-19 19:32:35 -05:00
|
|
|
// NOTE: we can delete this at a later height
|
2018-04-03 07:03:08 -07:00
|
|
|
seenCommitBytes := cdc.MustMarshalBinaryBare(seenCommit)
|
2016-04-02 09:10:16 -07:00
|
|
|
bs.db.Set(calcSeenCommitKey(height), seenCommitBytes)
|
2014-12-23 01:35:54 -08:00
|
|
|
|
|
|
|
// Save new BlockStoreStateJSON descriptor
|
|
|
|
BlockStoreStateJSON{Height: height}.Save(bs.db)
|
|
|
|
|
2014-11-05 03:08:29 -08:00
|
|
|
// Done!
|
2016-12-20 00:45:45 -05:00
|
|
|
bs.mtx.Lock()
|
2014-11-05 03:08:29 -08:00
|
|
|
bs.height = height
|
2016-12-20 00:45:45 -05:00
|
|
|
bs.mtx.Unlock()
|
2016-12-06 02:52:07 -08:00
|
|
|
|
|
|
|
// Flush
|
|
|
|
bs.db.SetSync(nil, nil)
|
2014-08-10 16:35:08 -07:00
|
|
|
}
|
|
|
|
|
2017-12-01 19:04:53 -06:00
|
|
|
func (bs *BlockStore) saveBlockPart(height int64, index int, part *types.Part) {
|
2016-12-22 21:51:58 -05:00
|
|
|
if height != bs.Height()+1 {
|
2019-04-26 06:23:43 -04:00
|
|
|
panic(fmt.Sprintf("BlockStore can only save contiguous blocks. Wanted %v, got %v", bs.Height()+1, height))
|
2014-11-01 04:04:58 -07:00
|
|
|
}
|
2018-04-03 07:03:08 -07:00
|
|
|
partBytes := cdc.MustMarshalBinaryBare(part)
|
2014-11-01 04:04:58 -07:00
|
|
|
bs.db.Set(calcBlockPartKey(height, index), partBytes)
|
|
|
|
}
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2017-12-01 19:04:53 -06:00
|
|
|
func calcBlockMetaKey(height int64) []byte {
|
2014-12-09 18:49:04 -08:00
|
|
|
return []byte(fmt.Sprintf("H:%v", height))
|
2014-08-10 16:35:08 -07:00
|
|
|
}
|
2014-11-01 04:04:58 -07:00
|
|
|
|
2017-12-01 19:04:53 -06:00
|
|
|
func calcBlockPartKey(height int64, partIndex int) []byte {
|
2014-12-09 18:49:04 -08:00
|
|
|
return []byte(fmt.Sprintf("P:%v:%v", height, partIndex))
|
2014-11-01 04:04:58 -07:00
|
|
|
}
|
|
|
|
|
2017-12-01 19:04:53 -06:00
|
|
|
func calcBlockCommitKey(height int64) []byte {
|
2016-04-02 09:10:16 -07:00
|
|
|
return []byte(fmt.Sprintf("C:%v", height))
|
2014-11-01 04:04:58 -07:00
|
|
|
}
|
|
|
|
|
2017-12-01 19:04:53 -06:00
|
|
|
func calcSeenCommitKey(height int64) []byte {
|
2016-04-02 09:10:16 -07:00
|
|
|
return []byte(fmt.Sprintf("SC:%v", height))
|
2015-01-08 22:07:23 -08:00
|
|
|
}
|
|
|
|
|
2014-11-01 04:04:58 -07:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
var blockStoreKey = []byte("blockStore")
|
|
|
|
|
blockchain: Reorg reactor (#3561)
* go routines in blockchain reactor
* Added reference to the go routine diagram
* Initial commit
* cleanup
* Undo testing_logger change, committed by mistake
* Fix the test loggers
* pulled some fsm code into pool.go
* added pool tests
* changes to the design
added block requests under peer
moved the request trigger in the reactor poolRoutine, triggered now by a ticker
in general moved everything required for making block requests smarter in the poolRoutine
added a simple map of heights to keep track of what will need to be requested next
added a few more tests
* send errors to FSM in a different channel than blocks
send errors (RemovePeer) from switch on a different channel than the
one receiving blocks
renamed channels
added more pool tests
* more pool tests
* lint errors
* more tests
* more tests
* switch fast sync to new implementation
* fixed data race in tests
* cleanup
* finished fsm tests
* address golangci comments :)
* address golangci comments :)
* Added timeout on next block needed to advance
* updating docs and cleanup
* fix issue in test from previous cleanup
* cleanup
* Added termination scenarios, tests and more cleanup
* small fixes to adr, comments and cleanup
* Fix bug in sendRequest()
If we tried to send a request to a peer not present in the switch, a
missing continue statement caused the request to be blackholed in a peer
that was removed and never retried.
While this bug was manifesting, the reactor kept asking for other
blocks that would be stored and never consumed. Added the number of
unconsumed blocks in the math for requesting blocks ahead of current
processing height so eventually there will be no more blocks requested
until the already received ones are consumed.
* remove bpPeer's didTimeout field
* Use distinct err codes for peer timeout and FSM timeouts
* Don't allow peers to update with lower height
* review comments from Ethan and Zarko
* some cleanup, renaming, comments
* Move block execution in separate goroutine
* Remove pool's numPending
* review comments
* fix lint, remove old blockchain reactor and duplicates in fsm tests
* small reorg around peer after review comments
* add the reactor spec
* verify block only once
* review comments
* change to int for max number of pending requests
* cleanup and godoc
* Add configuration flag fast sync version
* golangci fixes
* fix config template
* move both reactor versions under blockchain
* cleanup, golint, renaming stuff
* updated documentation, fixed more golint warnings
* integrate with behavior package
* sync with master
* gofmt
* add changelog_pending entry
* move to improvments
* suggestion to changelog entry
2019-07-23 10:58:52 +02:00
|
|
|
// BlockStoreStateJSON is the block store state JSON structure.
|
2014-12-23 01:35:54 -08:00
|
|
|
type BlockStoreStateJSON struct {
|
2018-04-07 19:47:19 +03:00
|
|
|
Height int64 `json:"height"`
|
2014-11-01 04:04:58 -07:00
|
|
|
}
|
|
|
|
|
2017-10-04 15:04:23 -04:00
|
|
|
// Save persists the blockStore state to the database as JSON.
|
2015-01-14 20:34:53 -08:00
|
|
|
func (bsj BlockStoreStateJSON) Save(db dbm.DB) {
|
2018-04-07 19:47:19 +03:00
|
|
|
bytes, err := cdc.MarshalJSON(bsj)
|
2014-11-01 04:04:58 -07:00
|
|
|
if err != nil {
|
2019-04-26 06:23:43 -04:00
|
|
|
panic(fmt.Sprintf("Could not marshal state bytes: %v", err))
|
2014-11-01 04:04:58 -07:00
|
|
|
}
|
2016-12-06 02:52:07 -08:00
|
|
|
db.SetSync(blockStoreKey, bytes)
|
2014-11-01 04:04:58 -07:00
|
|
|
}
|
|
|
|
|
2017-10-04 15:04:23 -04:00
|
|
|
// LoadBlockStoreStateJSON returns the BlockStoreStateJSON as loaded from disk.
|
2017-10-05 17:03:01 -06:00
|
|
|
// If no BlockStoreStateJSON was previously persisted, it returns the zero value.
|
2015-01-14 20:34:53 -08:00
|
|
|
func LoadBlockStoreStateJSON(db dbm.DB) BlockStoreStateJSON {
|
2014-11-01 04:04:58 -07:00
|
|
|
bytes := db.Get(blockStoreKey)
|
2018-01-06 01:26:51 -05:00
|
|
|
if len(bytes) == 0 {
|
2014-12-23 01:35:54 -08:00
|
|
|
return BlockStoreStateJSON{
|
2014-11-01 04:04:58 -07:00
|
|
|
Height: 0,
|
|
|
|
}
|
|
|
|
}
|
2014-12-23 01:35:54 -08:00
|
|
|
bsj := BlockStoreStateJSON{}
|
2018-04-07 19:47:19 +03:00
|
|
|
err := cdc.UnmarshalJSON(bytes, &bsj)
|
2014-11-01 04:04:58 -07:00
|
|
|
if err != nil {
|
2018-03-04 14:58:43 +04:00
|
|
|
panic(fmt.Sprintf("Could not unmarshal bytes: %X", bytes))
|
2014-11-01 04:04:58 -07:00
|
|
|
}
|
|
|
|
return bsj
|
|
|
|
}
|